]> git.saurik.com Git - wxWidgets.git/commitdiff
added wxConvUI which determines the conversion used for the UI elements and can be...
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 11 Apr 2006 00:36:24 +0000 (00:36 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 11 Apr 2006 00:36:24 +0000 (00:36 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38665 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

docs/latex/wx/mbconv.tex
include/wx/strconv.h
src/common/strconv.cpp
src/gtk/utilsgtk.cpp

index b91107369fefc6fcbcaf5792873ce2d931131019..3f11aa58948214bf2ccf3056f7571abf7a244da9 100644 (file)
@@ -32,6 +32,11 @@ There are several predefined instances of this class:
 current locale.}
 \twocolitem{\textbf{wxConvLocal}}{Another conversion corresponding to the
 current locale but this one uses the best available conversion.}
+\twocolitem{\textbf{wxConvUI}}{The conversion used for hte standard UI elements
+such as menu items and buttons. This is a pointer which is initially set to
+\texttt{wxConvLocal} as the program uses the current locale by default but can
+be set to some specific conversion if the program needs to use a specific
+encoding for its UI.}
 \twocolitem{\textbf{wxConvISO8859\_1}}{Conversion to and from ISO-8859-1 (Latin I)
 encoding.}
 \twocolitem{\textbf{wxConvUTF8}}{Conversion to and from UTF-8 encoding.}
index 477c9de9679542e8b86990ee9f2fbff075e23f46..c56ae9af2f206189494de646f46fc8e2864116e5 100644 (file)
@@ -438,6 +438,12 @@ extern WXDLLIMPEXP_DATA_BASE(wxMBConv *) wxConvCurrent;
 // the conversion corresponding to the current locale
 extern WXDLLIMPEXP_DATA_BASE(wxCSConv&) wxConvLocal;
 
+// the conversion corresponding to the encoding of the standard UI elements
+//
+// by default this is the same as wxConvLocal but may be changed if the program
+// needs to use a fixed encoding
+extern WXDLLIMPEXP_DATA_BASE(wxMBConv *) wxConvUI;
+
 // ----------------------------------------------------------------------------
 // endianness-dependent conversions
 // ----------------------------------------------------------------------------
index 3f00282a39f7840ac47003c47458e257b56b4e53..f92260934f525674dfd2de9a4e8f42fdc6a97465 100644 (file)
@@ -3395,6 +3395,7 @@ WXDLLIMPEXP_DATA_BASE(wxCSConv&) wxConvISO8859_1 = wxConvISO8859_1Obj;
 WXDLLIMPEXP_DATA_BASE(wxMBConvUTF7&) wxConvUTF7 = wxConvUTF7Obj;
 WXDLLIMPEXP_DATA_BASE(wxMBConvUTF8&) wxConvUTF8 = wxConvUTF8Obj;
 WXDLLIMPEXP_DATA_BASE(wxMBConv *) wxConvCurrent = &wxConvLibcObj;
+WXDLLIMPEXP_DATA_BASE(wxMBConv *) wxConvUI = &wxConvLocal;
 WXDLLIMPEXP_DATA_BASE(wxMBConv *) wxConvFileName = &
 #ifdef __WXOSX__
                                     wxConvUTF8Obj;
@@ -3402,7 +3403,6 @@ WXDLLIMPEXP_DATA_BASE(wxMBConv *) wxConvFileName = &
                                     wxConvLibcObj;
 #endif
 
-
 #else // !wxUSE_WCHAR_T
 
 // stand-ins in absence of wchar_t
index 35dd71d871ee0f46c3fee1fdd81611886a6e978f..cb2455bbcd8abe3cc4649d37f17606e843af3348 100644 (file)
@@ -193,7 +193,7 @@ wxCharBuffer wxConvertToGTK(const wxString& s, wxFontEncoding enc)
     wxWCharBuffer wbuf;
     if ( enc == wxFONTENCODING_SYSTEM || enc == wxFONTENCODING_DEFAULT )
     {
-        wbuf = wxConvLocal.cMB2WC(s);
+        wbuf = wxConvUI->cMB2WC(s);
     }
     else // another encoding, use generic conversion class
     {