Fix checkout failure when running clone with libgit2 without specifying local branch...
[TortoiseGit.git] / src / TortoiseProc / RevertDlg.h
blob3ad1d320b25d7547121892801a65d21381d27e81
1 // TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2003-2008 - TortoiseSVN
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.
19 #pragma once
21 #include "StandAloneDlg.h"
22 #include "GitStatusListCtrl.h"
25 /**
26 * \ingroup TortoiseProc
27 * Dialog showing a list of versioned files which don't have the status 'normal'.
28 * The dialog effectively shows a list of files which can be reverted.
30 class CRevertDlg : public CResizableStandAloneDialog
32 DECLARE_DYNAMIC(CRevertDlg)
34 public:
35 CRevertDlg(CWnd* pParent = NULL); // standard constructor
36 virtual ~CRevertDlg();
38 enum { IDD = IDD_REVERT };
40 protected:
41 virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
42 virtual BOOL OnInitDialog();
43 virtual void OnOK();
44 virtual void OnCancel();
45 virtual BOOL PreTranslateMessage(MSG* pMsg);
46 afx_msg void OnBnClickedSelectall();
47 afx_msg LRESULT OnSVNStatusListCtrlNeedsRefresh(WPARAM, LPARAM);
48 afx_msg LRESULT OnFileDropped(WPARAM, LPARAM lParam);
49 afx_msg void OnTimer(UINT_PTR nIDEvent);
51 DECLARE_MESSAGE_MAP()
53 void StartDiff(int fileindex);
55 private:
56 static UINT RevertThreadEntry(LPVOID pVoid);
57 UINT RevertThread();
59 public:
60 CTGitPathList m_pathList;
61 CTGitPathList m_selectedPathList;
62 BOOL m_bRecursive;
64 private:
65 BOOL m_bSelectAll;
66 volatile LONG m_bThreadRunning;
67 CGitStatusListCtrl m_RevertList;
68 CButton m_SelectAll;
69 bool m_bCancelled;