[gtk+/gtk-style-context: 481/540] GtkButton: Remove unneeded gtk_style_context_notify_state_change() calls
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/gtk-style-context: 481/540] GtkButton: Remove unneeded gtk_style_context_notify_state_change() calls
- Date: Fri, 3 Dec 2010 03:16:33 +0000 (UTC)
commit 04ea12d46671126a169f1b947279a2806831c954
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Nov 24 03:04:20 2010 +0100
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()
gtk/gtkbutton.c | 36 ------------------------------------
1 files changed, 0 insertions(+), 36 deletions(-)
---
diff --git a/gtk/gtkbutton.c b/gtk/gtkbutton.c
index 4390424..cbfbdcb 100644
--- a/gtk/gtkbutton.c
+++ b/gtk/gtkbutton.c
@@ -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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]