X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4d23a4bf410a7988864899b39fafaec8b3034f10..da00a8bb164dd1f58dd0bb211475538a375867b4:/src/gtk/statbox.cpp?ds=sidebyside diff --git a/src/gtk/statbox.cpp b/src/gtk/statbox.cpp index fdc5f6eb5e..22c946136c 100644 --- a/src/gtk/statbox.cpp +++ b/src/gtk/statbox.cpp @@ -58,12 +58,7 @@ bool wxStaticBox::Create( wxWindow *parent, return FALSE; } - m_isStaticBox = TRUE; - - if (label.empty()) - m_widget = gtk_frame_new( (char*) NULL ); - else - m_widget = gtk_frame_new( m_label.mbc_str() ); + m_widget = gtk_frame_new(label.empty() ? (char *)NULL : label.mbc_str()); m_parent->DoAddChild( this ); @@ -84,7 +79,7 @@ bool wxStaticBox::Create( wxWindow *parent, if ( xalign ) gtk_frame_set_label_align(GTK_FRAME( m_widget ), xalign, 0.0); - + Show( TRUE ); return TRUE; @@ -94,7 +89,8 @@ void wxStaticBox::SetLabel( const wxString &label ) { wxControl::SetLabel( label ); - gtk_frame_set_label( GTK_FRAME( m_widget ), GetLabel().mbc_str() ); + gtk_frame_set_label( GTK_FRAME( m_widget ), + label.empty() ? (char *)NULL : label.mbc_str() ); } void wxStaticBox::ApplyWidgetStyle()