[gnome-settings-daemon] daemon: Stop using deprecated GSettings API
- From: Rui Matos <rtcm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] daemon: Stop using deprecated GSettings API
- Date: Mon, 26 May 2014 16:10:34 +0000 (UTC)
commit 36f32a30b606354c0917be006cc64db1b26e6b40
Author: Rui Matos <tiagomatos gmail com>
Date: Mon May 26 17:32:28 2014 +0200
daemon: Stop using deprecated GSettings API
gnome-settings-daemon/gnome-settings-manager.c | 19 +++++++++++++++----
1 files changed, 15 insertions(+), 4 deletions(-)
---
diff --git a/gnome-settings-daemon/gnome-settings-manager.c b/gnome-settings-daemon/gnome-settings-manager.c
index acb1ca2..8658988 100644
--- a/gnome-settings-daemon/gnome-settings-manager.c
+++ b/gnome-settings-daemon/gnome-settings-manager.c
@@ -182,8 +182,8 @@ on_plugin_deactivated (GnomeSettingsPluginInfo *info,
}
static gboolean
-contained (const char * const *items,
- const char *item)
+contained (char **items,
+ const char *item)
{
while (*items) {
if (g_strcmp0 (*items++, item) == 0) {
@@ -197,7 +197,18 @@ contained (const char * const *items,
static gboolean
is_schema (const char *schema)
{
- return contained (g_settings_list_schemas (), schema);
+ GSettingsSchemaSource *source = NULL;
+ gchar **non_relocatable = NULL;
+ gchar **relocatable = NULL;
+
+ source = g_settings_schema_source_get_default ();
+ if (!source)
+ return FALSE;
+
+ g_settings_schema_source_list_schemas (source, TRUE, &non_relocatable, &relocatable);
+
+ return (contained (non_relocatable, schema) ||
+ contained (relocatable, schema));
}
static gboolean
@@ -209,7 +220,7 @@ is_whitelisted (char **whitelist,
g_strcmp0 (whitelist[0], "all") == 0)
return TRUE;
- return contained ((const char * const *) whitelist, plugin_name);
+ return contained (whitelist, plugin_name);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]