[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-24 r117096: * xsettings.c (init_gsettings): Use g_se
From: |
Jan D. |
Subject: |
[Emacs-diffs] emacs-24 r117096: * xsettings.c (init_gsettings): Use g_settings_schema_source_lookup |
Date: |
Sat, 10 May 2014 10:42:13 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 117096
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/17434
committer: Jan D. <address@hidden>
branch nick: emacs-24
timestamp: Sat 2014-05-10 12:42:08 +0200
message:
* xsettings.c (init_gsettings): Use g_settings_schema_source_lookup
instead of deprecated g_settings_list_schemas if possible.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/xsettings.c xsettings.c-20091117210551-bqxn4u9uesl3d17a-4
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2014-05-07 19:28:09 +0000
+++ b/src/ChangeLog 2014-05-10 10:42:08 +0000
@@ -1,3 +1,8 @@
+2014-05-10 Jan Djärv <address@hidden>
+
+ * xsettings.c (init_gsettings): Use g_settings_schema_source_lookup
+ instead of deprecated g_settings_list_schemas if possible (Bug#17434).
+
2014-05-07 Paul Eggert <address@hidden>
* minibuf.c (read_minibuf): Avoid C99ism in previous patch (Bug#17430).
=== modified file 'src/xsettings.c'
--- a/src/xsettings.c 2014-02-28 21:45:34 +0000
+++ b/src/xsettings.c 2014-05-10 10:42:08 +0000
@@ -795,17 +795,29 @@
{
#ifdef HAVE_GSETTINGS
GVariant *val;
- const gchar *const *schemas;
int schema_found = 0;
#if ! GLIB_CHECK_VERSION (2, 36, 0)
g_type_init ();
#endif
- schemas = g_settings_list_schemas ();
- if (schemas == NULL) return;
- while (! schema_found && *schemas != NULL)
- schema_found = strcmp (*schemas++, GSETTINGS_SCHEMA) == 0;
+#if GLIB_CHECK_VERSION (2, 32, 0)
+ {
+ GSettingsSchema *sc = g_settings_schema_source_lookup
+ (g_settings_schema_source_get_default (),
+ GSETTINGS_SCHEMA,
+ TRUE);
+ schema_found = sc != NULL;
+ if (sc) g_settings_schema_unref (sc);
+ }
+#else
+ {
+ const gchar *const *schemas = g_settings_list_schemas ();
+ if (schemas == NULL) return;
+ while (! schema_found && *schemas != NULL)
+ schema_found = strcmp (*schemas++, GSETTINGS_SCHEMA) == 0;
+ }
+#endif
if (!schema_found) return;
gsettings_client = g_settings_new (GSETTINGS_SCHEMA);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-24 r117096: * xsettings.c (init_gsettings): Use g_settings_schema_source_lookup,
Jan D. <=