aboutsummaryrefslogtreecommitdiffstats
path: root/embed/ephy-web-view.c
diff options
context:
space:
mode:
authorDiego Escalante Urrelo <diegoe@igalia.com>2012-12-12 02:27:45 +0800
committerDiego Escalante Urrelo <diegoe@igalia.com>2012-12-12 02:30:04 +0800
commit8c53252b99184e5ebbbd871cef90ac77b64a28c9 (patch)
tree1cc751e3a7332533a0320572db9c5087dc72946d /embed/ephy-web-view.c
parent3cdb5f74351503dbab7b5db82764a2eba80a3a19 (diff)
downloadgsoc2013-epiphany-8c53252b99184e5ebbbd871cef90ac77b64a28c9.tar
gsoc2013-epiphany-8c53252b99184e5ebbbd871cef90ac77b64a28c9.tar.gz
gsoc2013-epiphany-8c53252b99184e5ebbbd871cef90ac77b64a28c9.tar.bz2
gsoc2013-epiphany-8c53252b99184e5ebbbd871cef90ac77b64a28c9.tar.lz
gsoc2013-epiphany-8c53252b99184e5ebbbd871cef90ac77b64a28c9.tar.xz
gsoc2013-epiphany-8c53252b99184e5ebbbd871cef90ac77b64a28c9.tar.zst
gsoc2013-epiphany-8c53252b99184e5ebbbd871cef90ac77b64a28c9.zip
e-web-view: enable back/forward mouse buttons
Based on nautilus' (nautilus-window.c) button numbers and the bugzilla reports by users. Thank you Vincas Dargis and Joe Barnett for the previous patches. https://bugzilla.gnome.org/show_bug.cgi?id=337852
Diffstat (limited to 'embed/ephy-web-view.c')
-rw-r--r--embed/ephy-web-view.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 2acc8b513..332b9d47d 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -517,6 +517,17 @@ ephy_web_view_button_press_event (GtkWidget *widget, GdkEventButton *event)
if (event->button == 3 && event->state == GDK_CONTROL_MASK)
return FALSE;
+ /* Handle typical back/forward mouse buttons. */
+ if (event->button == 8) {
+ webkit_web_view_go_back (WEBKIT_WEB_VIEW (widget));
+ return TRUE;
+ }
+
+ if (event->button == 9) {
+ webkit_web_view_go_forward (WEBKIT_WEB_VIEW (widget));
+ return TRUE;
+ }
+
/* Let WebKitWebView handle this. */
return GTK_WIDGET_CLASS (ephy_web_view_parent_class)->button_press_event (widget, event);
}