aboutsummaryrefslogtreecommitdiffstats
path: root/src/xsettings.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xsettings.c')
-rw-r--r--src/xsettings.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/xsettings.c b/src/xsettings.c
index 06718df5a3c..066c6e795e9 100644
--- a/src/xsettings.c
+++ b/src/xsettings.c
@@ -1,6 +1,6 @@
1/* Functions for handling font and other changes dynamically. 1/* Functions for handling font and other changes dynamically.
2 2
3Copyright (C) 2009-2011 Free Software Foundation, Inc. 3Copyright (C) 2009-2012 Free Software Foundation, Inc.
4 4
5This file is part of GNU Emacs. 5This file is part of GNU Emacs.
6 6
@@ -83,7 +83,7 @@ dpyinfo_valid (struct x_display_info *dpyinfo)
83 83
84/* Store a monospace font change event if the monospaced font changed. */ 84/* Store a monospace font change event if the monospaced font changed. */
85 85
86#ifdef HAVE_XFT 86#if defined HAVE_XFT && (defined HAVE_GSETTINGS || defined HAVE_GCONF)
87static void 87static void
88store_monospaced_changed (const char *newfont) 88store_monospaced_changed (const char *newfont)
89{ 89{
@@ -99,9 +99,11 @@ store_monospaced_changed (const char *newfont)
99 XCAR (first_dpyinfo->name_list_element)); 99 XCAR (first_dpyinfo->name_list_element));
100 } 100 }
101} 101}
102#endif
102 103
103/* Store a font name change event if the font name changed. */ 104/* Store a font name change event if the font name changed. */
104 105
106#ifdef HAVE_XFT
105static void 107static void
106store_font_name_changed (const char *newfont) 108store_font_name_changed (const char *newfont)
107{ 109{
@@ -119,7 +121,7 @@ store_font_name_changed (const char *newfont)
119} 121}
120#endif /* HAVE_XFT */ 122#endif /* HAVE_XFT */
121 123
122/* Map TOOL_BAR_STYLE from a string to its correspinding Lisp value. 124/* Map TOOL_BAR_STYLE from a string to its corresponding Lisp value.
123 Return Qnil if TOOL_BAR_STYLE is not known. */ 125 Return Qnil if TOOL_BAR_STYLE is not known. */
124 126
125static Lisp_Object 127static Lisp_Object
@@ -252,7 +254,7 @@ something_changed_gsettingsCB (GSettings *settings,
252 g_variant_unref (val); 254 g_variant_unref (val);
253 } 255 }
254 } 256 }
255#endif /* HAVE_XFT */ 257#endif /* HAVE_XFT */
256} 258}
257 259
258#endif /* HAVE_GSETTINGS */ 260#endif /* HAVE_GSETTINGS */
@@ -441,14 +443,14 @@ parse_settings (unsigned char *prop,
441 bytes_parsed += 4; /* Skip serial for this value */ 443 bytes_parsed += 4; /* Skip serial for this value */
442 if (bytes_parsed > bytes) return BadLength; 444 if (bytes_parsed > bytes) return BadLength;
443 445
444 want_this = 446 want_this =
445#ifdef HAVE_XFT 447#ifdef HAVE_XFT
446 (nlen > 6 && strncmp (name, "Xft/", 4) == 0) 448 (nlen > 6 && strncmp (name, "Xft/", 4) == 0)
447 || strcmp (XSETTINGS_FONT_NAME, name) == 0 449 || strcmp (XSETTINGS_FONT_NAME, name) == 0
448 || 450 ||
449#endif 451#endif
450 strcmp (XSETTINGS_TOOL_BAR_STYLE, name) == 0; 452 strcmp (XSETTINGS_TOOL_BAR_STYLE, name) == 0;
451 453
452 switch (type) 454 switch (type)
453 { 455 {
454 case 0: /* Integer */ 456 case 0: /* Integer */
@@ -810,7 +812,7 @@ init_gsettings (void)
810 g_type_init (); 812 g_type_init ();
811#endif 813#endif
812 814
813 schemas = g_settings_list_schemas(); 815 schemas = g_settings_list_schemas ();
814 if (schemas == NULL) return; 816 if (schemas == NULL) return;
815 while (! schema_found && *schemas != NULL) 817 while (! schema_found && *schemas != NULL)
816 schema_found = strcmp (*schemas++, GSETTINGS_SCHEMA) == 0; 818 schema_found = strcmp (*schemas++, GSETTINGS_SCHEMA) == 0;