1 // TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2011 Sven Strickroth, <email@cs-ware.de>
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software Foundation,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
21 #include "TortoiseProc.h"
22 #include "StashSave.h"
25 IMPLEMENT_DYNAMIC(CStashSaveDlg
, CHorizontalResizableStandAloneDialog
)
27 CStashSaveDlg::CStashSaveDlg(CWnd
* pParent
/*=NULL*/)
28 : CHorizontalResizableStandAloneDialog(CStashSaveDlg::IDD
, pParent
)
32 CStashSaveDlg::~CStashSaveDlg()
36 void CStashSaveDlg::DoDataExchange(CDataExchange
* pDX
)
38 CHorizontalResizableStandAloneDialog::DoDataExchange(pDX
);
39 DDX_Text(pDX
, IDC_STASHMESSAGE
, m_sMessage
);
43 BEGIN_MESSAGE_MAP(CStashSaveDlg
, CHorizontalResizableStandAloneDialog
)
44 ON_BN_CLICKED(IDOK
, &CStashSaveDlg::OnBnClickedOk
)
45 ON_BN_CLICKED(IDHELP
, &CStashSaveDlg::OnBnClickedHelp
)
48 BOOL
CStashSaveDlg::OnInitDialog()
50 CHorizontalResizableStandAloneDialog::OnInitDialog();
51 CAppUtils::MarkWindowAsUnpinnable(m_hWnd
);
53 AddAnchor(IDOK
,BOTTOM_RIGHT
);
54 AddAnchor(IDCANCEL
, BOTTOM_RIGHT
);
55 AddAnchor(IDHELP
, BOTTOM_RIGHT
);
56 AddAnchor(IDC_GROUP_STASHMESSAGE
, TOP_LEFT
, TOP_RIGHT
);
57 AddAnchor(IDC_STASHMESSAGE
, TOP_LEFT
, TOP_RIGHT
);
60 GetWindowText(sWindowTitle
);
61 CAppUtils::SetWindowTitle(m_hWnd
, g_Git
.m_CurrentDir
, sWindowTitle
);
63 this->UpdateData(false);
67 void CStashSaveDlg::OnBnClickedOk()
69 CHorizontalResizableStandAloneDialog::UpdateData(TRUE
);
71 CHorizontalResizableStandAloneDialog::OnOK();
74 void CStashSaveDlg::OnBnClickedHelp()