Settings dialog can set EnableLogCache
authorSup Yut Sum <ch3cooli@gmail.com>
Thu, 31 Jan 2013 15:38:26 +0000 (31 23:38 +0800)
committerSup Yut Sum <ch3cooli@gmail.com>
Thu, 31 Jan 2013 15:43:12 +0000 (31 23:43 +0800)
Signed-off-by: Sup Yut Sum <ch3cooli@gmail.com>
doc/images/en/SettingsDialog.png
doc/source/en/TortoiseGit/tsvn_dug/dug_settings_general.xml
src/Resources/TortoiseProcENG.rc
src/TortoiseProc/Settings/SetDialogs.cpp
src/TortoiseProc/Settings/SetDialogs.h
src/TortoiseProc/resource.h

dissimilarity index 99%
index 635200b..32d7372 100644 (file)
Binary files a/doc/images/en/SettingsDialog.png and b/doc/images/en/SettingsDialog.png differ
index 5fe0053..6e0bdc0 100644 (file)
                                        </para>\r
                                </listitem>\r
                        </varlistentry>\r
+                       <varlistentry>\r
+                               <term>Enable log cache</term>\r
+                               <listitem>\r
+                                       <para>\r
+                                               Load/saves log cache in .git folder (tortoisegit.data, tortoisegit.index) to boost performance of subsequent use of log list.\r
+                                               If this option is disabled, the cache files are not read or written.\r
+                                               Default is enabled.\r
+                                       </para>\r
+                               </listitem>\r
+                       </varlistentry>\r
 <!--\r
                        <varlistentry>\r
                                <term>Progress Dialog</term>\r
index 03a231a..08559d3 100644 (file)
@@ -660,12 +660,12 @@ BEGIN
     EDITTEXT        IDC_NOCONTEXTPATHS,12,173,274,36,ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_WANTRETURN | WS_VSCROLL\r
 END\r
 \r
-IDD_SETTINGSDIALOGS DIALOGEX 0, 0, 300, 217\r
+IDD_SETTINGSDIALOGS DIALOGEX 0, 0, 301, 231\r
 STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD | WS_DISABLED | WS_CAPTION\r
 CAPTION "General::Dialogs"\r
 FONT 8, "MS Shell Dlg", 0, 0, 0x0\r
 BEGIN\r
-    GROUPBOX        "Log messages",IDC_STATIC,7,7,286,73\r
+    GROUPBOX        "Log messages",IDC_STATIC,7,7,287,91\r
     LTEXT           "&Font for log messages:",IDC_STATIC,14,17,92,13,SS_CENTERIMAGE\r
     COMBOBOX        IDC_FONTNAMES,107,17,136,90,CBS_DROPDOWNLIST | CBS_OWNERDRAWVARIABLE | CBS_SORT | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\r
     COMBOBOX        IDC_FONTSIZES,253,17,31,47,CBS_DROPDOWN | WS_VSCROLL | WS_TABSTOP\r
@@ -679,20 +679,21 @@ BEGIN
                     "Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,55,270,10\r
     CONTROL         "Abbreviate renamings",IDC_ABBREVIATERENAMINGS,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,66,150,10\r
     CONTROL         "Symbolize ref names",IDC_SYMBOLIZEREFNAMES,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,170,66,120,10\r
-    GROUPBOX        "Misc",IDC_STATIC,7,86,286,47\r
-    LTEXT           "&Autoclose:",IDC_STATIC,14,95,85,16,SS_CENTERIMAGE | NOT WS_VISIBLE\r
-    COMBOBOX        IDC_AUTOCLOSECOMBO,107,98,177,75,CBS_DROPDOWNLIST | NOT WS_VISIBLE | WS_VSCROLL | WS_TABSTOP\r
+    GROUPBOX        "Misc",IDC_STATIC,7,103,287,46\r
+    LTEXT           "&Autoclose:",IDC_STATIC,14,110,85,16,SS_CENTERIMAGE | NOT WS_VISIBLE\r
+    COMBOBOX        IDC_AUTOCLOSECOMBO,107,113,177,75,CBS_DROPDOWNLIST | NOT WS_VISIBLE | WS_VSCROLL | WS_TABSTOP\r
     CONTROL         "Use recycle bin when reverting",IDC_USERECYCLEBIN,\r
-                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,116,270,10\r
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,131,270,10\r
     CONTROL         "&Use auto-completion of file paths and keywords",IDC_AUTOCOMPLETION,\r
-                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,150,271,10\r
-    LTEXT           "&Timeout in seconds to stop the auto-completion parsing",IDC_AUTOCOMPLETIONTIMEOUTLABEL,14,167,231,8,SS_NOTIFY\r
-    EDITTEXT        IDC_AUTOCOMPLETIONTIMEOUT,252,165,31,12,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT\r
-    LTEXT           "Max. items to keep in the log message history",IDC_MAXHISTORYLABEL,14,182,226,8,SS_NOTIFY\r
-    EDITTEXT        IDC_MAXHISTORY,252,178,31,14,ES_AUTOHSCROLL\r
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,165,271,10\r
+    LTEXT           "&Timeout in seconds to stop the auto-completion parsing",IDC_AUTOCOMPLETIONTIMEOUTLABEL,14,182,231,8,SS_NOTIFY\r
+    EDITTEXT        IDC_AUTOCOMPLETIONTIMEOUT,252,180,31,12,ES_AUTOHSCROLL | ES_NUMBER,WS_EX_RIGHT\r
+    LTEXT           "Max. items to keep in the log message history",IDC_MAXHISTORYLABEL,14,197,226,8,SS_NOTIFY\r
+    EDITTEXT        IDC_MAXHISTORY,252,193,31,14,ES_AUTOHSCROLL\r
     CONTROL         "Select items automatically",IDC_SELECTFILESONCOMMIT,\r
-                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,195,238,10\r
-    GROUPBOX        "Commit",IDC_COMMITGROUP,7,139,286,71\r
+                    "Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,210,238,10\r
+    GROUPBOX        "Commit",IDC_COMMITGROUP,7,152,287,72\r
+    CONTROL         "Enable log cache",IDC_ENABLELOGCACHE,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,14,78,69,10\r
 END\r
 \r
 IDD_RESOLVE DIALOGEX 0, 0, 289, 154\r
@@ -2028,7 +2029,7 @@ BEGIN
         VERTGUIDE, 272\r
         VERTGUIDE, 284\r
         TOPMARGIN, 7\r
-        BOTTOMMARGIN, 210\r
+        BOTTOMMARGIN, 224\r
     END\r
 \r
     IDD_RESOLVE, DIALOG\r
@@ -3942,6 +3943,8 @@ BEGIN
     IDS_PROC_SYNC_PUSHNOTES "Push notes"\r
     IDS_PROC_REPOCREATED    "Initialized empty Git repository in %s."\r
     IDS_PROC_BROWSEREFS_DELETEALLTAGS "Delete all tags"\r
+    IDS_SETTINGS_ENABLELOGCACHE_TT \r
+                            "Enable loading/saving log cache files (tortoisegit.data, tortoisegit.index)"\r
 END\r
 \r
 #endif    // English (U.S.) resources\r
index 35b3f03..140c852 100644 (file)
@@ -1,6 +1,6 @@
 // TortoiseGit - a Windows shell extension for easy version control\r
 \r
-// Copyright (C) 2008-2012 - TortoiseGit\r
+// Copyright (C) 2008-2013 - TortoiseGit\r
 // Copyright (C) 2003-2008 - TortoiseSVN\r
 \r
 // This program is free software; you can redistribute it and/or\r
@@ -37,6 +37,7 @@ CSetDialogs::CSetDialogs()
        , m_bUseRecycleBin(TRUE)\r
        , m_bAbbreviateRenamings(FALSE)\r
        , m_bSymbolizeRefNames(FALSE)\r
+       , m_bEnableLogCache(TRUE)\r
        , m_bAutocompletion(FALSE)\r
        , m_dwAutocompletionTimeout(0)\r
        , m_dwMaxHistory(25)\r
@@ -53,6 +54,7 @@ CSetDialogs::CSetDialogs()
        m_regUseRecycleBin = CRegDWORD(_T("Software\\TortoiseGit\\RevertWithRecycleBin"), TRUE);\r
        m_regAbbreviateRenamings = CRegDWORD(_T("Software\\TortoiseGit\\AbbreviateRenamings"), FALSE);\r
        m_regSymbolizeRefNames = CRegDWORD(_T("Software\\TortoiseGit\\SymbolizeRefNames"), FALSE);\r
+       m_regEnableLogCache = CRegDWORD(_T("Software\\TortoiseGit\\EnableLogCache"), TRUE);\r
        m_regAutocompletion = CRegDWORD(_T("Software\\TortoiseGit\\Autocompletion"), TRUE);\r
        m_bAutocompletion = (DWORD)m_regAutocompletion;\r
        m_regAutocompletionTimeout = CRegDWORD(_T("Software\\TortoiseGit\\AutocompleteParseTimeout"), 5);\r
@@ -89,6 +91,7 @@ void CSetDialogs::DoDataExchange(CDataExchange* pDX)
        DDX_Check(pDX, IDC_USERECYCLEBIN, m_bUseRecycleBin);\r
        DDX_Check(pDX, IDC_ABBREVIATERENAMINGS, m_bAbbreviateRenamings);\r
        DDX_Check(pDX, IDC_SYMBOLIZEREFNAMES, m_bSymbolizeRefNames);\r
+       DDX_Check(pDX, IDC_ENABLELOGCACHE, m_bEnableLogCache);\r
        DDX_Check(pDX, IDC_AUTOCOMPLETION, m_bAutocompletion);\r
        DDX_Check(pDX, IDC_TOPOORDER, m_bTopoOrder);\r
        DDX_Text(pDX, IDC_AUTOCOMPLETIONTIMEOUT, m_dwAutocompletionTimeout);\r
@@ -109,6 +112,7 @@ BEGIN_MESSAGE_MAP(CSetDialogs, ISettingsPropPage)
        ON_BN_CLICKED(IDC_USERECYCLEBIN, OnChange)\r
        ON_BN_CLICKED(IDC_ABBREVIATERENAMINGS, OnChange)\r
        ON_BN_CLICKED(IDC_SYMBOLIZEREFNAMES, OnChange)\r
+       ON_BN_CLICKED(IDC_ENABLELOGCACHE, OnChange)\r
        ON_BN_CLICKED(IDC_AUTOCOMPLETION, OnChange)\r
        ON_BN_CLICKED(IDC_TOPOORDER, OnChange)\r
        ON_EN_CHANGE(IDC_AUTOCOMPLETIONTIMEOUT, OnChange)\r
@@ -146,6 +150,7 @@ BOOL CSetDialogs::OnInitDialog()
        m_bUseRecycleBin = m_regUseRecycleBin;\r
        m_bAbbreviateRenamings = m_regAbbreviateRenamings;\r
        m_bSymbolizeRefNames = m_regSymbolizeRefNames;\r
+       m_bEnableLogCache = m_regEnableLogCache;\r
        m_bTopoOrder = m_regTopoOrder;\r
 \r
        for (int i=0; i<m_cAutoClose.GetCount(); ++i)\r
@@ -163,6 +168,7 @@ BOOL CSetDialogs::OnInitDialog()
        m_tooltips.AddTool(IDC_USERECYCLEBIN, IDS_SETTINGS_USERECYCLEBIN_TT);\r
        m_tooltips.AddTool(IDC_ABBREVIATERENAMINGS, IDS_SETTINGS_ABBREVIATERENAMINGS_TT);\r
        m_tooltips.AddTool(IDC_SYMBOLIZEREFNAMES, IDS_SETTINGS_SYMBOLIZEREFNAMES_TT);\r
+       m_tooltips.AddTool(IDC_ENABLELOGCACHE, IDS_SETTINGS_ENABLELOGCACHE_TT);\r
        m_tooltips.AddTool(IDC_AUTOCOMPLETION, IDS_SETTINGS_AUTOCOMPLETION_TT);\r
        m_tooltips.AddTool(IDC_AUTOCOMPLETIONTIMEOUT, IDS_SETTINGS_AUTOCOMPLETIONTIMEOUT_TT);\r
        m_tooltips.AddTool(IDC_AUTOCOMPLETIONTIMEOUTLABEL, IDS_SETTINGS_AUTOCOMPLETIONTIMEOUT_TT);\r
@@ -230,6 +236,7 @@ BOOL CSetDialogs::OnApply()
        Store (m_bUseRecycleBin, m_regUseRecycleBin);\r
        Store (m_bAbbreviateRenamings, m_regAbbreviateRenamings);\r
        Store (m_bSymbolizeRefNames, m_regSymbolizeRefNames);\r
+       Store (m_bEnableLogCache, m_regEnableLogCache);\r
 \r
        Store (m_bAutocompletion, m_regAutocompletion);\r
        Store (m_dwAutocompletionTimeout, m_regAutocompletionTimeout);\r
index ed83540..b055eaa 100644 (file)
@@ -1,6 +1,6 @@
 // TortoiseGit - a Windows shell extension for easy version control\r
 \r
-// Copyright (C) 2011-2012 - TortoiseGit\r
+// Copyright (C) 2011-2013 - TortoiseGit\r
 // Copyright (C) 2003-2008 - TortoiseSVN\r
 \r
 // This program is free software; you can redistribute it and/or\r
@@ -80,6 +80,8 @@ private:
        BOOL                            m_bAbbreviateRenamings;\r
        CRegDWORD                       m_regSymbolizeRefNames;\r
        BOOL                            m_bSymbolizeRefNames;\r
+       CRegDWORD                       m_regEnableLogCache;\r
+       BOOL                            m_bEnableLogCache;\r
        CRegDWORD               m_regAutocompletion;\r
        BOOL                    m_bAutocompletion;\r
        CRegDWORD               m_regAutocompletionTimeout;\r
index 9dd6b04..e350372 100644 (file)
 #define IDS_PROC_REPOCREATED            1386\r
 #define IDC_FILTER                      1387\r
 #define IDS_PROC_BROWSEREFS_DELETEALLTAGS 1387\r
+#define IDS_SETTINGS_ENABLELOGCACHE_TT  1388\r
 #define IDC_REVISIONGROUP               1393\r
 #define IDC_REPOLABEL                   1394\r
 #define IDS_WARN_FOLDERNOTEXIST         1400\r
 #define IDC_CALC_DIFF                   1741\r
 #define IDC_CHECK_MERGE_LOG             1742\r
 #define IDC_EDIT_MERGE_LOGNUM           1743\r
+#define IDC_ENABLELOGCACHE              1744\r
 #define IDS_DLGTITLE_ADD_DIFF_TOOL      1750\r
 #define IDS_DLGTITLE_ADD_MERGE_TOOL     1751\r
 #define IDS_DLGTITLE_EDIT_DIFF_TOOL     1752\r
 #ifndef APSTUDIO_READONLY_SYMBOLS\r
 #define _APS_NEXT_RESOURCE_VALUE        345\r
 #define _APS_NEXT_COMMAND_VALUE         32860\r
-#define _APS_NEXT_CONTROL_VALUE         1744\r
+#define _APS_NEXT_CONTROL_VALUE         1745\r
 #define _APS_NEXT_SYMED_VALUE           201\r
 #endif\r
 #endif\r