From 8c53252b99184e5ebbbd871cef90ac77b64a28c9 Mon Sep 17 00:00:00 2001 From: Diego Escalante Urrelo Date: Tue, 11 Dec 2012 13:27:45 -0500 Subject: 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 --- embed/ephy-web-view.c | 11 +++++++++++ 1 file changed, 11 insertions(+) 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); } -- cgit v1.2.3