[gnome-shell] messageTray: Remove deprecated code



commit 16c7739170ffb0dd59f75f16d65bc8a97bd2033e
Author: Florian Müllner <fmuellner gnome org>
Date:   Tue Mar 9 20:48:47 2021 +0100

    messageTray: Remove deprecated code
    
    Originally the Source method for showing notifications was "notify",
    which had to change when turning it into a GObject subclass to not
    clash with g_object_notify().
    
    That change happened during the 3.36 cycle, so extensions have had
    two releases (a year) to adapt to the replacement. That seems long
    enough, so remove the deprecated compat code.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3848
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1749>

 js/ui/messageTray.js | 17 +----------------
 1 file changed, 1 insertion(+), 16 deletions(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index ae7f2ca2a8..1dab00a700 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -703,7 +703,7 @@ var Source = GObject.registerClass({
     }
 
     countUpdated() {
-        super.notify('count');
+        this.notify('count');
     }
 
     _createPolicy() {
@@ -775,21 +775,6 @@ var Source = GObject.registerClass({
             this.emit('notification-show', notification);
     }
 
-    notify(propName) {
-        if (propName instanceof Notification) {
-            try {
-                throw new Error('Source.notify() has been moved to Source.showNotification()' +
-                                'this code will break in the future');
-            } catch (e) {
-                logError(e);
-                this.showNotification(propName);
-                return;
-            }
-        }
-
-        super.notify(propName);
-    }
-
     destroy(reason) {
         let notifications = this.notifications;
         this.notifications = [];


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