From 3b2e67f6724e14638eedf6c790b6ba9a42b36979 Mon Sep 17 00:00:00 2001 From: Robert Roebling Date: Sat, 17 Aug 2002 17:35:36 +0000 Subject: [PATCH] Another UNicode conversion fix. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16572 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/gtk/stattext.cpp | 9 +++++++-- src/gtk1/stattext.cpp | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/gtk/stattext.cpp b/src/gtk/stattext.cpp index 6afa92e419..255ecb25f8 100644 --- a/src/gtk/stattext.cpp +++ b/src/gtk/stattext.cpp @@ -109,8 +109,13 @@ bool wxStaticText::Create(wxWindow *parent, wxString wxStaticText::GetLabel() const { - char *str = (char *) NULL; - gtk_label_get( GTK_LABEL(m_widget), &str ); + GtkLabel *label = GTK_LABEL(m_widget); + +#ifdef __WXGTK20__ + wxString str = wxGTK_CONV_BACK( gtk_label_get_text( label ) ); +#else + wxString str = wxString( label->label ); +#endif return wxString(str); } diff --git a/src/gtk1/stattext.cpp b/src/gtk1/stattext.cpp index 6afa92e419..255ecb25f8 100644 --- a/src/gtk1/stattext.cpp +++ b/src/gtk1/stattext.cpp @@ -109,8 +109,13 @@ bool wxStaticText::Create(wxWindow *parent, wxString wxStaticText::GetLabel() const { - char *str = (char *) NULL; - gtk_label_get( GTK_LABEL(m_widget), &str ); + GtkLabel *label = GTK_LABEL(m_widget); + +#ifdef __WXGTK20__ + wxString str = wxGTK_CONV_BACK( gtk_label_get_text( label ) ); +#else + wxString str = wxString( label->label ); +#endif return wxString(str); } -- 2.45.2