aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-go-action.c
diff options
context:
space:
mode:
authorDiego Escalante Urrelo <diegoe@gnome.org>2007-04-16 15:18:37 +0800
committerDiego Escalante Urrelo <diegoe@src.gnome.org>2007-04-16 15:18:37 +0800
commit18099b317e67629b2581297d5a35a3a2d3dbab3e (patch)
tree416d8dc783621df4062d39ca4a8c8ff7d3f69cee /src/ephy-go-action.c
parentbfc6a9ce3f3aca0721c83ce58f98e4343694df29 (diff)
downloadgsoc2013-epiphany-18099b317e67629b2581297d5a35a3a2d3dbab3e.tar
gsoc2013-epiphany-18099b317e67629b2581297d5a35a3a2d3dbab3e.tar.gz
gsoc2013-epiphany-18099b317e67629b2581297d5a35a3a2d3dbab3e.tar.bz2
gsoc2013-epiphany-18099b317e67629b2581297d5a35a3a2d3dbab3e.tar.lz
gsoc2013-epiphany-18099b317e67629b2581297d5a35a3a2d3dbab3e.tar.xz
gsoc2013-epiphany-18099b317e67629b2581297d5a35a3a2d3dbab3e.tar.zst
gsoc2013-epiphany-18099b317e67629b2581297d5a35a3a2d3dbab3e.zip
Middle clicking the Go button should open the location bar address content
2007-04-16 Diego Escalante Urrelo <diegoe@gnome.org> * src/ephy-go-action.c: Middle clicking the Go button should open the location bar address content in a new tab. Bug #362591. svn path=/trunk/; revision=6996
Diffstat (limited to 'src/ephy-go-action.c')
-rw-r--r--src/ephy-go-action.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/ephy-go-action.c b/src/ephy-go-action.c
index 25e5e5e53..a7a0c29b4 100644
--- a/src/ephy-go-action.c
+++ b/src/ephy-go-action.c
@@ -79,6 +79,15 @@ create_tool_item (GtkAction *action)
}
static void
+button_clicked_cb (GtkWidget *widget,
+ GdkEventButton *event,
+ gpointer user_data)
+{
+ if (event->button == 1 || event->button == 2)
+ gtk_action_activate (GTK_ACTION (user_data));
+}
+
+static void
connect_proxy (GtkAction *action,
GtkWidget *proxy)
{
@@ -86,9 +95,9 @@ connect_proxy (GtkAction *action,
if (GTK_IS_TOOL_ITEM (proxy))
{
- g_signal_connect_object (GTK_BIN (proxy)->child, "clicked",
- G_CALLBACK (gtk_action_activate), action,
- G_CONNECT_SWAPPED);
+ g_signal_connect (GTK_BIN (proxy)->child, "button-press-event",
+ G_CALLBACK (button_clicked_cb), action
+ );
}
}