[gnome-settings-daemon] color: Remove the ability to disable notifications



commit b2e86f5b58c6640e5e6a7647426a7a816b1ec254
Author: Richard Hughes <richard hughsie com>
Date:   Fri Aug 26 12:35:14 2011 +0100

    color: Remove the ability to disable notifications
    
    The logic is, you either case or you don't, and if you've manually done:
    
    gsettings set org.gnome.settings-daemon.plugins.color recalibrate-printer-threshold 180
    gsettings set org.gnome.settings-daemon.plugins.color recalibrate-display-threshold 180
    
    ... then you really care enough for a notification.

 ...settings-daemon.plugins.color.gschema.xml.in.in |    5 ----
 plugins/color/gsd-color-manager.c                  |   26 +-------------------
 2 files changed, 1 insertions(+), 30 deletions(-)
---
diff --git a/data/org.gnome.settings-daemon.plugins.color.gschema.xml.in.in b/data/org.gnome.settings-daemon.plugins.color.gschema.xml.in.in
index 30f5a7d..d19863e 100644
--- a/data/org.gnome.settings-daemon.plugins.color.gschema.xml.in.in
+++ b/data/org.gnome.settings-daemon.plugins.color.gschema.xml.in.in
@@ -20,10 +20,5 @@
       <_summary>The duration a printer profile is valid</_summary>
       <_description>This is the number of days after which the printer color profile is considered invalid.</_description>
     </key>
-    <key name="show-notifications" type="b">
-      <default>true</default>
-      <_summary>If notifications are allowed to be shown</_summary>
-      <_description>If notifications should be shown at session start if a profile is invalid.</_description>
-    </key>
   </schema>
 </schemalist>
diff --git a/plugins/color/gsd-color-manager.c b/plugins/color/gsd-color-manager.c
index 67bb436..397252f 100644
--- a/plugins/color/gsd-color-manager.c
+++ b/plugins/color/gsd-color-manager.c
@@ -44,7 +44,6 @@
 #define GSD_COLOR_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GSD_TYPE_COLOR_MANAGER, GsdColorManagerPrivate))
 
 #define GCM_SESSION_NOTIFY_TIMEOUT                      30000 /* ms */
-#define GCM_SETTINGS_SHOW_NOTIFICATIONS                 "show-notifications"
 #define GCM_SETTINGS_RECALIBRATE_PRINTER_THRESHOLD      "recalibrate-printer-threshold"
 #define GCM_SETTINGS_RECALIBRATE_DISPLAY_THRESHOLD      "recalibrate-display-threshold"
 
@@ -1491,17 +1490,8 @@ gcm_session_notify_cb (NotifyNotification *notification,
                        gpointer user_data)
 {
         GsdColorManager *manager = GSD_COLOR_MANAGER (user_data);
-        GsdColorManagerPrivate *priv = manager->priv;
 
-        if (g_strcmp0 (action, "display") == 0) {
-                g_settings_set_uint (priv->settings,
-                                     GCM_SETTINGS_RECALIBRATE_DISPLAY_THRESHOLD,
-                                     0);
-        } else if (g_strcmp0 (action, "printer") == 0) {
-                g_settings_set_uint (priv->settings,
-                                     GCM_SETTINGS_RECALIBRATE_PRINTER_THRESHOLD,
-                                     0);
-        } else if (g_strcmp0 (action, "recalibrate") == 0) {
+        if (g_strcmp0 (action, "recalibrate") == 0) {
                 gcm_session_exec_control_center (manager);
         }
 }
@@ -1529,13 +1519,6 @@ gcm_session_notify_recalibrate (GsdColorManager *manager,
                                         gcm_session_notify_cb,
                                         priv, NULL);
 
-        /* TRANSLATORS: button: this is to ignore the recalibrate notifications */
-        notify_notification_add_action (notification,
-                                        cd_device_kind_to_string (kind),
-                                        _("Ignore"),
-                                        gcm_session_notify_cb,
-                                        priv, NULL);
-
         ret = notify_notification_show (notification, &error);
         if (!ret) {
                 g_warning ("failed to show notification: %s",
@@ -1613,7 +1596,6 @@ gcm_session_profile_connect_cb (GObject *object,
                                 gpointer user_data)
 {
         const gchar *filename;
-        gboolean allow_notifications;
         gboolean ret;
         gchar *basename = NULL;
         const gchar *data_source;
@@ -1658,12 +1640,6 @@ gcm_session_profile_connect_cb (GObject *object,
                 goto out;
         }
 
-        /* do we allow notifications */
-        allow_notifications = g_settings_get_boolean (manager->priv->settings,
-                                                      GCM_SETTINGS_SHOW_NOTIFICATIONS);
-        if (!allow_notifications)
-                goto out;
-
         /* handle device */
         gcm_session_notify_device (manager, helper->device);
 out:



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