}
m_widget = gtk_button_new_with_mnemonic("");
+ g_object_ref(m_widget);
float x_alignment = 0.5;
if (HasFlag(wxBU_LEFT))
gtk_button_set_label(GTK_BUTTON(m_widget), wxGTK_CONV(labelGTK));
gtk_button_set_use_stock(GTK_BUTTON(m_widget), FALSE);
- ApplyWidgetStyle( false );
+ GTKApplyWidgetStyle( false );
}
bool wxButton::Enable( bool enable )
{
+ bool isEnabled = IsEnabled();
+
if ( !wxControl::Enable( enable ) )
return false;
gtk_widget_set_sensitive(GTK_BIN(m_widget)->child, enable);
+ if (!isEnabled && enable)
+ {
+ GTKFixSensitivity();
+ }
+
return true;
}
GtkWidget *box = GTK_BIN(child)->child;
if ( GTK_IS_BOX(box) )
{
- GList *items = gtk_container_get_children(GTK_CONTAINER(box));
- for ( GList *item = items; item; item = item->next )
- gtk_widget_modify_style(GTK_WIDGET(item->data), style);
+ for (GList* item = GTK_BOX(box)->children; item; item = item->next)
+ {
+ GtkBoxChild* boxChild = static_cast<GtkBoxChild*>(item->data);
+ gtk_widget_modify_style(boxChild->widget, style);
+ }
}
}
}