[gnome-boxes] notificationbar: Make it specific to Boxes.Notification



commit e630a5e64b3e7671fc62286af184f8fbf53e325f
Author: Felipe Borges <felipeborges gnome org>
Date:   Tue Dec 14 13:29:49 2021 +0100

    notificationbar: Make it specific to Boxes.Notification
    
    Our notificationbar widget could handle other types of notifications
    in the past (such as AuthNotifications). With the split between
    Boxes and Connections, our Notifications are now all of the same
    type.

 src/notificationbar.vala | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/src/notificationbar.vala b/src/notificationbar.vala
index 42fb3822..2c7a82fe 100644
--- a/src/notificationbar.vala
+++ b/src/notificationbar.vala
@@ -5,7 +5,7 @@
     public const int DEFAULT_TIMEOUT = 6;
     private const int MAX_NOTIFICATIONS = 5;
 
-    GLib.List<Widget> active_notifications;
+    GLib.List<Boxes.Notification> active_notifications;
 
     public Searchbar searchbar;
 
@@ -17,7 +17,7 @@
 
         show ();
 
-        active_notifications = new GLib.List<Widget> ();
+        active_notifications = new GLib.List<Boxes.Notification> ();
 
         App.app.notify["page"].connect ( () => {
             foreach (var w in active_notifications) {
@@ -42,8 +42,9 @@
     }
 
     public void dismiss_all () {
-        foreach (var notification in active_notifications)
-            (notification as Notification).dismiss ();
+        foreach (var notification in active_notifications) {
+            notification.dismiss ();
+        }
     }
 
     private void add_notification (Widget w) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]