GtkButton: Remove unneeded gtk_style_context_notify_state_change() calls

There is now code to handle this for one-item widgets (such as GtkButton)
in gtk_widget_set_state_flags()
This commit is contained in:
Carlos Garnacho 2010-11-24 03:04:20 +01:00
parent 2f0b5d8a9d
commit 9c0ef02ea5

View File

@ -1762,18 +1762,6 @@ gtk_button_enter_notify (GtkWidget *widget,
{
priv->in_button = TRUE;
gtk_button_enter (button);
if (gtk_widget_get_realized (widget) &&
gtk_widget_is_drawable (widget))
{
GtkStyleContext *context;
context = gtk_widget_get_style_context (widget);
gtk_style_context_notify_state_change (context,
gtk_widget_get_window (widget),
NULL, GTK_STATE_PRELIGHT,
button->in_button);
}
}
return FALSE;
@ -1792,18 +1780,6 @@ gtk_button_leave_notify (GtkWidget *widget,
{
priv->in_button = FALSE;
gtk_button_leave (button);
if (gtk_widget_get_realized (widget) &&
gtk_widget_is_drawable (widget))
{
GtkStyleContext *context;
context = gtk_widget_get_style_context (widget);
gtk_style_context_notify_state_change (context,
gtk_widget_get_window (widget),
NULL, GTK_STATE_PRELIGHT,
button->in_button);
}
}
return FALSE;
@ -2292,18 +2268,6 @@ _gtk_button_set_depressed (GtkButton *button,
if (depressed != priv->depressed)
{
if (gtk_widget_get_realized (widget) &&
gtk_widget_is_drawable (widget))
{
GtkStyleContext *context;
context = gtk_widget_get_style_context (widget);
gtk_style_context_notify_state_change (context,
gtk_widget_get_window (widget),
NULL, GTK_STATE_ACTIVE,
depressed);
}
priv->depressed = depressed;
gtk_widget_queue_resize (widget);
}