OSDN Git Service

PATCH: [ 2818451 ] Make color options hierarchical
authorKimmo Varis <kimmov@gmail.com>
Thu, 9 Jul 2009 06:27:46 +0000 (06:27 +0000)
committerKimmo Varis <kimmov@gmail.com>
Thu, 9 Jul 2009 06:27:46 +0000 (06:27 +0000)
Docs/Users/ChangeLog.txt
Src/Common/PreferencesDlg.cpp
Src/Common/PreferencesDlg.h
Src/Merge.rc
Src/resource.h

index 948ce26..1b94424 100644 (file)
@@ -5,6 +5,7 @@ http://winmerge.org/tracker/[tracker-id]
 
 WinMerge 2.13.9
   Update PCRE to version 7.9 (r6903)
+  Improve color options organization (#2818451)
   Bugfix: Did not export changed options values (#2799149)
   Bugfix: Don't highlight identical words if whitespaces are ignored (#2798360)
   Bugfix: Did not reset folder compare method back to original (#2803152)
index 3b825d7..942eb3a 100644 (file)
@@ -102,9 +102,9 @@ BOOL CPreferencesDlg::OnInitDialog()
        AddPage(&m_pageGeneral, IDS_OPTIONSPG_GENERAL);
        AddPage(&m_pageCompare, IDS_OPTIONSPG_COMPARE);
        AddPage(&m_pageEditor, IDS_OPTIONSPG_EDITOR);
-       AddPage(&m_pageMergeColors, IDS_OPTIONSPG_COLORS);
-       AddPage(&m_pageTextColors, IDS_OPTIONSPG_TEXTCOLORS);
-       AddPage(&m_pageSyntaxColors, IDS_OPTIONSPG_SYNTAXCOLORS);
+       AddPage(&m_pageMergeColors, IDS_OPTIONSPG_COLORS, IDS_OPTIONSPG_MERGECOLORS);
+       AddPage(&m_pageSyntaxColors, IDS_OPTIONSPG_COLORS, IDS_OPTIONSPG_SYNTAXCOLORS);
+       AddPage(&m_pageTextColors, IDS_OPTIONSPG_COLORS, IDS_OPTIONSPG_TEXTCOLORS);
        AddPage(&m_pageArchive, IDS_OPTIONSPG_ARCHIVE);
        AddPage(&m_pageSystem, IDS_OPTIONSPG_SYSTEM);
        AddPage(&m_pageBackups, IDS_OPTIONSPG_BACKUPS);
@@ -151,6 +151,14 @@ void CPreferencesDlg::AddPage(CPropertyPage* pPage, UINT nResourceID)
        AddPage(pPage, sPath.c_str());
 }
 
+void CPreferencesDlg::AddPage(CPropertyPage* pPage, UINT nTopHeading, UINT nSubHeading)
+{
+       String sPath = theApp.LoadString(nTopHeading);
+       sPath += _T(">");
+       sPath += theApp.LoadString(nSubHeading);
+       AddPage(pPage, sPath.c_str());
+}
+
 void CPreferencesDlg::AddPage(CPropertyPage* pPage, LPCTSTR szPath)
 {
        CString sPath(szPath);
index f1dcece..80646b4 100644 (file)
@@ -99,6 +99,7 @@ protected:
 protected:
        void AddPage(CPropertyPage* pPage, UINT nResourceID);
        void AddPage(CPropertyPage* pPage, LPCTSTR szPath);
+       void AddPage(CPropertyPage* pPage, UINT nTopHeading, UINT nSubHeading);
        void SetActivePage(int nPage);
        CString GetItemPath(HTREEITEM hti);
        void ReadOptions(BOOL bUpdate = FALSE);
index 7db0024..ef51743 100644 (file)
@@ -1956,14 +1956,15 @@ BEGIN
     IDS_OPTIONSPG_COMPARE   "Compare"
     IDS_OPTIONSPG_EDITOR    "Editor"
     IDS_OPTIONSPG_COLORS    "Colors"
-    IDS_OPTIONSPG_SYNTAXCOLORS "Syntax colors"
-    IDS_OPTIONSPG_TEXTCOLORS "Text Colors"
+    IDS_OPTIONSPG_SYNTAXCOLORS "Syntax"
+    IDS_OPTIONSPG_TEXTCOLORS "Text"
     IDS_OPTIONSPG_SYSTEM    "System"
     IDS_OPTIONSPG_VERSIONCONTROL "Version Control"
     IDS_OPTIONSPG_CODEPAGE  "Codepage"
     IDS_OPTIONSPG_ARCHIVE   "Archive Support"
     IDS_OPTIONSPG_BACKUPS   "Backup Files"
     IDS_OPTIONSPG_SHELL     "Shell Integration"
+    IDS_OPTIONSPG_MERGECOLORS "Merge"
 END
 
 // WINMERGE CUSTOM STRINGS
index 9b099a9..21990b6 100644 (file)
 #define IDS_OPTIONSPG_ARCHIVE           9050
 #define IDS_OPTIONSPG_BACKUPS           9051
 #define IDS_OPTIONSPG_SHELL             9052
+#define IDS_OPTIONSPG_MERGECOLORS       9053
 #define IDS_TO                          16000
 #define IDS_FROM_LEFT                   16001
 #define IDS_TO_LEFT                     16002