1. misc compilation (errors, warnings) fixes (from the build logs)

2. fixed a bug in wxGTK::wxGetResource


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5118 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-12-26 21:52:50 +00:00
parent 6957717a00
commit 9c2882d9e1
11 changed files with 44 additions and 50 deletions

View File

@@ -62,23 +62,23 @@ bool wxGetResource(const wxString& section, const wxString& entry, char **value,
{
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;
}
wxStrcpy( s, result.c_str() );
*value = s;
return TRUE;
}
}
return FALSE;
}