diff options
| author | Glenn Morris | 2014-05-11 23:59:30 -0700 |
|---|---|---|
| committer | Glenn Morris | 2014-05-11 23:59:30 -0700 |
| commit | bbbabffe06d4c763534d5be92844c48a3f8746e2 (patch) | |
| tree | a6fffb13638948223f3142e5209cbce57282fbbd /src/xsettings.c | |
| parent | ffd6d9c4d321e93e301f9cafd1fe054389898978 (diff) | |
| parent | 96b894717caa773aa6d98ff57385f1c7537e8972 (diff) | |
| download | emacs-bbbabffe06d4c763534d5be92844c48a3f8746e2.tar.gz emacs-bbbabffe06d4c763534d5be92844c48a3f8746e2.zip | |
Merge from emacs-24; up to 2014-05-12T06:15:47Z!rgm@gnu.org
Diffstat (limited to 'src/xsettings.c')
| -rw-r--r-- | src/xsettings.c | 22 |
1 files changed, 17 insertions, 5 deletions
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); |