diff options
| author | Ryan Lortie <desrt@desrt.ca> | 2012-04-12 23:55:34 (GMT) |
|---|---|---|
| committer | Ryan Lortie <desrt@desrt.ca> | 2012-04-12 23:55:34 (GMT) |
| commit | 6560b37450cd19c4a7c7b690e279fe97b7bfdcaa (patch) | |
| tree | 6fd48c0d67b151d941b8a5b425c8ccbcb9e78b23 | |
| parent | 386f0f29fd3dc8e39f49b50ae496c6b1feb3b0a1 (diff) | |
| download | glib-6560b374.zip glib-6560b374.tar.xz | |
glib-compile-schemas: warn about bad dconf paths
For quite some time the recommended usage of GSettings and dconf has
been to use paths like /org/gnome/example/. Use of /apps/ has spilled
over from GConf and is continuing to make its way into a number of
applications as they port.
glib-compile-schemas will now warn about these types of paths being
used. This generates a lot of noise, but hopefully it will reduce the
number of ported applications making this mistake.
| -rw-r--r-- | gio/glib-compile-schemas.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gio/glib-compile-schemas.c b/gio/glib-compile-schemas.c index cf02389..27d0181 100644 --- a/gio/glib-compile-schemas.c +++ b/gio/glib-compile-schemas.c @@ -1204,6 +1204,12 @@ parse_state_start_schema (ParseState *state, return; } + if (path && (g_str_has_prefix (path, "/apps/") || + g_str_has_prefix (path, "/desktop/") || + g_str_has_prefix (path, "/system/"))) + g_printerr ("warning: Schema '%s' has path '%s'. Paths starting with " + "'/apps/', '/desktop/' or '/system/' are deprecated.\n", id, path); + state->schema_state = schema_state_new (path, gettext_domain, extends, extends_name, list_of); |