aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks
diff options
context:
space:
mode:
authorDavid Bordoley <bordoley@msu.edu>2003-04-25 21:53:00 +0800
committerDave Bordoley <Bordoley@src.gnome.org>2003-04-25 21:53:00 +0800
commit33a47e1d4cc08edd1006d3bfd85b7a15d350119d (patch)
tree15a989151f89fb51024a9affe2e34f62a292db95 /src/bookmarks
parent06b0667718c7dc86bcd189af92688f2e664fab60 (diff)
downloadgsoc2013-epiphany-33a47e1d4cc08edd1006d3bfd85b7a15d350119d.tar
gsoc2013-epiphany-33a47e1d4cc08edd1006d3bfd85b7a15d350119d.tar.gz
gsoc2013-epiphany-33a47e1d4cc08edd1006d3bfd85b7a15d350119d.tar.bz2
gsoc2013-epiphany-33a47e1d4cc08edd1006d3bfd85b7a15d350119d.tar.lz
gsoc2013-epiphany-33a47e1d4cc08edd1006d3bfd85b7a15d350119d.tar.xz
gsoc2013-epiphany-33a47e1d4cc08edd1006d3bfd85b7a15d350119d.tar.zst
gsoc2013-epiphany-33a47e1d4cc08edd1006d3bfd85b7a15d350119d.zip
Connect to the "toggled" signal instead of "button_press_event" so that
2003-04-25 David Bordoley <bordoley@msu.edu> * src/bookmarks/ephy-topic-action.c: (button_toggled_cb), (connect_proxy): Connect to the "toggled" signal instead of "button_press_event" so that keynav works.
Diffstat (limited to 'src/bookmarks')
-rw-r--r--src/bookmarks/ephy-topic-action.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/bookmarks/ephy-topic-action.c b/src/bookmarks/ephy-topic-action.c
index 8755dfa8a..4c6319c75 100644
--- a/src/bookmarks/ephy-topic-action.c
+++ b/src/bookmarks/ephy-topic-action.c
@@ -264,17 +264,14 @@ build_menu (EphyTopicAction *action)
}
}
-static gboolean
-button_press_cb (GtkWidget *button,
- GdkEventButton *event,
- EphyTopicAction *action)
+static void
+button_toggled_cb (GtkWidget *button,
+ EphyTopicAction *action)
{
- if (event->button == 1)
- {
- GtkWidget *menu;
-
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button), TRUE);
+ GtkWidget *menu;
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button)))
+ {
menu = build_menu (action);
g_signal_connect (menu, "deactivate",
G_CALLBACK (menu_deactivate_cb), button);
@@ -283,7 +280,6 @@ button_press_cb (GtkWidget *button,
button, 1, gtk_get_current_event_time ());
}
- return FALSE;
}
static void
@@ -298,8 +294,8 @@ connect_proxy (EggAction *action, GtkWidget *proxy)
G_CALLBACK (ephy_topic_action_sync_label), proxy, 0);
button = GTK_WIDGET (g_object_get_data (G_OBJECT (proxy), "button"));
- g_signal_connect (button, "button_press_event",
- G_CALLBACK (button_press_cb), action);
+ g_signal_connect (button, "toggled",
+ G_CALLBACK (button_toggled_cb), action);
}
static void