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