- wxCHECK_RET( m_widget != NULL, _T("invalid button") );
-
- wxControl::SetLabel( label );
-
- gtk_label_set( GTK_LABEL( GTK_BUTTON(m_widget)->child ), GetLabel().mbc_str() );
+ wxCHECK_RET( m_widget != NULL, wxT("invalid button") );
+
+ wxString label(lbl);
+
+ if (label.empty() && wxIsStockID(m_windowId))
+ label = wxGetStockLabel(m_windowId);
+
+ wxControl::SetLabel(label);
+
+ const wxString labelGTK = GTKRemoveMnemonics(label);
+
+ gtk_label_set(GTK_LABEL(BUTTON_CHILD(m_widget)), wxGTK_CONV(labelGTK));
+}
+
+bool wxButton::Enable( bool enable )
+{
+ if ( !wxControl::Enable( enable ) )
+ return FALSE;
+
+ gtk_widget_set_sensitive( BUTTON_CHILD(m_widget), enable );
+
+ return TRUE;
+}
+
+bool wxButton::IsOwnGtkWindow( GdkWindow *window )
+{
+ return (window == m_widget->window);
+}
+
+void wxButton::DoApplyWidgetStyle(GtkRcStyle *style)
+{
+ gtk_widget_modify_style(m_widget, style);
+ gtk_widget_modify_style(BUTTON_CHILD(m_widget), style);