[gnome-control-center/invert-dnd-switch] notifications: Invert the "Do not disturb" switch



commit 6d396853a1bba10b7169b8c20a88772ce92f91df
Author: Felipe Borges <felipeborges gnome org>
Date:   Thu Feb 20 15:09:15 2020 +0100

    notifications: Invert the "Do not disturb" switch
    
    The switch is binded to the "show-banners" gsetting. When DnD is
    ON, users don't want banners, therefore "show-banners" is OFF.
    
    For this reason we need to invert the switch.
    
    Fixes #878

 panels/notifications/cc-notifications-panel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/panels/notifications/cc-notifications-panel.c b/panels/notifications/cc-notifications-panel.c
index 1d8f831f7..79c1f0d1e 100644
--- a/panels/notifications/cc-notifications-panel.c
+++ b/panels/notifications/cc-notifications-panel.c
@@ -178,7 +178,7 @@ cc_notifications_panel_init (CcNotificationsPanel *panel)
 
   g_settings_bind (panel->master_settings, "show-banners",
                    panel->dnd_switch,
-                   "active", G_SETTINGS_BIND_DEFAULT);
+                   "active", G_SETTINGS_BIND_INVERT_BOOLEAN);
   g_settings_bind (panel->master_settings, "show-in-lock-screen",
                    panel->lock_screen_switch,
                    "active", G_SETTINGS_BIND_DEFAULT);


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