X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a81258bee4e20d3fa9b3d2f6bf3bcd1200d1e5e0..1ee17e1c421b64b3a356fee82f454ab4b43ab50c:/src/gtk1/utilsres.cpp diff --git a/src/gtk1/utilsres.cpp b/src/gtk1/utilsres.cpp index 1d6f714528..d14f938bde 100644 --- a/src/gtk1/utilsres.cpp +++ b/src/gtk1/utilsres.cpp @@ -109,7 +109,7 @@ static char *GetIniFile(char *dest, const char *filename) return dest; } -static void wxXMergeDatabases(void) +static void wxXMergeDatabases() { XrmDatabase homeDB, serverDB, applicationDB; char filenamebuf[1024]; @@ -159,13 +159,14 @@ static void wxXMergeDatabases(void) // called on application exit //----------------------------------------------------------------------------- -void wxFlushResources(void) +void wxFlushResources() { char nameBuffer[512]; wxNode *node = wxTheResourceCache->First(); while (node) { - char *file = node->key.string; + wxString str = node->GetKeyString(); + char *file = WXSTRINGCAST str; // If file doesn't exist, create it first. (void)GetResourcePath(nameBuffer, file, TRUE); @@ -254,10 +255,14 @@ bool wxGetResource(const wxString& section, const wxString& entry, char **value, // home directory instead of current directory -- JACS (void)GetIniFile(buffer, file); - wxNode *node = wxTheResourceCache->Find(buffer); + wxNode *node = (wxNode*) NULL; /* suppress egcs warning */ + node = wxTheResourceCache->Find(buffer); if (node) + { database = (XrmDatabase)node->Data(); - else { + } + else + { database = XrmGetFileDatabase(buffer); wxLogTrace(wxTraceResAlloc, "Get: Number = %d", wxTheResourceCache->Number()); wxTheResourceCache->Append(buffer, (wxObject *)database);