[gnome-music/wip/mschraal/gtk4: 77/90] notificationspopup: Work around Grid changes
- From: Marinus Schraal <mschraal src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-music/wip/mschraal/gtk4: 77/90] notificationspopup: Work around Grid changes
- Date: Sat, 27 Jun 2020 11:59:05 +0000 (UTC)
commit d4561b7d5ccd6a0c984f37844f2176274497b710
Author: Marinus Schraal <mschraal gnome org>
Date: Mon Jun 8 01:02:34 2020 +0200
notificationspopup: Work around Grid changes
gnomemusic/widgets/notificationspopup.py | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/gnomemusic/widgets/notificationspopup.py b/gnomemusic/widgets/notificationspopup.py
index a7774d97..44946299 100644
--- a/gnomemusic/widgets/notificationspopup.py
+++ b/gnomemusic/widgets/notificationspopup.py
@@ -47,7 +47,7 @@ class NotificationsPopup(Gtk.Revealer):
self._loading_notification = LoadingNotification()
self._loading_notification.connect('visible', self._set_visibility)
self._loading_notification.connect('invisible', self._set_visibility)
- self._grid.add(self._loading_notification)
+ self._grid.attach(self._loading_notification, 0, 0, 1, 1)
def _hide_notifications(self, notification, remove):
if remove:
@@ -62,9 +62,10 @@ class NotificationsPopup(Gtk.Revealer):
deletion is in progress.
"""
loading_finished = self._loading_notification._counter == 0
- no_other_notif = (len(self._grid.get_children()) == 1
- or (len(self._grid.get_children()) == 2
- and notification != self._loading_notification))
+ # no_other_notif = (len(self._grid.get_children()) == 1
+ # or (len(self._grid.get_children()) == 2
+ # and notification != self._loading_notification))
+ no_other_notif = True
invisible = loading_finished and no_other_notif
if not invisible:
@@ -98,7 +99,7 @@ class NotificationsPopup(Gtk.Revealer):
:param notification: notification to display
"""
- self._grid.add(notification)
+ self._grid.attach(notification, 0, 0, 1, 1)
self.show()
self.set_reveal_child(True)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]