Merge lp:~jeremywootten/audience/fix-keyboard-open-when-no-file into lp:~audience-members/audience/trunk

Proposed by Jeremy Wootten
Status: Merged
Approved by: Felipe Escoto
Approved revision: 586
Merged at revision: 586
Proposed branch: lp:~jeremywootten/audience/fix-keyboard-open-when-no-file
Merge into: lp:~audience-members/audience/trunk
Diff against target: 41 lines (+12/-5)
1 file modified
src/Window.vala (+12/-5)
To merge this branch: bzr merge lp:~jeremywootten/audience/fix-keyboard-open-when-no-file
Reviewer Review Type Date Requested Status
Felipe Escoto (community) Approve
Review via email: mp+297138@code.launchpad.net

Commit message

Do not resume when no current video & corrected "Spacebar" behavior

Description of the change

If there is no last played video in settings and if the "Space" key or "p" key is pressed at the Welcome page then audience shows a blank window. This branch fixes this bug. When there is no current video then resume_last_video () launches the file chooser.

To post a comment you must log in.
Revision history for this message
Felipe Escoto (philip.scott) wrote :

Fixes this, and pressing Space skiping the video!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Window.vala'
2--- src/Window.vala 2016-03-19 19:19:13 +0000
3+++ src/Window.vala 2016-06-12 13:09:12 +0000
4@@ -100,10 +100,6 @@
5 case Gdk.Key.o:
6 run_open_file ();
7 return true;
8- case Gdk.Key.p:
9- case Gdk.Key.space:
10- resume_last_videos ();
11- return true;
12 case Gdk.Key.q:
13 destroy ();
14 return true;
15@@ -184,6 +180,13 @@
16 default:
17 break;
18 }
19+ } else {
20+ switch (e.keyval) {
21+ case Gdk.Key.p:
22+ case Gdk.Key.space:
23+ resume_last_videos ();
24+ return true;
25+ }
26 }
27
28 return false;
29@@ -234,7 +237,11 @@
30 }
31
32 public void resume_last_videos () {
33- play_file (settings.current_video, false);
34+ if (settings.current_video != "") {
35+ play_file (settings.current_video, false);
36+ } else {
37+ run_open_file ();
38+ }
39 }
40
41 public void run_open_dvd () {

Subscribers

People subscribed via source and target branches