X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/be5a51fb592f3fa2ba38ac6cd1e488d6d806058c..2934005d7daecb4343b394d9faabc86c8d04dca2:/utils/configtool/src/appsettings.cpp diff --git a/utils/configtool/src/appsettings.cpp b/utils/configtool/src/appsettings.cpp index 4eecaf4ca4..17f4a0f70b 100644 --- a/utils/configtool/src/appsettings.cpp +++ b/utils/configtool/src/appsettings.cpp @@ -6,35 +6,36 @@ // Created: 2002-09-04 // RCS-ID: $Id$ // Copyright: (c) Julian Smart -// Licence: +// Licence: ///////////////////////////////////////////////////////////////////////////// #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "appsettings.h" #endif -#include "wx/wx.h" +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop #endif #ifndef WX_PRECOMP -#include "wx/wx.h" -#endif -#include "wx/wfstream.h" #include "wx/datstrm.h" -#include "wx/config.h" -#include "wx/fileconf.h" #include "wx/dir.h" -#include "wx/valgen.h" #include "wx/colordlg.h" #include "wx/wxhtml.h" #include "wx/effects.h" #include "wx/spinctrl.h" #include "wx/tooltip.h" +#endif + +#include "wx/wfstream.h" +#include "wx/config.h" +#include "wx/fileconf.h" +#include "wx/valgen.h" #include "utils.h" #include "wxconfigtool.h" #include "appsettings.h" @@ -51,8 +52,8 @@ IMPLEMENT_DYNAMIC_CLASS(ctSettings, wxObject) ctSettings::ctSettings() { m_noUses = 0; - m_showToolBar = TRUE; - m_showWelcomeDialog = TRUE; + m_showToolBar = true; + m_showWelcomeDialog = true; m_exportDir = wxEmptyString; m_frameSize = wxRect(10, 10, 600, 500); @@ -61,20 +62,20 @@ ctSettings::ctSettings() m_appName = wxT("wxWidgets Configuration Tool"); m_appNameShort = wxT("Configuration Tool"); - m_showSplashScreen = FALSE; + m_showSplashScreen = false; m_userName = wxEmptyString; m_frameStatus = ctSHOW_STATUS_NORMAL; - m_loadLastDocument = TRUE; - m_firstTimeRun = TRUE; - m_smallToolbar = TRUE; + m_loadLastDocument = true; + m_firstTimeRun = true; + m_smallToolbar = true; m_mainSashSize = 200; - m_useToolTips = TRUE; - m_showTrayIcon = TRUE; - m_trayIconIsShown = FALSE; - m_useEnvironmentVariable = TRUE; + m_useToolTips = true; + m_showTrayIcon = true; + m_trayIconIsShown = false; + m_useEnvironmentVariable = true; m_frameworkDir = wxEmptyString; - m_matchWholeWord = FALSE; - m_matchCase = FALSE; + m_matchWholeWord = false; + m_matchCase = false; m_defaultFileKind = wxT("Setup file"); } @@ -85,10 +86,6 @@ ctSettings::ctSettings(const ctSettings& settings) } -ctSettings::~ctSettings() -{ -} - void ctSettings::operator = (const ctSettings& settings) { Copy(settings); @@ -129,7 +126,7 @@ bool ctSettings::Init() if (m_userName.IsEmpty()) m_userName = wxGetUserName(); - return TRUE; + return true; } // Create new filename @@ -212,13 +209,13 @@ bool ctSettings::LoadConfig() // facility just in case it's trying to load a damaged file. if (runningProgram != 0) { - m_loadLastDocument = FALSE; + m_loadLastDocument = false; } #endif config.Write(wxT("Misc/RunningProgram"), (long) 1); - return TRUE; + return true; } // Save config info @@ -264,13 +261,13 @@ bool ctSettings::SaveConfig() // Indicate that we're no longer running, so we know if the program // crashed last time around. config.Write(wxT("Misc/RunningProgram"), (long) 0); - + { config.SetPath(wxT("FileHistory/")); wxGetApp().GetDocManager()->FileHistorySave(config); } - return TRUE; + return true; } void ctSettings::ShowSettingsDialog(const wxString& WXUNUSED(page))