aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJan Djärv2014-05-10 12:42:08 +0200
committerJan Djärv2014-05-10 12:42:08 +0200
commit4a5c71d7c275b93238c629601526a87eca08e6fd (patch)
tree7e71f82e892f87e129a2d9be941b9fd0d5eac8f7 /src
parent3ebdceafc175e59582caf787696dca2f11a0e495 (diff)
downloademacs-4a5c71d7c275b93238c629601526a87eca08e6fd.tar.gz
emacs-4a5c71d7c275b93238c629601526a87eca08e6fd.zip
* xsettings.c (init_gsettings): Use g_settings_schema_source_lookup
instead of deprecated g_settings_list_schemas if possible. Fixes: debbugs:17434
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/xsettings.c22
2 files changed, 22 insertions, 5 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 3d58769c927..9c5f2e90589 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12014-05-10 Jan Djärv <jan.h.d@swipnet.se>
2
3 * xsettings.c (init_gsettings): Use g_settings_schema_source_lookup
4 instead of deprecated g_settings_list_schemas if possible (Bug#17434).
5
12014-05-07 Paul Eggert <eggert@cs.ucla.edu> 62014-05-07 Paul Eggert <eggert@cs.ucla.edu>
2 7
3 * minibuf.c (read_minibuf): Avoid C99ism in previous patch (Bug#17430). 8 * minibuf.c (read_minibuf): Avoid C99ism in previous patch (Bug#17430).
diff --git a/src/xsettings.c b/src/xsettings.c
index 844da19f638..5f4275df545 100644
--- a/src/xsettings.c
+++ b/src/xsettings.c
@@ -795,17 +795,29 @@ init_gsettings (void)
795{ 795{
796#ifdef HAVE_GSETTINGS 796#ifdef HAVE_GSETTINGS
797 GVariant *val; 797 GVariant *val;
798 const gchar *const *schemas;
799 int schema_found = 0; 798 int schema_found = 0;
800 799
801#if ! GLIB_CHECK_VERSION (2, 36, 0) 800#if ! GLIB_CHECK_VERSION (2, 36, 0)
802 g_type_init (); 801 g_type_init ();
803#endif 802#endif
804 803
805 schemas = g_settings_list_schemas (); 804#if GLIB_CHECK_VERSION (2, 32, 0)
806 if (schemas == NULL) return; 805 {
807 while (! schema_found && *schemas != NULL) 806 GSettingsSchema *sc = g_settings_schema_source_lookup
808 schema_found = strcmp (*schemas++, GSETTINGS_SCHEMA) == 0; 807 (g_settings_schema_source_get_default (),
808 GSETTINGS_SCHEMA,
809 TRUE);
810 schema_found = sc != NULL;
811 if (sc) g_settings_schema_unref (sc);
812 }
813#else
814 {
815 const gchar *const *schemas = g_settings_list_schemas ();
816 if (schemas == NULL) return;
817 while (! schema_found && *schemas != NULL)
818 schema_found = strcmp (*schemas++, GSETTINGS_SCHEMA) == 0;
819 }
820#endif
809 if (!schema_found) return; 821 if (!schema_found) return;
810 822
811 gsettings_client = g_settings_new (GSETTINGS_SCHEMA); 823 gsettings_client = g_settings_new (GSETTINGS_SCHEMA);