X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4fe30bceff0445f540e639d2b6d3977d56b34020..3a39df31ff47004a46cfb06f3fb2d3e317f96d2b:/utils/configtool/src/appsettings.cpp diff --git a/utils/configtool/src/appsettings.cpp b/utils/configtool/src/appsettings.cpp index 56af6008d0..0016aa669d 100644 --- a/utils/configtool/src/appsettings.cpp +++ b/utils/configtool/src/appsettings.cpp @@ -13,28 +13,30 @@ #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" +#include "wx/settings.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" @@ -57,7 +59,7 @@ ctSettings::ctSettings() m_frameSize = wxRect(10, 10, 600, 500); // m_backgroundColour = wxColour(140, 172, 179); // blue-grey - m_editWindowFont = wxSystemSettings::GetSystemFont(wxSYS_DEFAULT_GUI_FONT); + m_editWindowFont = wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT); m_appName = wxT("wxWidgets Configuration Tool"); m_appNameShort = wxT("Configuration Tool"); @@ -79,16 +81,12 @@ ctSettings::ctSettings() } // Copy constructor -ctSettings::ctSettings(const ctSettings& settings) +ctSettings::ctSettings(const ctSettings& settings) : wxObject() { Copy(settings); } -ctSettings::~ctSettings() -{ -} - void ctSettings::operator = (const ctSettings& settings) { Copy(settings); @@ -126,7 +124,7 @@ void ctSettings::Copy (const ctSettings& settings) bool ctSettings::Init() { m_lastSetupSaveDir = wxEmptyString; - if (m_userName.IsEmpty()) + if (m_userName.empty()) m_userName = wxGetUserName(); return true; @@ -136,7 +134,7 @@ bool ctSettings::Init() wxString ctSettings::GenerateFilename(const wxString& rootName) { wxString path; - if (!m_lastFilename.IsEmpty()) + if (!m_lastFilename.empty()) path = wxPathOnly(m_lastFilename); else path = wxGetApp().GetAppDir(); @@ -199,7 +197,7 @@ bool ctSettings::LoadConfig() fontSpec = wxEmptyString; config.Read(wxT("Style/EditWindowFont"), & fontSpec); - if (!fontSpec.IsEmpty()) + if (!fontSpec.empty()) m_editWindowFont = apStringToFont(fontSpec); // Crash-resistance @@ -264,7 +262,7 @@ 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);