]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/utilsgtk.cpp
return correct client area for at least the primary display, fixes the problems with...
[wxWidgets.git] / src / gtk / utilsgtk.cpp
index 72757f441ba6560126389d28288dad429e9ed7af..698225a0beb75acad1a38317df6c00a6ce5dc1a3 100644 (file)
@@ -209,6 +209,17 @@ wxCharBuffer wxConvertToGTK(const wxString& s, wxFontEncoding enc)
     return wxConvUTF8.cWC2MB(wbuf);
 }
 
+wxCharBuffer wxConvertFromGTK(const wxString& s, wxFontEncoding enc)
+{
+    // this conversion should never fail as GTK+ always uses UTF-8 internally
+    // so there are no complications here
+    const wxWCharBuffer wbuf(wxConvUTF8.cMB2WC(s));
+    if ( enc == wxFONTENCODING_SYSTEM )
+        return wxConvUI->cWC2MB(wbuf);
+
+    return wxCSConv(enc).cWC2MB(wbuf);
+}
+
 #endif // !wxUSE_UNICODE
 
 // ----------------------------------------------------------------------------