X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a7ac4461ab64212a536a8dabffc2ad65ef573a5f..b62c3631c9d769f3cd8e85c0f1298d9f09a919d2:/src/gtk1/statbox.cpp?ds=sidebyside diff --git a/src/gtk1/statbox.cpp b/src/gtk1/statbox.cpp index 2bef390337..84fd9673ff 100644 --- a/src/gtk1/statbox.cpp +++ b/src/gtk1/statbox.cpp @@ -13,6 +13,8 @@ #include "wx/statbox.h" +#if wxUSE_STATBOX + #include "gdk/gdk.h" #include "gtk/gtk.h" @@ -43,11 +45,9 @@ bool wxStaticBox::Create( wxWindow *parent, wxWindowID id, const wxString &label m_isStaticBox = TRUE; - m_widget = gtk_frame_new(m_label); - - m_parent->AddChild( this ); + m_widget = gtk_frame_new(m_label.mbc_str()); - (m_parent->m_insertCallback)( m_parent, this ); + m_parent->DoAddChild( this ); PostCreation(); @@ -66,7 +66,7 @@ void wxStaticBox::SetLabel( const wxString &label ) { wxControl::SetLabel( label ); GtkFrame *frame = GTK_FRAME( m_widget ); - gtk_frame_set_label( frame, GetLabel() ); + gtk_frame_set_label( frame, GetLabel().mbc_str() ); } void wxStaticBox::ApplyWidgetStyle() @@ -75,3 +75,4 @@ void wxStaticBox::ApplyWidgetStyle() gtk_widget_set_style( m_widget, m_widgetStyle ); } +#endif