Merge lp:~harshvardhan1618/pantheon-photos/fix-1425741 into lp:~pantheon-photos/pantheon-photos/trunk

Proposed by Harshvardhan Sharma
Status: Merged
Approved by: Danielle Foré
Approved revision: 2913
Merged at revision: 2914
Proposed branch: lp:~harshvardhan1618/pantheon-photos/fix-1425741
Merge into: lp:~pantheon-photos/pantheon-photos/trunk
Diff against target: 41 lines (+7/-13)
2 files modified
src/direct/DirectPhotoPage.vala (+7/-3)
src/direct/DirectWindow.vala (+0/-10)
To merge this branch: bzr merge lp:~harshvardhan1618/pantheon-photos/fix-1425741
Reviewer Review Type Date Requested Status
Photos Devs Pending
Review via email: mp+292334@code.launchpad.net

Commit message

Prevent inadvertently entering fullscreen mode while navigating.

Description of the change

This prevents the problem of inadvertently entering fullscreen mode while navigating.

To post a comment you must log in.
2913. By Harshvardhan Sharma <harshvardhan1618@launchpad>

Fix indentation

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/direct/DirectPhotoPage.vala'
2--- src/direct/DirectPhotoPage.vala 2015-08-09 02:34:44 +0000
3+++ src/direct/DirectPhotoPage.vala 2016-04-21 18:45:08 +0000
4@@ -316,9 +316,13 @@
5 }
6
7 protected override bool on_double_click (Gdk.EventButton event) {
8- AppWindow.get_instance ().end_fullscreen ();
9-
10- return base.on_double_click (event);
11+ if (AppWindow.get_fullscreen () != null) {
12+ AppWindow.get_instance ().end_fullscreen ();
13+ } else {
14+ File file = get_current_file ();
15+ AppWindow.get_instance ().go_fullscreen (new DirectFullscreenPhotoPage (file));
16+ }
17+ return true;
18 }
19
20 protected override void update_ui (bool missing) {
21
22=== modified file 'src/direct/DirectWindow.vala'
23--- src/direct/DirectWindow.vala 2014-09-02 19:42:49 +0000
24+++ src/direct/DirectWindow.vala 2016-04-21 18:45:08 +0000
25@@ -83,16 +83,6 @@
26 return (base.delete_event != null) ? base.delete_event (event) : false;
27 }
28
29- public override bool button_press_event (Gdk.EventButton event) {
30- if (event.type == Gdk.EventType.2BUTTON_PRESS) {
31- on_fullscreen ();
32-
33- return true;
34- }
35-
36- return false;
37- }
38-
39 public override bool key_press_event (Gdk.EventKey event) {
40 // check for an escape
41 if (Gdk.keyval_name (event.keyval) == "Escape") {

Subscribers

People subscribed via source and target branches