[gnome-shell/gnome-3-38] messageTray: Default to generic policy



commit 81964f24b4014642153763e38ab8a62467a8505f
Author: Florian Müllner <fmuellner gnome org>
Date:   Thu Oct 22 20:11:14 2020 +0200

    messageTray: Default to generic policy
    
    How and if notifications are shown is controlled by NotificationPolicy
    objects. But ever since 098bd45, only notification daemon sources or
    notifications associated with an app are hooked up to GSettings.
    
    The hardcoded default policy for built-in notifications (including
    those provided by extensions) arguably made sense back then, but
    now that the main setting has been rebranded as "Do Not Disturb"
    and is exposed prominently in the calendar drop-down, following
    GSettings is a better default.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3291
    
    Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1511>
    
    (cherry picked from commit 595359afa5756f0871b19e7ffa7b2a462b75b05b)

 js/ui/messageTray.js | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js
index 7aac503ec3..546079f9bb 100644
--- a/js/ui/messageTray.js
+++ b/js/ui/messageTray.js
@@ -134,6 +134,7 @@ var FocusGrabber = class FocusGrabber {
 //
 // A notification without a policy object will inherit the default one.
 var NotificationPolicy = GObject.registerClass({
+    GTypeFlags: GObject.TypeFlags.ABSTRACT,
     Properties: {
         'enable': GObject.ParamSpec.boolean(
             'enable', 'enable', 'enable', GObject.ParamFlags.READABLE, true),
@@ -718,7 +719,7 @@ var Source = GObject.registerClass({
     }
 
     _createPolicy() {
-        return new NotificationPolicy();
+        return new NotificationGenericPolicy();
     }
 
     get narrowestPrivacyScope() {


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