1
// TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2008-2017, 2020, 2023 - 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.
22 #include "StandAloneDlg.h"
23 #include "GitProgressList.h"
24 #include "MenuButton.h"
27 * \ingroup TortoiseProc
28 * Handles different git commands and shows the notify messages
29 * in a listbox. Since several git commands have similar notify
30 * messages they are grouped together in this single class.
32 class CGitProgressDlg
: public CResizableStandAloneDialog
36 DECLARE_DYNAMIC(CGitProgressDlg
)
40 CGitProgressDlg(CWnd
* pParent
= nullptr);
41 virtual ~CGitProgressDlg();
44 void SetCommand(ProgressCommand
* cmd
) { m_ProgList
.SetCommand(cmd
); }
45 void SetOptions(DWORD opts
) {m_ProgList
.SetOptions(opts
);}
46 void SetAutoClose(GitProgressAutoClose autoClose
) { m_AutoClose
= autoClose
; }
49 * If the number of items for which the operation is done on is known
50 * beforehand, that number can be set here. It is then used to show a more
51 * accurate progress bar during the operation.
53 void SetItemCount(long count
) {if(count
) m_ProgList
.SetItemCountTotal(count
);}
55 bool DidErrorsOccur() const { return m_ProgList
.m_bErrorsOccurred
; }
57 enum { IDD
= IDD_SVNPROGRESS
};
62 BOOL
OnInitDialog() override
;
63 void OnCancel() override
;
64 BOOL
PreTranslateMessage(MSG
* pMsg
) override
;
65 void DoDataExchange(CDataExchange
* pDX
) override
;
67 afx_msg
void OnBnClickedLogbutton();
68 afx_msg BOOL
OnSetCursor(CWnd
* pWnd
, UINT nHitTest
, UINT message
);
69 afx_msg
void OnClose();
70 afx_msg
void OnEnSetfocusInfotext();
71 afx_msg LRESULT
OnCtlColorStatic(WPARAM wParam
, LPARAM lParam
);
72 afx_msg HBRUSH
OnCtlColor(CDC
* pDC
, CWnd
* pWnd
, UINT nCtlColor
);
73 afx_msg LRESULT
OnTaskbarBtnCreated(WPARAM wParam
, LPARAM lParam
);
74 LRESULT
OnCmdEnd(WPARAM wParam
, LPARAM lParam
);
75 LRESULT
OnCmdStart(WPARAM wParam
, LPARAM lParam
);
82 CAnimateCtrl m_Animate
;
83 CProgressCtrl m_ProgCtrl
;
84 CGitProgressList m_ProgList
;
86 CStatic m_ProgLableCtrl
;
87 CMenuButton m_cMenuButton
;
88 PostCmdList m_PostCmdList
;
90 CBrush m_background_brush
;
91 GitProgressAutoClose m_AutoClose
;
98 std::map
<wchar_t, ACCELLERATOR
> m_accellerators
;
99 HACCEL m_hAccel
= nullptr;
100 LRESULT
DefWindowProc(UINT message
, WPARAM wParam
, LPARAM lParam
) override
;