#include "afxcmn.h"\r
#include "StandAloneDlg.h"\r
\r
+\r
+const int gPickRef_Head = 1;\r
+const int gPickRef_Tag = 2;\r
+const int gPickRef_Remote = 4;\r
+const int gPickRef_All = gPickRef_Head | gPickRef_Tag | gPickRef_Remote;\r
+const int gPickRef_NoTag = gPickRef_All & ~gPickRef_Tag;\r
+\r
class CShadowTree\r
{\r
public:\r
return wcsncmp(GetRefName(),from,wcslen(from))==0;\r
}\r
\r
+ CShadowTree* FindLeaf(CString partialRefName);\r
+\r
CString m_csRefName;\r
CString m_csRefHash;\r
CString m_csDate;\r
eCmd_CreateBranch,\r
eCmd_CreateTag,\r
eCmd_DeleteBranch,\r
- eCmd_DeleteTag\r
+ eCmd_DeleteRemoteBranch,\r
+ eCmd_DeleteTag,\r
+ eCmd_ShowReflog,\r
+ eCmd_Diff,\r
+ eCmd_Fetch,\r
+ eCmd_Switch\r
};\r
\r
enum eCol\r
afx_msg void OnBnClickedOk();\r
virtual BOOL OnInitDialog();\r
\r
- CString GetSelectedRef(bool onlyIfLeaf);\r
+ CString GetSelectedRef(bool onlyIfLeaf, bool pickFirstSelIfMultiSel = false);\r
\r
void Refresh(CString selectRef = CString());\r
\r
\r
void FillListCtrlForShadowTree(CShadowTree* pTree, CString refNamePrefix, bool isFirstLevel);\r
\r
- bool SelectRef(CString refName);\r
+ bool SelectRef(CString refName, bool bExactMatch);\r
\r
- bool ConfirmDeleteRef(CString completeRefName);\r
+ bool ConfirmDeleteRef(VectorPShadowTree& leafs);\r
+ bool DoDeleteRefs(VectorPShadowTree& leafs, bool bForce);\r
bool DoDeleteRef(CString completeRefName, bool bForce);\r
\r
+ CString GetFullRefName(CString partialRefName);\r
+\r
private:\r
CString m_cmdPath;\r
\r
void OnContextMenu_ListRefLeafs(CPoint point);\r
void OnContextMenu_RefTreeCtrl(CPoint point);\r
\r
+ bool AreAllFrom(VectorPShadowTree& leafs, const wchar_t* from);\r
void ShowContextMenu(CPoint point, HTREEITEM hTreePos, VectorPShadowTree& selectedLeafs);\r
virtual BOOL PreTranslateMessage(MSG* pMsg);\r
afx_msg void OnLvnColumnclickListRefLeafs(NMHDR *pNMHDR, LRESULT *pResult);\r
\r
public:\r
CString m_initialRef;\r
+ int m_pickRef_Kind;\r
CString m_pickedRef;\r
\r
- static CString PickRef(bool returnAsHash = false, CString initialRef = CString()); \r
+ static CString PickRef(bool returnAsHash = false, CString initialRef = CString(), int pickRef_Kind = gPickRef_All); \r
+ static bool PickRefForCombo(CComboBoxEx* pComboBox, int pickRef_Kind = gPickRef_All); \r
};\r