[gnome-control-center] notifications: fix invalid format string



commit 1a1b1a5c6f1921aeb450e519670864314cc836d8
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Fri Jan 3 14:28:28 2014 -0600

    notifications: fix invalid format string
    
    GLib-GIO-CRITICAL **: g_settings_get: the format string may not contain
    '&' (key 'application-children' from schema
    'org.gnome.desktop.notifications'). This call will probably stop working
    with a future version of glib.
    
    This is fallout from https://bugzilla.gnome.org/show_bug.cgi?id=719979
    
    https://bugzilla.gnome.org/show_bug.cgi?id=721430

 panels/notifications/cc-notifications-panel.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/panels/notifications/cc-notifications-panel.c b/panels/notifications/cc-notifications-panel.c
index ab8925c..43fbcd2 100644
--- a/panels/notifications/cc-notifications-panel.c
+++ b/panels/notifications/cc-notifications-panel.c
@@ -428,15 +428,14 @@ children_changed (GSettings            *settings,
                   CcNotificationsPanel *panel)
 {
   int i;
-  const gchar **new_app_ids;
+  gchar **new_app_ids;
 
   g_settings_get (panel->master_settings,
                   "application-children",
-                  "^a&s", &new_app_ids);
+                  "^as", &new_app_ids);
   for (i = 0; new_app_ids[i]; i++)
     maybe_add_app_id (panel, new_app_ids[i]);
-
-  g_free (new_app_ids);
+  g_strfreev (new_app_ids);
 }
 
 static void


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