1 // TortoiseMerge - a Diff/Patch program
\r
3 // Copyright (C) 2006 - Stefan Kueng
\r
5 // This program is free software; you can redistribute it and/or
\r
6 // modify it under the terms of the GNU General Public License
\r
7 // as published by the Free Software Foundation; either version 2
\r
8 // of the License, or (at your option) any later version.
\r
10 // This program is distributed in the hope that it will be useful,
\r
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
13 // GNU General Public License for more details.
\r
15 // You should have received a copy of the GNU General Public License
\r
16 // along with this program; if not, write to the Free Software Foundation,
\r
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
\r
20 #include "Settings.h"
\r
21 #include "SetMainPage.h"
\r
22 #include "SetColorPage.h"
\r
24 IMPLEMENT_DYNAMIC(CSettings, CPropertySheet)
\r
25 CSettings::CSettings(UINT nIDCaption, CWnd* pParentWnd, UINT iSelectPage)
\r
26 :CPropertySheet(nIDCaption, pParentWnd, iSelectPage)
\r
30 CSettings::CSettings(LPCTSTR pszCaption, CWnd* pParentWnd, UINT iSelectPage)
\r
31 :CPropertySheet(pszCaption, pParentWnd, iSelectPage)
\r
36 CSettings::~CSettings()
\r
41 void CSettings::AddPropPages()
\r
43 m_pMainPage = new CSetMainPage();
\r
44 m_pColorPage = new CSetColorPage();
\r
46 AddPage(m_pMainPage);
\r
47 AddPage(m_pColorPage);
\r
50 void CSettings::RemovePropPages()
\r
53 delete m_pColorPage;
\r
56 void CSettings::SaveData()
\r
58 m_pMainPage->SaveData();
\r
59 m_pColorPage->SaveData();
\r
62 BOOL CSettings::IsReloadNeeded() const
\r
64 BOOL bReload = FALSE;
\r
65 bReload = (m_pMainPage->m_bReloadNeeded || bReload);
\r
66 bReload = (m_pColorPage->m_bReloadNeeded || bReload);
\r
70 BEGIN_MESSAGE_MAP(CSettings, CPropertySheet)
\r
74 // CSettings message handlers
\r
76 BOOL CSettings::OnInitDialog()
\r
78 BOOL bResult = CPropertySheet::OnInitDialog();
\r