aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--lib/widgets/ephy-arrow-toolbutton.c28
2 files changed, 24 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index 174f25149..03b8a9eb3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
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.
+
+2003-04-18 Marco Pesenti Gritti <marco@it.gnome.org>
+
* embed/ephy-history.c: (ephy_history_set_page_title),
(ephy_history_set_icon), (ephy_history_clear):
* embed/ephy-history.h:
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