[epiphany] e-web-view: enable back/forward mouse buttons
- From: Diego Escalante Urrelo <diegoe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] e-web-view: enable back/forward mouse buttons
- Date: Tue, 11 Dec 2012 18:43:18 +0000 (UTC)
commit 8c53252b99184e5ebbbd871cef90ac77b64a28c9
Author: Diego Escalante Urrelo <diegoe igalia com>
Date: Tue Dec 11 13:27:45 2012 -0500
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 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 2acc8b5..332b9d4 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]