34 return wxString(t.c_str(), wxConvLocal);
49 #include <wx/confbase.h>
50 #include <wx/gdicmn.h>
55 wxConfigBase* config = wxConfigBase::Get();
57 wxDisplaySize(&dw, &dh);
60 config->Read(
"/wxWindows/wxHtmlHelpController/hcX", &x, wxDefaultCoord);
61 config->Read(
"/wxWindows/wxHtmlHelpController/hcY", &y, wxDefaultCoord);
62 config->Read(
"/wxWindows/wxHtmlHelpController/hcW", &w, 700);
63 config->Read(
"/wxWindows/wxHtmlHelpController/hcH", &h, 480);
67 config->Write(
"/wxWindows/wxHtmlHelpController/hcW", w);
72 config->Write(
"/wxWindows/wxHtmlHelpController/hcH", h);
77 config->Write(
"/wxWindows/wxHtmlHelpController/hcX", x);
79 if (y<-1 || y>dh - 100)
82 config->Write(
"/wxWindows/wxHtmlHelpController/hcY", y);
88 #include <wx/stdpaths.h>
90 #include <wx/filename.h>
91 void CheckConfigFilename()
93 wxStandardPaths& paths = wxStandardPaths::Get();
95 const wxFileName oldConfigFile (paths.GetUserConfigDir(), paths.MakeConfigFileName(wxTheApp->GetAppName(), wxStandardPaths::ConfigFileConv_Dot));
97 paths.SetFileLayout(wxStandardPaths::FileLayout_XDG);
98 if (oldConfigFile.FileExists())
101 const wxFileName newConfigFile(paths.GetUserConfigDir(), paths.MakeConfigFileName(wxTheApp->GetAppName(), wxStandardPaths::ConfigFileConv_Dot));
103 if (!newConfigFile.FileExists())
105 wxRenameFile(oldConfigFile.GetFullPath(), newConfigFile.GetFullPath());
bool str2double(const wxString &s, double &d)
wxString doubleTowxString(double d, int digits)
std::string doubleToString(double d, int digits)
convert a double to a string, suitable for display within a GUI.
bool stringToDouble(const STR &str_, double &dest)
convert a string to a double, ignore localisation.