4 #include "StandAloneDlg.h"
5 #include "GitStatusListCtrl.h"
7 #include "SplitterControl.h"
8 #include "HistoryCombo.h"
10 #include "GitLogList.h"
11 #include "MenuButton.h"
13 #define IDC_REBASE_TAB 0x1000000
15 #define REBASE_TAB_CONFLICT 0
16 #define REBASE_TAB_MESSAGE 1
17 #define REBASE_TAB_LOG 2
19 #define MSG_REBASE_UPDATE_UI (WM_USER+151)
21 class CRebaseDlg
: public CResizableStandAloneDialog
23 DECLARE_DYNAMIC(CRebaseDlg
)
26 CRebaseDlg(CWnd
* pParent
= NULL
); // standard constructor
27 virtual ~CRebaseDlg();
30 enum { IDD
= IDD_REBASE
};
35 CHOOSE_COMMIT_PICK_MODE
,
43 REBASE_SQUASH_CONFLICT
,
48 virtual void DoDataExchange(CDataExchange
* pDX
); // DDX/DDV support
49 virtual BOOL
OnInitDialog();
51 virtual LRESULT
DefWindowProc(UINT message
, WPARAM wParam
, LPARAM lParam
);
52 LRESULT
OnRebaseUpdateUI(WPARAM wParam
, LPARAM lParam
);
53 void DoSize(int delta
);
54 void AddRebaseAnchor();
57 void SetSplitterRange();
58 void SaveSplitterPos();
60 void LoadBranchInfo();
62 void SetAllRebaseAction(int action
);
66 CRect m_CommitListOrigRect
;
67 BOOL
PreTranslateMessage(MSG
* pMsg
);
69 CSciEdit m_wndOutputRebase
;
70 void SetContinueButtonText();
71 void SetControlEnable();
72 void UpdateProgress();
73 void UpdateCurrentStatus();
74 void ListConflictFile();
77 volatile LONG m_bThreadRunning
;
79 static UINT
RebaseThreadEntry(LPVOID pVoid
){return ((CRebaseDlg
*)pVoid
)->RebaseThread();};
84 CString m_OrigBranchHash
;
85 CString m_OrigUpstreamHash
;
87 int VerifyNoConflict();
88 CString
GetRebaseModeName(int rebasemode
);
90 CString m_SquashMessage
;
92 int CheckNextCommitIsSquash();
93 int GetCurrentCommitID();
96 CMenuButton m_PostButton
;
100 afx_msg
void OnBnClickedPickAll();
101 afx_msg
void OnBnClickedSquashAll();
102 afx_msg
void OnBnClickedEditAll();
103 afx_msg
void OnBnClickedRebaseSplit();
104 afx_msg
void OnSize(UINT nType
, int cx
, int cy
);
105 afx_msg
void OnCbnSelchangeBranch();
106 afx_msg
void OnCbnSelchangeUpstream();
107 afx_msg
void OnBnClickedContinue();
108 afx_msg
void OnBnClickedAbort();
110 CProgressCtrl m_ProgressBar
;
111 CStatic m_CtrlStatusText
;
121 CStringArray m_PostButtonTexts
;
123 CSplitterControl m_wndSplitter
;
124 CMFCTabCtrl m_ctrlTabCtrl
;
125 CGitStatusListCtrl m_FileListCtrl
;
126 CSciEdit m_LogMessageCtrl
;
128 CGitLogList m_CommitList
;
130 CHistoryCombo m_BranchCtrl
;
131 CHistoryCombo m_UpstreamCtrl
;
138 REBASE_STAGE m_RebaseStage
;
140 void AddBranchToolTips(CHistoryCombo
*pBranch
);
141 void AddLogString(CString str
);
143 int CheckRebaseCondition();
144 int m_CurrentRebaseIndex
;
147 afx_msg
void OnBnClickedButtonBrowse();
148 afx_msg
void OnBnClickedRebaseCheckForce();
149 afx_msg
void OnStnClickedStatusStatic();
150 afx_msg
void OnBnClickedRebasePostButton();