X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bd046d42215b11a898c3519889c8170134cb749a..7706daf38b2be342f2f5650f37f57ad7b4b3dccb:/src/gtk1/utilsres.cpp diff --git a/src/gtk1/utilsres.cpp b/src/gtk1/utilsres.cpp index cf8a946da7..69c6097176 100644 --- a/src/gtk1/utilsres.cpp +++ b/src/gtk1/utilsres.cpp @@ -7,10 +7,13 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -//#ifdef __GNUG__ +//#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) //#pragma implementation "utils.h" //#endif +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + #include "wx/utils.h" #include "wx/string.h" #include "wx/list.h" @@ -58,27 +61,27 @@ bool wxWriteResource(const wxString& section, const wxString& entry, int value, return wxWriteResource(section, entry, buf, file); } -bool wxGetResource(const wxString& section, const wxString& entry, char **value, const wxString& file ) +bool wxGetResource(const wxString& section, const wxString& entry, wxChar **value, const wxString& file ) { wxString filename( file ); if (filename.IsEmpty()) filename = wxT(".wxWindows"); - + wxFileConfig conf( wxTheApp->GetAppName(), wxTheApp->GetVendorName(), filename ); - + conf.SetPath( section ); - + wxString result; - if (conf.Write( entry, &result )) + if (conf.Read( entry, &result )) { if (!result.IsEmpty()) - { - char *s = new char[result.Len()+1]; - wxStrcpy( s, result.c_str() ); - *value = s; - return TRUE; - } + { + wxChar *s = new wxChar[result.Len()+1]; + wxStrcpy( s, result.c_str() ); + *value = s; + return TRUE; + } } - + return FALSE; }