From 4a5c71d7c275b93238c629601526a87eca08e6fd Mon Sep 17 00:00:00 2001 From: Jan Djärv Date: Sat, 10 May 2014 12:42:08 +0200 Subject: * xsettings.c (init_gsettings): Use g_settings_schema_source_lookup instead of deprecated g_settings_list_schemas if possible. Fixes: debbugs:17434 --- src/ChangeLog | 5 +++++ src/xsettings.c | 22 +++++++++++++++++----- 2 files changed, 22 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 3d58769c927..9c5f2e90589 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2014-05-10 Jan Djärv + + * 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 * 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) { #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); -- cgit v1.2.1 From 970fd40117f1af062578da2432fafa267893f838 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sat, 10 May 2014 19:30:57 -0700 Subject: * src/fileio.c (Ffile_executable_p): Doc tweak. --- src/ChangeLog | 4 ++++ src/fileio.c | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 9c5f2e90589..2283677a448 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2014-05-11 Glenn Morris + + * fileio.c (Ffile_executable_p): Doc tweak. + 2014-05-10 Jan Djärv * xsettings.c (init_gsettings): Use g_settings_schema_source_lookup diff --git a/src/fileio.c b/src/fileio.c index 8aaed3248a7..03519eda68d 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -2546,7 +2546,9 @@ Use `file-symlink-p' to test for such links. */) DEFUN ("file-executable-p", Ffile_executable_p, Sfile_executable_p, 1, 1, 0, doc: /* Return t if FILENAME can be executed by you. -For a directory, this means you can access files in that directory. */) +For a directory, this means you can access files in that directory. +\(It is generally better to use `file-accessible-directory-p' for that +purpose, though.) */) (Lisp_Object filename) { Lisp_Object absname; -- cgit v1.2.1