• R/O
  • SSH
  • HTTPS

tortoisesvn: Commit


Commit MetaInfo

Revision29335 (tree)
Time2022-01-14 02:57:56
Authorstefankueng

Log Message

refactor settings page setup, based on TGit 36edbb11db5d5c7148705f5d96757c337b065243

Change Summary

Incremental Difference

--- trunk/src/TortoiseProc/Settings/Settings.cpp (revision 29334)
+++ trunk/src/TortoiseProc/Settings/Settings.cpp (revision 29335)
@@ -1,6 +1,6 @@
11 // TortoiseSVN - a Windows shell extension for easy version control
22
3-// Copyright (C) 2003-2015, 2020-2021 - TortoiseSVN
3+// Copyright (C) 2003-2015, 2020-2022 - TortoiseSVN
44
55 // This program is free software; you can redistribute it and/or
66 // modify it under the terms of the GNU General Public License
@@ -53,6 +53,12 @@
5353 }
5454 }
5555
56+void CSettings::AddPropPage(ISettingsPropPage* page)
57+{
58+ AddPage(page);
59+ SetPageIcon(page, page->GetIconID());
60+}
61+
5662 void CSettings::AddPropPages()
5763 {
5864 PWSTR pszPath = nullptr;
@@ -91,59 +97,34 @@
9197 m_pAdvanced = new CSettingsAdvanced();
9298 m_pSyncPage = new CSettingsSync();
9399 m_pUDiffPage = new CSettingsUDiff();
94-
95- SetPageIcon(m_pMainPage, m_pMainPage->GetIconID());
96- SetPageIcon(m_pOverlayPage, m_pOverlayPage->GetIconID());
97- SetPageIcon(m_pOverlaysPage, m_pOverlaysPage->GetIconID());
98- SetPageIcon(m_pOverlayHandlersPage, m_pOverlayHandlersPage->GetIconID());
99- SetPageIcon(m_pProxyPage, m_pProxyPage->GetIconID());
100- SetPageIcon(m_pProgsDiffPage, m_pProgsDiffPage->GetIconID());
101- SetPageIcon(m_pProgsMergePage, m_pProgsMergePage->GetIconID());
102- SetPageIcon(m_pLookAndFeelPage, m_pLookAndFeelPage->GetIconID());
103- if (IsWindows10OrGreater())
104- SetPageIcon(m_pWin11ContextMenu, m_pWin11ContextMenu->GetIconID());
105- SetPageIcon(m_pDialogsPage, m_pDialogsPage->GetIconID());
106- SetPageIcon(m_pRevisionGraphPage, m_pRevisionGraphPage->GetIconID());
107- SetPageIcon(m_pRevisionGraphColorsPage, m_pRevisionGraphColorsPage->GetIconID());
108- SetPageIcon(m_pMiscPage, m_pMiscPage->GetIconID());
109- SetPageIcon(m_pDialogs3Page, m_pDialogs3Page->GetIconID());
110- SetPageIcon(m_pLogCachePage, m_pLogCachePage->GetIconID());
111- SetPageIcon(m_pLogCacheListPage, m_pLogCacheListPage->GetIconID());
112- SetPageIcon(m_pColorsPage, m_pColorsPage->GetIconID());
113- SetPageIcon(m_pSavedPage, m_pSavedPage->GetIconID());
114- SetPageIcon(m_pHooksPage, m_pHooksPage->GetIconID());
115- SetPageIcon(m_pBugTraqPage, m_pBugTraqPage->GetIconID());
116- SetPageIcon(m_pTBlamePage, m_pTBlamePage->GetIconID());
117- SetPageIcon(m_pAdvanced, m_pAdvanced->GetIconID());
118- SetPageIcon(m_pSyncPage, m_pSyncPage->GetIconID());
119- SetPageIcon(m_pUDiffPage, m_pUDiffPage->GetIconID());
120-
100+
121101 // don't change the order here, since the
122102 // page number can be passed on the command line!
123- AddPage(m_pMainPage);
124- AddPage(m_pRevisionGraphPage);
125- AddPage(m_pRevisionGraphColorsPage);
126- AddPage(m_pOverlayPage);
127- AddPage(m_pOverlaysPage);
128- AddPage(m_pOverlayHandlersPage);
129- AddPage(m_pProxyPage);
130- AddPage(m_pProgsDiffPage);
131- AddPage(m_pProgsMergePage);
132- AddPage(m_pLookAndFeelPage);
133- AddPage(m_pWin11ContextMenu);
134- AddPage(m_pDialogsPage);
135- AddPage(m_pMiscPage);
136- AddPage(m_pDialogs3Page);
137- AddPage(m_pColorsPage);
138- AddPage(m_pSavedPage);
139- AddPage(m_pLogCachePage);
140- AddPage(m_pLogCacheListPage);
141- AddPage(m_pHooksPage);
142- AddPage(m_pBugTraqPage);
143- AddPage(m_pTBlamePage);
144- AddPage(m_pUDiffPage);
145- AddPage(m_pSyncPage);
146- AddPage(m_pAdvanced);
103+ AddPropPage(m_pMainPage);
104+ AddPropPage(m_pRevisionGraphPage);
105+ AddPropPage(m_pRevisionGraphColorsPage);
106+ AddPropPage(m_pOverlayPage);
107+ AddPropPage(m_pOverlaysPage);
108+ AddPropPage(m_pOverlayHandlersPage);
109+ AddPropPage(m_pProxyPage);
110+ AddPropPage(m_pProgsDiffPage);
111+ AddPropPage(m_pProgsMergePage);
112+ AddPropPage(m_pLookAndFeelPage);
113+ if (IsWindows10OrGreater())
114+ AddPropPage(m_pWin11ContextMenu);
115+ AddPropPage(m_pDialogsPage);
116+ AddPropPage(m_pMiscPage);
117+ AddPropPage(m_pDialogs3Page);
118+ AddPropPage(m_pColorsPage);
119+ AddPropPage(m_pSavedPage);
120+ AddPropPage(m_pLogCachePage);
121+ AddPropPage(m_pLogCacheListPage);
122+ AddPropPage(m_pHooksPage);
123+ AddPropPage(m_pBugTraqPage);
124+ AddPropPage(m_pTBlamePage);
125+ AddPropPage(m_pUDiffPage);
126+ AddPropPage(m_pSyncPage);
127+ AddPropPage(m_pAdvanced);
147128 }
148129
149130 void CSettings::RemovePropPages() const
--- trunk/src/TortoiseProc/Settings/Settings.h (revision 29334)
+++ trunk/src/TortoiseProc/Settings/Settings.h (revision 29335)
@@ -1,6 +1,6 @@
11 // TortoiseSVN - a Windows shell extension for easy version control
22
3-// Copyright (C) 2003-2010, 2012-2015, 2020-2021 - TortoiseSVN
3+// Copyright (C) 2003-2010, 2012-2015, 2020-2022 - TortoiseSVN
44
55 // This program is free software; you can redistribute it and/or
66 // modify it under the terms of the GNU General Public License
@@ -70,6 +70,8 @@
7070 */
7171 void RemovePropPages() const;
7272
73+ void AddPropPage(ISettingsPropPage* page);
74+
7375 private:
7476 CSetMainPage* m_pMainPage;
7577 CSetProxyPage* m_pProxyPage;
@@ -96,8 +98,8 @@
9698 CSettingsSync* m_pSyncPage;
9799 CSettingsUDiff* m_pUDiffPage;
98100
99- HICON m_hIcon;
100- AeroControlBase m_aeroControls;
101+ HICON m_hIcon;
102+ AeroControlBase m_aeroControls;
101103
102104 public:
103105 CSettings(UINT nIDCaption, CWnd* pParentWnd = nullptr, UINT iSelectPage = 0);
Show on old repository browser