Fequal_including_properties fix
[bpt/emacs.git] / src / xsettings.c
index 844da19..e9cc960 100644 (file)
@@ -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);
@@ -997,6 +1009,8 @@ known style.  Otherwise return image.  */)
 void
 syms_of_xsettings (void)
 {
+#include "xsettings.x"
+
   current_mono_font = NULL;
   current_font = NULL;
   first_dpyinfo = NULL;
@@ -1010,8 +1024,6 @@ syms_of_xsettings (void)
   DEFSYM (Qmonospace_font_name, "monospace-font-name");
   DEFSYM (Qfont_name, "font-name");
   DEFSYM (Qfont_render, "font-render");
-  defsubr (&Sfont_get_system_font);
-  defsubr (&Sfont_get_system_normal_font);
 
   DEFVAR_BOOL ("font-use-system-font", use_system_font,
     doc: /* Non-nil means to apply the system defined font dynamically.
@@ -1033,7 +1045,6 @@ If this variable is nil, Emacs ignores system font changes.  */);
 
   current_tool_bar_style = Qnil;
   DEFSYM (Qtool_bar_style, "tool-bar-style");
-  defsubr (&Stool_bar_get_system_style);
 
   Fprovide (intern_c_string ("dynamic-setting"), Qnil);
 }