[gnome-music/gnome-3-16] Properly add notification to overlay and track timeout_adds
- From: Vadim Rutkovsky <vrutkovsky src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/gnome-3-16] Properly add notification to overlay and track timeout_adds
- Date: Tue, 11 Aug 2015 17:40:18 +0000 (UTC)
commit 528a6277b77dd687bc880c72acb6dc05c021bc5e
Author: Vadim Rutkovsky <vrutkovs redhat com>
Date: Tue Aug 11 19:39:43 2015 +0200
Properly add notification to overlay and track timeout_adds
gnomemusic/window.py | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gnomemusic/window.py b/gnomemusic/window.py
index 3f66cf1..df28567 100644
--- a/gnomemusic/window.py
+++ b/gnomemusic/window.py
@@ -69,6 +69,7 @@ class Window(Gtk.ApplicationWindow):
self.add_action(selectNone)
self.set_size_request(200, 100)
self.set_icon_name('gnome-music')
+ self.notification_handler = None
self.prev_view = None
self.curr_view = None
@@ -321,8 +322,11 @@ class Window(Gtk.ApplicationWindow):
label = Gtk.Label.new(_("Loading"))
grid.add(label)
self.notification.add(grid)
- self.notification.show_all()
- GLib.timeout_add(1000, self._overlay.add_overlay, self.notification)
+ self._overlay.add_overlay(self.notification)
+ if self.notification_handler:
+ GLib.Source.remove(self.notification_handler)
+ self.notification_handler = None
+ self.notification_handler = GLib.timeout_add(1000, self.notification.show_all)
@log
def _init_playlist_removal_notification(self):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]