From 16c7739170ffb0dd59f75f16d65bc8a97bd2033e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Tue, 9 Mar 2021 20:48:47 +0100 Subject: [PATCH] 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: --- 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 ae7f2ca2a..1dab00a70 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 = [];