[gnome-control-center] notifications: Fix duplicates in application list



commit ea66f828eb8207fb8741decd68bb9851e73d55d2
Author: Bastien Nocera <hadess hadess net>
Date:   Tue Jul 1 16:23:55 2014 +0200

    notifications: Fix duplicates in application list
    
    When saving applications in the "application-children" list, gnome-shell
    will lower-case the whole canonical application ID in _canonicalizeId().
    
    Match _canonicalizeId()'s behaviour, and lower-case the canonical
    application ID so we don't try to load "org-gnome-Software" from
    GNOME-Software's desktop file in addition to the already saved
    "org-gnome-software".
    
    https://bugzilla.gnome.org/show_bug.cgi?id=729447

 panels/notifications/cc-notifications-panel.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/panels/notifications/cc-notifications-panel.c b/panels/notifications/cc-notifications-panel.c
index a34f40d..7d3adfd 100644
--- a/panels/notifications/cc-notifications-panel.c
+++ b/panels/notifications/cc-notifications-panel.c
@@ -344,6 +344,7 @@ process_app_info (CcNotificationsPanel *panel,
   char *path;
   GSettings *settings;
   GSource *source;
+  guint i;
 
   app_id = app_info_get_id (app_info);
   canonical_app_id = g_strcanon (app_id,
@@ -352,6 +353,8 @@ process_app_info (CcNotificationsPanel *panel,
                                  "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
                                  "-",
                                  '-');
+  for (i = 0; canonical_app_id[i] != '\0'; i++)
+    canonical_app_id[i] = g_ascii_tolower (canonical_app_id[i]);
 
   path = g_strconcat (APP_PREFIX, canonical_app_id, "/", NULL);
   settings = g_settings_new_with_path (APP_SCHEMA, path);


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