X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c67daf87774c71ae9f73af9969008af220e52a11..cce4b3fe2b05e1d928d7a5930c33c624b2f3a667:/src/gtk/utilsres.cpp diff --git a/src/gtk/utilsres.cpp b/src/gtk/utilsres.cpp index ec34009cba..d14f938bde 100644 --- a/src/gtk/utilsres.cpp +++ b/src/gtk/utilsres.cpp @@ -2,8 +2,7 @@ // Name: utils.cpp // Purpose: // Author: Robert Roebling -// Created: 01/02/97 -// Id: +// Id: $Id$ // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -110,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]; @@ -160,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); @@ -255,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);