diff options
author | Manuel Kaufmann <humitos@gmail.com> | 2013-01-24 19:33:03 (GMT) |
---|---|---|
committer | Gonzalo Odiard <godiard@gmail.com> | 2013-01-25 13:58:39 (GMT) |
commit | 5ab425e6aa455c65a0566b1f0044d537b8a316b3 (patch) | |
tree | a871c6f75758bc31fa52dd32cfff9d1979e9fd10 | |
parent | 2c39f29eec38a6d43f65342d154db0d961b1c7fc (diff) |
Unfullscreen when no more streams
If the user is watching a video in full screen and it finishes, we
unfullscreen the activity and show the playlist again.
Signed-off-by: Manuel Kaufmann <humitos@gmail.com>
-rw-r--r-- | activity.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/activity.py b/activity.py index c88c7f1..8f080e3 100644 --- a/activity.py +++ b/activity.py @@ -91,6 +91,7 @@ class JukeboxActivity(activity.Activity): toolbar_box.show_all() self.connect('key_press_event', self.__key_press_event_cb) + self.connect('no-stream', self.__no_stream_cb) # We want to be notified when the activity gets the focus or # loses it. When it is not active, we don't need to keep @@ -188,6 +189,11 @@ class JukeboxActivity(activity.Activity): self.control._button_clicked_cb(None) return True + def __no_stream_cb(self, widget): + self._switch_canvas(show_video=False) + self._view_toolbar._show_playlist.set_active(True) + self.unfullscreen() + def songchange(self, direction): current_playing = self.playlist_widget._current_playing if direction == 'prev' and current_playing > 0: @@ -197,7 +203,6 @@ class JukeboxActivity(activity.Activity): self.play_index(current_playing + 1) else: - self._switch_canvas(show_video=False) self.emit('no-stream') def play_index(self, index): |