From ea66f828eb8207fb8741decd68bb9851e73d55d2 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Tue, 1 Jul 2014 16:23:55 +0200 Subject: [PATCH] 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 file changed, 3 insertions(+) diff --git a/panels/notifications/cc-notifications-panel.c b/panels/notifications/cc-notifications-panel.c index a34f40d01..7d3adfdd8 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);