X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d9ab621ea2513f623f3f7c1699648f189e37be3f..3a39df31ff47004a46cfb06f3fb2d3e317f96d2b:/utils/configtool/src/appsettings.cpp diff --git a/utils/configtool/src/appsettings.cpp b/utils/configtool/src/appsettings.cpp index 22b5571acc..0016aa669d 100644 --- a/utils/configtool/src/appsettings.cpp +++ b/utils/configtool/src/appsettings.cpp @@ -29,6 +29,7 @@ #include "wx/effects.h" #include "wx/spinctrl.h" #include "wx/tooltip.h" +#include "wx/settings.h" #endif @@ -58,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"); @@ -80,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); @@ -127,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; @@ -137,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(); @@ -200,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 @@ -265,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);