]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/utilsres.cpp
ambiguous ctor call resolved
[wxWidgets.git] / src / gtk / utilsres.cpp
index 619a055713690a2132ab4da38cd9bcaa27af48ec..6082cd387e8063b352f780224c20b2ecb82e3614 100644 (file)
 #include "wx/utils.h"
 #include "wx/string.h"
 #include "wx/list.h"
 #include "wx/utils.h"
 #include "wx/string.h"
 #include "wx/list.h"
+#include "wx/log.h"
+#include "wx/gdicmn.h"
 
 #include <ctype.h>
 #include <string.h>
 #include <unistd.h>
 
 #include <ctype.h>
 #include <string.h>
 #include <unistd.h>
-#ifdef __SVR4__
-#include <sys/systeminfo.h>
-#endif
+//#ifdef __SVR4__
+//#include <sys/systeminfo.h>
+//#endif
 
 #include "gdk/gdkx.h"        // GDK_DISPLAY
 #include "gdk/gdkprivate.h"  // gdk_progclass
 
 #include "gdk/gdkx.h"        // GDK_DISPLAY
 #include "gdk/gdkprivate.h"  // gdk_progclass
@@ -30,7 +32,6 @@
 #include <X11/Xutil.h>
 #include <X11/Xresource.h>
 
 #include <X11/Xutil.h>
 #include <X11/Xresource.h>
 
-#include "wx/log.h"
 
 //-----------------------------------------------------------------------------
 // constants
 
 //-----------------------------------------------------------------------------
 // constants
@@ -74,7 +75,7 @@ static wxChar *GetResourcePath(wxChar *buf, wxChar *name, bool create)
     if (create) 
     {
         // Touch the file to create it
     if (create) 
     {
         // Touch the file to create it
-        FILE *fd = fopen(wxConv_file.cWX2MB(buf), "w");
+        FILE *fd = fopen(wxConvCurrent->cWX2MB(buf), "w");
         if (fd) fclose(fd);
     }
     return buf;
         if (fd) fclose(fd);
     }
     return buf;
@@ -85,7 +86,7 @@ static wxChar *GetResourcePath(wxChar *buf, wxChar *name, bool create)
 // the Real User, then determine the Real home dir.
 static wxChar *GetIniFile(wxChar *dest, const wxChar *filename)
 {
 // the Real User, then determine the Real home dir.
 static wxChar *GetIniFile(wxChar *dest, const wxChar *filename)
 {
-    wxChar *home = (wxChar *) NULL;
+    const wxChar *home = (const wxChar *) NULL;
     if (filename && wxIsAbsolutePath(filename))
     {
       wxStrcpy(dest, filename);
     if (filename && wxIsAbsolutePath(filename))
     {
       wxStrcpy(dest, filename);
@@ -139,7 +140,7 @@ static void wxXMergeDatabases()
     else 
     {
         (void)GetIniFile(filename, (wxChar *) NULL);
     else 
     {
         (void)GetIniFile(filename, (wxChar *) NULL);
-        serverDB = XrmGetFileDatabase(wxConv_file.cWX2MB(filename));
+        serverDB = XrmGetFileDatabase(wxConvCurrent->cWX2MB(filename));
     }
     if (serverDB)
         XrmMergeDatabases(serverDB, &wxResourceDatabase);
     }
     if (serverDB)
         XrmMergeDatabases(serverDB, &wxResourceDatabase);
@@ -169,10 +170,10 @@ static void wxXMergeDatabases()
 #endif
 #endif
 #if wxUSE_UNICODE
 #endif
 #endif
 #if wxUSE_UNICODE
-       wxStrcat(environment, wxConv_libc.cMB2WX(hostbuf));
+       wxStrcat(environment, wxConvCurrent->cMB2WX(hostbuf));
 #endif
     }
 #endif
     }
-    if ((homeDB = XrmGetFileDatabase(wxConv_file.cWX2MB(environment))))
+    if ((homeDB = XrmGetFileDatabase(wxConvCurrent->cWX2MB(environment))))
         XrmMergeDatabases(homeDB, &wxResourceDatabase);
 }
 
         XrmMergeDatabases(homeDB, &wxResourceDatabase);
 }
 
@@ -192,7 +193,7 @@ void wxFlushResources()
         (void)GetResourcePath(nameBuffer, file, TRUE);
 
         XrmDatabase database = (XrmDatabase)node->Data();
         (void)GetResourcePath(nameBuffer, file, TRUE);
 
         XrmDatabase database = (XrmDatabase)node->Data();
-        XrmPutFileDatabase(database, wxConv_file.cWX2MB(nameBuffer));
+        XrmPutFileDatabase(database, wxConvCurrent->cWX2MB(nameBuffer));
         XrmDestroyDatabase(database);
         wxNode *next = node->Next();
 //        delete node;
         XrmDestroyDatabase(database);
         wxNode *next = node->Next();
 //        delete node;
@@ -231,7 +232,7 @@ bool wxWriteResource(const wxString& section, const wxString& entry, const wxStr
     if (node)
         database = (XrmDatabase)node->Data();
     else {
     if (node)
         database = (XrmDatabase)node->Data();
     else {
-        database = XrmGetFileDatabase(wxConv_file.cWX2MB(buffer));
+        database = XrmGetFileDatabase(wxConvCurrent->cWX2MB(buffer));
         wxLogTrace(wxTraceResAlloc, _T("Write: Number = %d"), wxTheResourceCache->Number());
         wxTheResourceCache->Append(buffer, (wxObject *)database);
     }
         wxLogTrace(wxTraceResAlloc, _T("Write: Number = %d"), wxTheResourceCache->Number());
         wxTheResourceCache->Append(buffer, (wxObject *)database);
     }
@@ -285,7 +286,7 @@ bool wxGetResource(const wxString& section, const wxString& entry, char **value,
         }
         else
         {
         }
         else
         {
-            database = XrmGetFileDatabase(wxConv_file.cWX2MB(buffer));
+            database = XrmGetFileDatabase(wxConvCurrent->cWX2MB(buffer));
             wxLogTrace(wxTraceResAlloc, _T("Get: Number = %d"), wxTheResourceCache->Number());
             wxTheResourceCache->Append(buffer, (wxObject *)database);
         }
             wxLogTrace(wxTraceResAlloc, _T("Get: Number = %d"), wxTheResourceCache->Number());
             wxTheResourceCache->Append(buffer, (wxObject *)database);
         }