]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/configtool/src/appsettings.cpp
Fix include dirs for windres, enable emxbind to actually produce output,
[wxWidgets.git] / utils / configtool / src / appsettings.cpp
index 22b5571acc467d15e312feaabb0ac0cce67a8d06..c683cedb7536218a8f2dca632703fbc987fef447 100644 (file)
@@ -9,10 +9,6 @@
 // Licence:
 /////////////////////////////////////////////////////////////////////////////
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma implementation "appsettings.h"
-#endif
-
 // For compilers that support precompilation, includes "wx/wx.h".
 #include "wx/wxprec.h"
 
@@ -29,6 +25,7 @@
 #include "wx/effects.h"
 #include "wx/spinctrl.h"
 #include "wx/tooltip.h"
+#include "wx/settings.h"
 
 #endif
 
@@ -58,7 +55,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 +77,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 +120,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 +130,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 +193,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 +258,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);