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:
@@ -284,8 +284,13 @@ bool wxApp::OnInitGui()
|
|||||||
if ((gdk_visual_get_best() != gdk_visual_get_system()) &&
|
if ((gdk_visual_get_best() != gdk_visual_get_system()) &&
|
||||||
(m_useBestVisual))
|
(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();
|
GdkVisual* vis = gdk_visual_get_best();
|
||||||
gtk_widget_set_default_visual( vis );
|
gtk_widget_set_default_visual( vis );
|
||||||
|
#endif
|
||||||
|
|
||||||
GdkColormap *colormap = gdk_colormap_new( vis, FALSE );
|
GdkColormap *colormap = gdk_colormap_new( vis, FALSE );
|
||||||
gtk_widget_set_default_colormap( colormap );
|
gtk_widget_set_default_colormap( colormap );
|
||||||
@@ -590,7 +595,10 @@ int wxEntryStart( int argc, char *argv[] )
|
|||||||
|
|
||||||
gtk_set_locale();
|
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;
|
if (!wxOKlibc()) wxConvCurrent = &wxConvLocal;
|
||||||
#else
|
#else
|
||||||
if (!wxOKlibc()) wxConvCurrent = (wxMBConv*) NULL;
|
if (!wxOKlibc()) wxConvCurrent = (wxMBConv*) NULL;
|
||||||
|
@@ -284,8 +284,13 @@ bool wxApp::OnInitGui()
|
|||||||
if ((gdk_visual_get_best() != gdk_visual_get_system()) &&
|
if ((gdk_visual_get_best() != gdk_visual_get_system()) &&
|
||||||
(m_useBestVisual))
|
(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();
|
GdkVisual* vis = gdk_visual_get_best();
|
||||||
gtk_widget_set_default_visual( vis );
|
gtk_widget_set_default_visual( vis );
|
||||||
|
#endif
|
||||||
|
|
||||||
GdkColormap *colormap = gdk_colormap_new( vis, FALSE );
|
GdkColormap *colormap = gdk_colormap_new( vis, FALSE );
|
||||||
gtk_widget_set_default_colormap( colormap );
|
gtk_widget_set_default_colormap( colormap );
|
||||||
@@ -590,7 +595,10 @@ int wxEntryStart( int argc, char *argv[] )
|
|||||||
|
|
||||||
gtk_set_locale();
|
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;
|
if (!wxOKlibc()) wxConvCurrent = &wxConvLocal;
|
||||||
#else
|
#else
|
||||||
if (!wxOKlibc()) wxConvCurrent = (wxMBConv*) NULL;
|
if (!wxOKlibc()) wxConvCurrent = (wxMBConv*) NULL;
|
||||||
|
Reference in New Issue
Block a user