aboutsummaryrefslogtreecommitdiffstats
path: root/lib/widgets
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-04-19 01:48:01 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-04-19 01:48:01 +0800
commit94c177286f98d5ae22669eed8ed1e48fbf1e5ebe (patch)
tree34d7c2e579bbf5a85df2c39d30eac5a6a9d543cd /lib/widgets
parent4a4d612e4177cb4fc080324f60f57682c408b01a (diff)
downloadgsoc2013-epiphany-94c177286f98d5ae22669eed8ed1e48fbf1e5ebe.tar
gsoc2013-epiphany-94c177286f98d5ae22669eed8ed1e48fbf1e5ebe.tar.gz
gsoc2013-epiphany-94c177286f98d5ae22669eed8ed1e48fbf1e5ebe.tar.bz2
gsoc2013-epiphany-94c177286f98d5ae22669eed8ed1e48fbf1e5ebe.tar.lz
gsoc2013-epiphany-94c177286f98d5ae22669eed8ed1e48fbf1e5ebe.tar.xz
gsoc2013-epiphany-94c177286f98d5ae22669eed8ed1e48fbf1e5ebe.tar.zst
gsoc2013-epiphany-94c177286f98d5ae22669eed8ed1e48fbf1e5ebe.zip
Fix the bug with back/fwd buttons auto prelighting.
2003-04-18 Marco Pesenti Gritti <marco@it.gnome.org> * lib/widgets/ephy-arrow-toolbutton.c: (button_state_changed_cb): Fix the bug with back/fwd buttons auto prelighting.
Diffstat (limited to 'lib/widgets')
-rw-r--r--lib/widgets/ephy-arrow-toolbutton.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/lib/widgets/ephy-arrow-toolbutton.c b/lib/widgets/ephy-arrow-toolbutton.c
index abc5ed4f2..e769abd34 100644
--- a/lib/widgets/ephy-arrow-toolbutton.c
+++ b/lib/widgets/ephy-arrow-toolbutton.c
@@ -103,22 +103,30 @@ button_state_changed_cb (GtkWidget *widget,
EphyArrowToolButtonPrivate *p = b->priv;
GtkWidget *button;
GtkStateType state = GTK_WIDGET_STATE (widget);
- GtkStateType other;
-
- if (state == GTK_STATE_ACTIVE ||
- state == GTK_STATE_SELECTED ||
- state == GTK_STATE_INSENSITIVE)
- {
- return;
- }
button = (widget == p->arrow_widget) ? p->button : p->arrow_widget;
- other = GTK_WIDGET_STATE (button);
- if (state != other)
+ g_signal_handlers_block_by_func
+ (G_OBJECT (button),
+ G_CALLBACK (button_state_changed_cb),
+ b);
+ if (state == GTK_STATE_PRELIGHT &&
+ previous_state != GTK_STATE_ACTIVE)
{
gtk_widget_set_state (button, state);
}
+ else if (state == GTK_STATE_NORMAL)
+ {
+ gtk_widget_set_state (button, state);
+ }
+ else if (state == GTK_STATE_ACTIVE)
+ {
+ gtk_widget_set_state (button, GTK_STATE_NORMAL);
+ }
+ g_signal_handlers_unblock_by_func
+ (G_OBJECT (button),
+ G_CALLBACK (button_state_changed_cb),
+ b);
}
static void