Merge lp:~vikoadi/audience/fix-hide-bottombar into lp:~audience-members/audience/trunk

Proposed by Viko Adi Rahmawan
Status: Merged
Approved by: Cody Garver
Approved revision: 486
Merged at revision: 497
Proposed branch: lp:~vikoadi/audience/fix-hide-bottombar
Merge into: lp:~audience-members/audience/trunk
Diff against target: 95 lines (+14/-6)
2 files modified
src/Audience.vala (+7/-2)
src/Widgets/BottomBar.vala (+7/-4)
To merge this branch: bzr merge lp:~vikoadi/audience/fix-hide-bottombar
Reviewer Review Type Date Requested Status
Audience Members Pending
Review via email: mp+249635@code.launchpad.net

Commit message

Fix hiding progress bar and cursor (lp:1407380)

Description of the change

fix audience progress bar and cursor doesnt want to disappear

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Audience.vala'
2--- src/Audience.vala 2015-01-07 10:29:27 +0000
3+++ src/Audience.vala 2015-02-13 12:57:23 +0000
4@@ -494,6 +494,7 @@
5 } else {
6 video_player.seek_jump_seconds (-60); // 1 min
7 }
8+ bottom_bar.reveal_control ();
9 break;
10 case Gdk.Key.Left:
11 if (modifier_is_pressed (e, Gdk.ModifierType.SHIFT_MASK)) {
12@@ -501,6 +502,7 @@
13 } else {
14 video_player.seek_jump_seconds (-10); // 10 secs
15 }
16+ bottom_bar.reveal_control ();
17 break;
18 case Gdk.Key.Right:
19 if (modifier_is_pressed (e, Gdk.ModifierType.SHIFT_MASK)) {
20@@ -508,6 +510,7 @@
21 } else {
22 video_player.seek_jump_seconds (10); // 10 secs
23 }
24+ bottom_bar.reveal_control ();
25 break;
26 case Gdk.Key.Up:
27 if (modifier_is_pressed (e, Gdk.ModifierType.SHIFT_MASK)) {
28@@ -515,12 +518,15 @@
29 } else {
30 video_player.seek_jump_seconds (60); // 1 min
31 }
32+ bottom_bar.reveal_control ();
33 break;
34 case Gdk.Key.Page_Down:
35 video_player.seek_jump_seconds (-600); // 10 mins
36+ bottom_bar.reveal_control ();
37 break;
38 case Gdk.Key.Page_Up:
39 video_player.seek_jump_seconds (600); // 10 mins
40+ bottom_bar.reveal_control ();
41 break;
42 case Gdk.Key.a:
43 bottom_bar.preferences_popover.next_audio ();
44@@ -614,8 +620,7 @@
45 bottom_bar.get_preferred_height (out minimum, out bottom_bar_size);
46 }
47
48- if (bottom_bar.child_revealed == false)
49- bottom_bar.set_reveal_child (true);
50+ bottom_bar.reveal_control ();
51
52 return false;
53 }
54
55=== modified file 'src/Widgets/BottomBar.vala'
56--- src/Widgets/BottomBar.vala 2014-11-30 22:16:12 +0000
57+++ src/Widgets/BottomBar.vala 2015-02-13 12:57:23 +0000
58@@ -76,7 +76,7 @@
59
60 notify["hovered"].connect (() => {
61 if (hovered == false) {
62- set_timeout ();
63+ reveal_control ();
64 } else {
65 if (hiding_timer != 0) {
66 Source.remove (hiding_timer);
67@@ -117,7 +117,7 @@
68 if (is_playing == true) {
69 play_button.image = new Gtk.Image.from_icon_name ("media-playback-pause-symbolic", Gtk.IconSize.BUTTON);
70 play_button.tooltip_text = _("Pause");
71- set_timeout ();
72+ reveal_control ();
73 } else {
74 play_button.image = new Gtk.Image.from_icon_name ("media-playback-start-symbolic", Gtk.IconSize.BUTTON);
75 play_button.tooltip_text = _("Play");
76@@ -125,7 +125,7 @@
77 }
78 }
79
80- public new void set_reveal_child (bool reveal) {
81+ private new void set_reveal_child (bool reveal) {
82 base.set_reveal_child (reveal);
83 if (reveal == true && fullscreen == true) {
84 unfullscreen_revealer.set_reveal_child (reveal);
85@@ -149,7 +149,10 @@
86 time_widget.set_progression_time (current_time, total_time);
87 }
88
89- private void set_timeout () {
90+ public void reveal_control () {
91+ if (child_revealed == false)
92+ set_reveal_child (true);
93+
94 if (hiding_timer != 0)
95 Source.remove (hiding_timer);
96

Subscribers

People subscribed via source and target branches