LogList Search Dialog: Do not double sort refs
[TortoiseGit.git] / src / TortoiseProc / GitProgressDlg.h
blob69bd2bcaed35a1de31d7b1633e75e418cf6f1012
1 // TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2008-2013 - TortoiseGit
4 // Copyright (C) 2003-2008 - TortoiseSVN
6 // This program is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU General Public License
8 // as published by the Free Software Foundation; either version 2
9 // of the License, or (at your option) any later version.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software Foundation,
18 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 #pragma once
22 #include "StandAloneDlg.h"
23 #include "TGitPath.h"
24 #include "ProjectProperties.h"
25 #include "Git.h"
26 #include "GitStatus.h"
27 #include "Colors.h"
28 //#include "..\IBugTraqProvider\IBugTraqProvider_h.h"
29 #include "afxwin.h"
30 #include "UnicodeUtils.h"
31 #include "GitProgressList.h"
33 typedef int (__cdecl *GENERICCOMPAREFN)(const void * elem1, const void * elem2);
35 /**
36 * \ingroup TortoiseProc
37 * Handles different Subversion commands and shows the notify messages
38 * in a listbox. Since several Subversion commands have similar notify
39 * messages they are grouped together in this single class.
41 class CGitProgressDlg : public CResizableStandAloneDialog
43 public:
45 DECLARE_DYNAMIC(CGitProgressDlg)
47 public:
49 CGitProgressDlg(CWnd* pParent = NULL);
50 virtual ~CGitProgressDlg();
53 void SetCommand(CGitProgressList::Command cmd) {m_ProgList.SetCommand(cmd);}
54 void SetAutoClose(DWORD ac) {m_dwCloseOnEnd = ac;}
55 void SetOptions(DWORD opts) {m_ProgList.SetOptions(opts);}
56 void SetPathList(const CTGitPathList& pathList) {m_ProgList.SetPathList(pathList);}
57 void SetUrl(const CString& url) {m_ProgList.SetUrl(url);}
58 void SetSecondUrl(const CString& url) {m_ProgList.SetSecondUrl(url);}
59 void SetCommitMessage(const CString& msg) {m_ProgList.SetCommitMessage(msg);}
60 void SetIsBare(bool b) { m_ProgList.SetIsBare(b); }
61 void SetNoCheckout(bool b){ m_ProgList.SetNoCheckout(b); }
62 void SetRefSpec(CString spec){ m_ProgList.SetRefSpec(spec); }
63 void SetAutoTag(int tag){ m_ProgList.SetAutoTag(tag); }
65 // void SetRevision(const GitRev& rev) {m_Revision = rev;}
66 // void SetRevisionEnd(const GitRev& rev) {m_RevisionEnd = rev;}
68 void SetDiffOptions(const CString& opts) {m_ProgList.SetDiffOptions(opts);}
69 void SetSendMailOption(CSendMail *sendmail) { m_ProgList.SetSendMailOption(sendmail); }
70 void SetDepth(git_depth_t depth = git_depth_unknown) {m_ProgList.SetDepth(depth);}
71 void SetPegRevision(GitRev pegrev = GitRev()) {m_ProgList.SetPegRevision(pegrev);}
72 void SetProjectProperties(ProjectProperties props) {m_ProgList.SetProjectProperties(props);}
73 void SetChangeList(const CString& changelist, bool keepchangelist) {m_ProgList.SetChangeList(changelist, keepchangelist);}
74 void SetSelectedList(const CTGitPathList& selPaths) {m_ProgList.SetSelectedList(selPaths);};
75 // void SetRevisionRanges(const GitRevRangeArray& revArray) {m_revisionArray = revArray;}
76 // void SetBugTraqProvider(const CComPtr<IBugTraqProvider> pBugtraqProvider) { m_BugTraqProvider = pBugtraqProvider;}
77 /**
78 * If the number of items for which the operation is done on is known
79 * beforehand, that number can be set here. It is then used to show a more
80 * accurate progress bar during the operation.
82 void SetItemCount(long count) {if(count) m_ProgList.SetItemCountTotal(count);}
84 bool DidErrorsOccur() {return m_ProgList.m_bErrorsOccurred;}
86 enum { IDD = IDD_SVNPROGRESS };
89 protected:
91 virtual BOOL OnInitDialog();
92 virtual void OnCancel();
93 virtual BOOL PreTranslateMessage(MSG* pMsg);
94 virtual void DoDataExchange(CDataExchange* pDX);
96 afx_msg void OnBnClickedLogbutton();
97 afx_msg void OnBnClickedOk();
98 afx_msg void OnBnClickedNoninteractive();
99 afx_msg BOOL OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message);
100 afx_msg void OnClose();
101 afx_msg void OnEnSetfocusInfotext();
102 afx_msg LRESULT OnCtlColorStatic(WPARAM wParam, LPARAM lParam);
103 afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
104 afx_msg LRESULT OnTaskbarBtnCreated(WPARAM wParam, LPARAM lParam);
105 LRESULT OnCmdEnd(WPARAM wParam, LPARAM lParam);
106 LRESULT OnCmdStart(WPARAM wParam, LPARAM lParam);
108 DECLARE_MESSAGE_MAP()
110 private:
111 virtual void OnOK();
113 CAnimateCtrl m_Animate;
114 CProgressCtrl m_ProgCtrl;
115 CGitProgressList m_ProgList;
116 CEdit m_InfoCtrl;
117 CStatic m_ProgLableCtrl;
119 CBrush m_background_brush;
120 DWORD m_dwCloseOnEnd;