34 return wxString(t.c_str(), wxConvLocal);
48 #if defined __WXMSW__ && !wxCHECK_VERSION(3,1,1)
52 void HuginCHMHelpController::DisplayHelpPage(
const wxString& name)
56 wxString command(GetValidFilename());
57 command.Append(wxT(
"::"));
59 CallHtmlHelp(GetParentWindow(), command.t_str(), 0 );
64 #include <wx/confbase.h>
65 #include <wx/gdicmn.h>
70 wxConfigBase* config = wxConfigBase::Get();
72 wxDisplaySize(&dw, &dh);
75 config->Read(
"/wxWindows/wxHtmlHelpController/hcX", &x, wxDefaultCoord);
76 config->Read(
"/wxWindows/wxHtmlHelpController/hcY", &y, wxDefaultCoord);
77 config->Read(
"/wxWindows/wxHtmlHelpController/hcW", &w, 700);
78 config->Read(
"/wxWindows/wxHtmlHelpController/hcH", &h, 480);
82 config->Write(
"/wxWindows/wxHtmlHelpController/hcW", w);
87 config->Write(
"/wxWindows/wxHtmlHelpController/hcH", h);
92 config->Write(
"/wxWindows/wxHtmlHelpController/hcX", x);
94 if (y<-1 || y>dh - 100)
97 config->Write(
"/wxWindows/wxHtmlHelpController/hcY", y);
102 #if defined __WXGTK__ && wxCHECK_VERSION(3,1,1)
103 #include <wx/stdpaths.h>
105 #include <wx/filename.h>
106 void CheckConfigFilename()
108 wxStandardPaths& paths = wxStandardPaths::Get();
110 const wxFileName oldConfigFile (paths.GetUserConfigDir(), paths.MakeConfigFileName(wxTheApp->GetAppName(), wxStandardPaths::ConfigFileConv_Dot));
112 paths.SetFileLayout(wxStandardPaths::FileLayout_XDG);
113 if (oldConfigFile.FileExists())
116 const wxFileName newConfigFile(paths.GetUserConfigDir(), paths.MakeConfigFileName(wxTheApp->GetAppName(), wxStandardPaths::ConfigFileConv_Dot));
118 if (!newConfigFile.FileExists())
120 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.