OSDN Git Service

BrowseRefs: Added option to delete remote branch
[tortoisegit/TortoiseGitJp.git] / src / TortoiseProc / BrowseRefsDlg.h
index 1f85df2..bf3fafb 100644 (file)
@@ -5,6 +5,13 @@
 #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
@@ -26,6 +33,8 @@ public:
                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
@@ -56,7 +65,9 @@ public:
                eCmd_CreateBranch,\r
                eCmd_CreateTag,\r
                eCmd_DeleteBranch,\r
-               eCmd_DeleteTag\r
+               eCmd_DeleteRemoteBranch,\r
+               eCmd_DeleteTag,\r
+               eCmd_ShowReflog\r
        };\r
 \r
        enum eCol\r
@@ -78,7 +89,9 @@ public:
        afx_msg void OnBnClickedOk();\r
        virtual BOOL OnInitDialog();\r
 \r
-       void                    Refresh(bool bSelectCurHead=false);\r
+       CString                 GetSelectedRef(bool onlyIfLeaf);\r
+\r
+       void                    Refresh(CString selectRef = CString());\r
 \r
        CShadowTree&    GetTreeNode(CString refName, CShadowTree* pTreePos=NULL, bool bCreateIfNotExist=false);\r
 \r
@@ -86,11 +99,13 @@ public:
 \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                    DoDeleteRef(CString completeRefName, bool bForce);\r
 \r
+       CString                 GetFullRefName(CString partialRefName);\r
+\r
 private:\r
        CString                 m_cmdPath;\r
 \r
@@ -111,4 +126,15 @@ public:
        void            ShowContextMenu(CPoint point, HTREEITEM hTreePos, VectorPShadowTree& selectedLeafs);\r
        virtual BOOL PreTranslateMessage(MSG* pMsg);\r
        afx_msg void OnLvnColumnclickListRefLeafs(NMHDR *pNMHDR, LRESULT *pResult);\r
+       afx_msg void OnDestroy();\r
+       afx_msg void OnNMDblclkListRefLeafs(NMHDR *pNMHDR, LRESULT *pResult);\r
+\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(), int pickRef_Kind = gPickRef_All); \r
+       static bool             PickRefForCombo(CComboBoxEx* pComboBox, int pickRef_Kind = gPickRef_All); \r
 };\r