OSDN Git Service

Save all branch status when close log dialog
authorFrank Li <lznuaa@gmail.com>
Thu, 14 Jan 2010 06:45:38 +0000 (14:45 +0800)
committerFrank Li <lznuaa@gmail.com>
Thu, 14 Jan 2010 06:45:38 +0000 (14:45 +0800)
Signed-off-by: Frank Li <lznuaa@gmail.com>
src/TortoiseProc/LogDlg.cpp
src/TortoiseProc/LogDlg.h

index 734f036..f9f178b 100644 (file)
@@ -79,14 +79,25 @@ CLogDlg::CLogDlg(CWnd* pParent /*=NULL*/)
        , m_hAccel(NULL)\r
 {\r
        m_bFilterWithRegex = !!CRegDWORD(_T("Software\\TortoiseGit\\UseRegexFilter"), TRUE);\r
        , m_hAccel(NULL)\r
 {\r
        m_bFilterWithRegex = !!CRegDWORD(_T("Software\\TortoiseGit\\UseRegexFilter"), TRUE);\r
-       m_bAllBranch=FALSE;\r
+\r
+       CString str;\r
+       str=g_Git.m_CurrentDir;\r
+       str.Replace(_T(":"),_T("_"));\r
+       str=CString(_T("Software\\TortoiseGit\\LogDialog\\AllBranch\\"))+str;\r
+       \r
+       m_regbAllBranch=CRegDWORD(str,FALSE);\r
+\r
+       m_bAllBranch=m_regbAllBranch;\r
+\r
        m_bFirstParent=FALSE;\r
        m_bWholeProject=FALSE;\r
 }\r
 \r
 CLogDlg::~CLogDlg()\r
 {\r
        m_bFirstParent=FALSE;\r
        m_bWholeProject=FALSE;\r
 }\r
 \r
 CLogDlg::~CLogDlg()\r
 {\r
-       \r
+\r
+       m_regbAllBranch=m_bAllBranch;\r
+\r
     m_CurrentFilteredChangedArray.RemoveAll();\r
        \r
 }\r
     m_CurrentFilteredChangedArray.RemoveAll();\r
        \r
 }\r
@@ -270,6 +281,11 @@ BOOL CLogDlg::OnInitDialog()
        AddAnchor(IDCANCEL, BOTTOM_RIGHT);\r
        AddAnchor(IDHELP, BOTTOM_RIGHT);\r
 \r
        AddAnchor(IDCANCEL, BOTTOM_RIGHT);\r
        AddAnchor(IDHELP, BOTTOM_RIGHT);\r
 \r
+       if(this->m_bAllBranch)\r
+               m_LogList.m_ShowMask|=CGit::LOG_INFO_ALL_BRANCH;\r
+       else\r
+               m_LogList.m_ShowMask&=~CGit::LOG_INFO_ALL_BRANCH;\r
+\r
 //     SetPromptParentWindow(m_hWnd);\r
 \r
        if (hWndExplorer)\r
 //     SetPromptParentWindow(m_hWnd);\r
 \r
        if (hWndExplorer)\r
index 742d254..0034153 100644 (file)
@@ -167,7 +167,8 @@ protected:
 \r
 private:\r
        \r
 \r
 private:\r
        \r
-\r
+       CRegDWORD m_regbAllBranch;\r
+       \r
        void Refresh (bool autoGoOnline = false);\r
        BOOL IsDiffPossible(LogChangedPath * changedpath, git_revnum_t rev);\r
        BOOL Open(bool bOpenWith, CString changedpath, git_revnum_t rev);\r
        void Refresh (bool autoGoOnline = false);\r
        BOOL IsDiffPossible(LogChangedPath * changedpath, git_revnum_t rev);\r
        BOOL Open(bool bOpenWith, CString changedpath, git_revnum_t rev);\r