X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=src%2FTortoiseProc%2FBrowseRefsDlg.h;h=31dd7defe3b2a88db98501f5d95b12275850707d;hb=c59c576cec251c8fb5e555f11714cfd0578970d4;hp=d139211d42882a9082fd64fd42fff9d77f92fab3;hpb=25437d67fb18061ed75993bd47370de61c54f744;p=tortoisegit%2FTortoiseGitJp.git diff --git a/src/TortoiseProc/BrowseRefsDlg.h b/src/TortoiseProc/BrowseRefsDlg.h index d139211..31dd7de 100644 --- a/src/TortoiseProc/BrowseRefsDlg.h +++ b/src/TortoiseProc/BrowseRefsDlg.h @@ -5,6 +5,13 @@ #include "afxcmn.h" #include "StandAloneDlg.h" + +const int gPickRef_Head = 1; +const int gPickRef_Tag = 2; +const int gPickRef_Remote = 4; +const int gPickRef_All = gPickRef_Head | gPickRef_Tag | gPickRef_Remote; +const int gPickRef_NoTag = gPickRef_All & ~gPickRef_Tag; + class CShadowTree { public: @@ -26,6 +33,8 @@ public: return wcsncmp(GetRefName(),from,wcslen(from))==0; } + CShadowTree* FindLeaf(CString partialRefName); + CString m_csRefName; CString m_csRefHash; CString m_csDate; @@ -56,7 +65,12 @@ public: eCmd_CreateBranch, eCmd_CreateTag, eCmd_DeleteBranch, - eCmd_DeleteTag + eCmd_DeleteRemoteBranch, + eCmd_DeleteTag, + eCmd_ShowReflog, + eCmd_Diff, + eCmd_Fetch, + eCmd_Switch }; enum eCol @@ -78,7 +92,7 @@ public: afx_msg void OnBnClickedOk(); virtual BOOL OnInitDialog(); - CString GetSelectedRef(bool onlyIfLeaf); + CString GetSelectedRef(bool onlyIfLeaf, bool pickFirstSelIfMultiSel = false); void Refresh(CString selectRef = CString()); @@ -88,11 +102,14 @@ public: void FillListCtrlForShadowTree(CShadowTree* pTree, CString refNamePrefix, bool isFirstLevel); - bool SelectRef(CString refName); + bool SelectRef(CString refName, bool bExactMatch); - bool ConfirmDeleteRef(CString completeRefName); + bool ConfirmDeleteRef(VectorPShadowTree& leafs); + bool DoDeleteRefs(VectorPShadowTree& leafs, bool bForce); bool DoDeleteRef(CString completeRefName, bool bForce); + CString GetFullRefName(CString partialRefName); + private: CString m_cmdPath; @@ -110,6 +127,7 @@ public: void OnContextMenu_ListRefLeafs(CPoint point); void OnContextMenu_RefTreeCtrl(CPoint point); + bool AreAllFrom(VectorPShadowTree& leafs, const wchar_t* from); void ShowContextMenu(CPoint point, HTREEITEM hTreePos, VectorPShadowTree& selectedLeafs); virtual BOOL PreTranslateMessage(MSG* pMsg); afx_msg void OnLvnColumnclickListRefLeafs(NMHDR *pNMHDR, LRESULT *pResult); @@ -119,7 +137,9 @@ public: public: CString m_initialRef; + int m_pickRef_Kind; CString m_pickedRef; - static CString PickRef(bool returnAsHash = false, CString initialRef = CString()); + static CString PickRef(bool returnAsHash = false, CString initialRef = CString(), int pickRef_Kind = gPickRef_All); + static bool PickRefForCombo(CComboBoxEx* pComboBox, int pickRef_Kind = gPickRef_All); };