If compiling with WXGTK20, set wxConvCurrent to wxConvUTF8, as all

gtk+ 1.3.1's widgets (except the deprecated/obsoleted ones) work
solely with UTF-8. (I knew my forward thinking regarding wxConvCurrent
would pay off someday...)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@7777 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Ove Kaaven 2000-07-19 08:47:46 +00:00
parent 4aefa363ef
commit 2d4dc3a4d0
2 changed files with 18 additions and 2 deletions

View File

@ -284,8 +284,13 @@ bool wxApp::OnInitGui()
if ((gdk_visual_get_best() != gdk_visual_get_system()) &&
(m_useBestVisual))
{
#ifdef __WXGTK20__
/* seems gtk_widget_set_default_visual no longer exists? */
GdkVisual* vis = gtk_widget_get_default_visual();
#else
GdkVisual* vis = gdk_visual_get_best();
gtk_widget_set_default_visual( vis );
#endif
GdkColormap *colormap = gdk_colormap_new( vis, FALSE );
gtk_widget_set_default_colormap( colormap );
@ -590,7 +595,10 @@ int wxEntryStart( int argc, char *argv[] )
gtk_set_locale();
#if wxUSE_WCHAR_T
#if defined(__WXGTK20__)
// gtk+ 2.0 supports Unicode through UTF-8 strings
wxConvCurrent = &wxConvUTF8;
#elif wxUSE_WCHAR_T
if (!wxOKlibc()) wxConvCurrent = &wxConvLocal;
#else
if (!wxOKlibc()) wxConvCurrent = (wxMBConv*) NULL;

View File

@ -284,8 +284,13 @@ bool wxApp::OnInitGui()
if ((gdk_visual_get_best() != gdk_visual_get_system()) &&
(m_useBestVisual))
{
#ifdef __WXGTK20__
/* seems gtk_widget_set_default_visual no longer exists? */
GdkVisual* vis = gtk_widget_get_default_visual();
#else
GdkVisual* vis = gdk_visual_get_best();
gtk_widget_set_default_visual( vis );
#endif
GdkColormap *colormap = gdk_colormap_new( vis, FALSE );
gtk_widget_set_default_colormap( colormap );
@ -590,7 +595,10 @@ int wxEntryStart( int argc, char *argv[] )
gtk_set_locale();
#if wxUSE_WCHAR_T
#if defined(__WXGTK20__)
// gtk+ 2.0 supports Unicode through UTF-8 strings
wxConvCurrent = &wxConvUTF8;
#elif wxUSE_WCHAR_T
if (!wxOKlibc()) wxConvCurrent = &wxConvLocal;
#else
if (!wxOKlibc()) wxConvCurrent = (wxMBConv*) NULL;