Merge lp:~mpdeimos/nuvola-player/bug-1065602 into lp:nuvola-player/2.5.x

Proposed by Martin Pöhlmann
Status: Merged
Approved by: Jiří Janoušek
Approved revision: 783
Merged at revision: 801
Proposed branch: lp:~mpdeimos/nuvola-player/bug-1065602
Merge into: lp:nuvola-player/2.5.x
Diff against target: 37 lines (+20/-0)
1 file modified
src/nuvola/gui/mainwebview.vala (+20/-0)
To merge this branch: bzr merge lp:~mpdeimos/nuvola-player/bug-1065602
Reviewer Review Type Date Requested Status
Jiří Janoušek Approve
Review via email: mp+200248@code.launchpad.net

Description of the change

Implements Bug #1065602:
Mouse back/forward button interaction

To post a comment you must log in.
Revision history for this message
Jiří Janoušek (fenryxo) wrote :

Approved.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/nuvola/gui/mainwebview.vala'
2--- src/nuvola/gui/mainwebview.vala 2013-08-15 20:08:26 +0000
3+++ src/nuvola/gui/mainwebview.vala 2014-01-01 09:11:35 +0000
4@@ -103,6 +103,8 @@
5
6 navigation_policy_decision_requested.connect(on_new_page);
7 new_window_policy_decision_requested.connect(on_new_window);
8+
9+ button_release_event.connect(on_mouse_button_released);
10 }
11
12 public override WebKit.WebView create_web_view(WebFrame frame){
13@@ -230,6 +232,24 @@
14 }
15
16 /**
17+ * Handles special mouse buttons (back & forward navigation)
18+ */
19+ private bool on_mouse_button_released(Gdk.EventButton button)
20+ {
21+ switch (button.button)
22+ {
23+ case 8: // mouse back button
24+ go_back();
25+ return true;
26+ case 9: // mouse forward button
27+ go_forward();
28+ return true;
29+ default: // ignore all other buttons
30+ return false;
31+ }
32+ }
33+
34+ /**
35 * Logs debug message with libfenryxo domain // FIXME
36 * @param format format string
37 */

Subscribers

People subscribed via source and target branches