Prevent the recycle bin from even getting monitored
[TortoiseGit.git] / src / TortoiseProc / StashSave.cpp
blob553a47743be5bb05e379e21d5e26b68007b6a27f
1 // TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2011-2012 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.
20 #include "stdafx.h"
21 #include "TortoiseProc.h"
22 #include "StashSave.h"
23 #include "AppUtils.h"
25 IMPLEMENT_DYNAMIC(CStashSaveDlg, CHorizontalResizableStandAloneDialog)
27 CStashSaveDlg::CStashSaveDlg(CWnd* pParent /*=NULL*/)
28 : CHorizontalResizableStandAloneDialog(CStashSaveDlg::IDD, pParent)
29 , m_bIncludeUntracked(FALSE)
33 CStashSaveDlg::~CStashSaveDlg()
37 void CStashSaveDlg::DoDataExchange(CDataExchange* pDX)
39 CHorizontalResizableStandAloneDialog::DoDataExchange(pDX);
40 DDX_Text(pDX, IDC_STASHMESSAGE, m_sMessage);
41 DDX_Check(pDX, IDC_CHECK_UNTRACKED, m_bIncludeUntracked);
44 BEGIN_MESSAGE_MAP(CStashSaveDlg, CHorizontalResizableStandAloneDialog)
45 ON_BN_CLICKED(IDOK, &CStashSaveDlg::OnBnClickedOk)
46 ON_BN_CLICKED(IDHELP, &CStashSaveDlg::OnBnClickedHelp)
47 END_MESSAGE_MAP()
49 BOOL CStashSaveDlg::OnInitDialog()
51 CHorizontalResizableStandAloneDialog::OnInitDialog();
52 CAppUtils::MarkWindowAsUnpinnable(m_hWnd);
54 AddAnchor(IDOK,BOTTOM_RIGHT);
55 AddAnchor(IDCANCEL, BOTTOM_RIGHT);
56 AddAnchor(IDHELP, BOTTOM_RIGHT);
57 AddAnchor(IDC_GROUP_STASHMESSAGE, TOP_LEFT, TOP_RIGHT);
58 AddAnchor(IDC_STASHMESSAGE, TOP_LEFT, TOP_RIGHT);
59 AddAnchor(IDC_GROUP_OPTION, TOP_LEFT, TOP_RIGHT);
61 AdjustControlSize(IDC_CHECK_UNTRACKED);
63 CString sWindowTitle;
64 GetWindowText(sWindowTitle);
65 CAppUtils::SetWindowTitle(m_hWnd, g_Git.m_CurrentDir, sWindowTitle);
67 this->UpdateData(false);
69 if (CAppUtils::GetMsysgitVersion() < 0x01070700)
70 GetDlgItem(IDC_CHECK_UNTRACKED)->EnableWindow(FALSE);
72 return TRUE;
75 void CStashSaveDlg::OnBnClickedOk()
77 CHorizontalResizableStandAloneDialog::UpdateData(TRUE);
79 CHorizontalResizableStandAloneDialog::OnOK();
82 void CStashSaveDlg::OnBnClickedHelp()
84 OnHelp();