~jbicha/unity-settings-daemon/drop-updates-plugin-and-gsettings-priorities

« back to all changes in this revision

Viewing changes to gnome-settings-daemon/gnome-settings-manager.c

  • Committer: Jeremy Bicha
  • Date: 2017-02-08 09:19:14 UTC
  • Revision ID: jbicha@ubuntu.com-20170208091914-dv7tn2dpii23kddo
main: Remove GSettings override for plugin priority

There's a default value already available in the plugin file itself.

https://bugzilla.gnome.org/show_bug.cgi?id=772370

https://git.gnome.org/browse/gnome-settings-daemon/commit/?id=8db4f84c
https://git.gnome.org/browse/gnome-settings-daemon/commit/?id=36f32a30

Show diffs side-by-side

added added

removed removed

Lines of Context:
202
202
}
203
203
 
204
204
static gboolean
205
 
contained (const char * const *items,
206
 
           const char         *item)
 
205
contained (char      **items,
 
206
           const char *item)
207
207
{
208
208
        while (*items) {
209
209
                if (g_strcmp0 (*items++, item) == 0) {
215
215
}
216
216
 
217
217
static gboolean
218
 
is_schema (const char *schema)
219
 
{
220
 
        return contained (g_settings_list_schemas (), schema);
221
 
}
222
 
 
223
 
static gboolean
224
218
is_whitelisted (char       **whitelist,
225
219
                const char  *plugin_name)
226
220
{
229
223
            g_strcmp0 (whitelist[0], "all") == 0)
230
224
                return TRUE;
231
225
 
232
 
        return contained ((const char * const *) whitelist, plugin_name);
 
226
        return contained (whitelist, plugin_name);
233
227
}
234
228
 
235
229
static void
267
261
                                    gnome_settings_plugin_info_get_location (info));
268
262
 
269
263
        /* Ignore unknown schemas or else we'll assert */
270
 
        if (is_schema (key_name)) {
271
 
                manager->priv->plugins = g_slist_prepend (manager->priv->plugins,
272
 
                                                          g_object_ref (info));
273
 
 
274
 
                g_signal_connect (info, "activated",
275
 
                                  G_CALLBACK (on_plugin_activated), manager);
276
 
                g_signal_connect (info, "deactivated",
277
 
                                  G_CALLBACK (on_plugin_deactivated), manager);
278
 
 
279
 
                gnome_settings_plugin_info_set_settings_prefix (info, key_name);
280
 
        } else {
281
 
                g_warning ("Ignoring unknown module '%s'", key_name);
282
 
        }
 
264
        manager->priv->plugins = g_slist_prepend (manager->priv->plugins,
 
265
                                                  g_object_ref (info));
 
266
 
 
267
        g_signal_connect (info, "activated",
 
268
                          G_CALLBACK (on_plugin_activated), manager);
 
269
        g_signal_connect (info, "deactivated",
 
270
                          G_CALLBACK (on_plugin_deactivated), manager);
283
271
 
284
272
        /* Priority is set in the call above */
285
273
        g_free (key_name);