4 #include "StandAloneDlg.h"
5 #include "GitStatusListCtrl.h"
7 #include "SplitterControl.h"
8 #include "HistoryCombo.h"
10 #include "GitLogList.h"
12 #define IDC_REBASE_TAB 0x1000000
14 #define REBASE_TAB_CONFLICT 0
15 #define REBASE_TAB_MESSAGE 1
16 #define REBASE_TAB_LOG 2
18 #define MSG_REBASE_UPDATE_UI (WM_USER+151)
20 class CRebaseDlg
: public CResizableStandAloneDialog
22 DECLARE_DYNAMIC(CRebaseDlg
)
25 CRebaseDlg(CWnd
* pParent
= NULL
); // standard constructor
26 virtual ~CRebaseDlg();
29 enum { IDD
= IDD_REBASE
};
34 CHOOSE_COMMIT_PICK_MODE
,
42 REBASE_SQUASH_CONFLICT
,
47 virtual void DoDataExchange(CDataExchange
* pDX
); // DDX/DDV support
48 virtual BOOL
OnInitDialog();
50 virtual LRESULT
DefWindowProc(UINT message
, WPARAM wParam
, LPARAM lParam
);
51 LRESULT
OnRebaseUpdateUI(WPARAM wParam
, LPARAM lParam
);
52 void DoSize(int delta
);
53 void AddRebaseAnchor();
56 void SetSplitterRange();
57 void SaveSplitterPos();
59 void LoadBranchInfo();
61 void SetAllRebaseAction(int action
);
65 CRect m_CommitListOrigRect
;
66 BOOL
PreTranslateMessage(MSG
* pMsg
);
68 CSciEdit m_wndOutputRebase
;
69 void SetContinueButtonText();
70 void SetControlEnable();
71 void UpdateProgress();
72 void UpdateCurrentStatus();
73 void ListConflictFile();
75 volatile LONG m_bThreadRunning
;
77 static UINT
RebaseThreadEntry(LPVOID pVoid
){return ((CRebaseDlg
*)pVoid
)->RebaseThread();};
80 CString m_OrigBranchHash
;
81 CString m_OrigUpstreamHash
;
83 int VerifyNoConflict();
84 CString
GetRebaseModeName(int rebasemode
);
86 CString m_SquashMessage
;
88 int CheckNextCommitIsSquash();
89 int GetCurrentCommitID();
94 afx_msg
void OnBnClickedPickAll();
95 afx_msg
void OnBnClickedSquashAll();
96 afx_msg
void OnBnClickedEditAll();
97 afx_msg
void OnBnClickedRebaseSplit();
98 afx_msg
void OnSize(UINT nType
, int cx
, int cy
);
99 afx_msg
void OnCbnSelchangeBranch();
100 afx_msg
void OnCbnSelchangeUpstream();
101 afx_msg
void OnBnClickedContinue();
102 afx_msg
void OnBnClickedAbort();
104 CProgressCtrl m_ProgressBar
;
105 CStatic m_CtrlStatusText
;
115 CString m_PostButtonText
;
117 CSplitterControl m_wndSplitter
;
118 CMFCTabCtrl m_ctrlTabCtrl
;
119 CGitStatusListCtrl m_FileListCtrl
;
120 CSciEdit m_LogMessageCtrl
;
122 CGitLogList m_CommitList
;
124 CHistoryCombo m_BranchCtrl
;
125 CHistoryCombo m_UpstreamCtrl
;
132 REBASE_STAGE m_RebaseStage
;
134 void AddBranchToolTips(CHistoryCombo
*pBranch
);
135 void AddLogString(CString str
);
137 int CheckRebaseCondition();
138 int m_CurrentRebaseIndex
;
141 afx_msg
void OnBnClickedButtonBrowse();
142 afx_msg
void OnBnClickedRebaseCheckForce();
143 afx_msg
void OnStnClickedStatusStatic();
144 afx_msg
void OnBnClickedRebasePostButton();