PageRenderTime 48ms CodeModel.GetById 24ms RepoModel.GetById 1ms app.codeStats 0ms

/srcpkgs/glib/patches/revert-warn-glib-compile-schemas.patch

https://github.com/chneukirchen/xbps-packages
Patch | 33 lines | 29 code | 4 blank | 0 comment | 0 complexity | cde8e1a9d18918be0d90af67a981f184 MD5 | raw file
Possible License(s): LGPL-3.0, EPL-1.0, Apache-2.0, BSD-3-Clause, AGPL-1.0, LGPL-2.0, GPL-2.0, GPL-3.0, LGPL-2.1, MPL-2.0-no-copyleft-exception
  1. From 6560b37450cd19c4a7c7b690e279fe97b7bfdcaa Mon Sep 17 00:00:00 2001
  2. From: Ryan Lortie <desrt@desrt.ca>
  3. Date: Thu, 12 Apr 2012 23:55:34 +0000
  4. Subject: glib-compile-schemas: warn about bad dconf paths
  5. For quite some time the recommended usage of GSettings and dconf has
  6. been to use paths like /org/gnome/example/. Use of /apps/ has spilled
  7. over from GConf and is continuing to make its way into a number of
  8. applications as they port.
  9. glib-compile-schemas will now warn about these types of paths being
  10. used. This generates a lot of noise, but hopefully it will reduce the
  11. number of ported applications making this mistake.
  12. ---
  13. diff --git a/gio/glib-compile-schemas.c b/gio/glib-compile-schemas.c
  14. index cf02389..27d0181 100644
  15. --- a/gio/glib-compile-schemas.c
  16. +++ b/gio/glib-compile-schemas.c
  17. @@ -1204,6 +1204,12 @@ parse_state_start_schema (ParseState *state,
  18. return;
  19. }
  20. + if (path && (g_str_has_prefix (path, "/apps/") ||
  21. + g_str_has_prefix (path, "/desktop/") ||
  22. + g_str_has_prefix (path, "/system/")))
  23. + g_printerr ("warning: Schema '%s' has path '%s'. Paths starting with "
  24. + "'/apps/', '/desktop/' or '/system/' are deprecated.\n", id, path);
  25. +
  26. state->schema_state = schema_state_new (path, gettext_domain,
  27. extends, extends_name, list_of);
  28. --
  29. cgit v0.9.0.2