aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-07-12 09:47:56 -0700
committerPaul Eggert2011-07-12 09:47:56 -0700
commit490011a6cc38e11c81697c8f5e7353dcd3d81187 (patch)
treefc74a240412afc0a8934264b53410e58340b41b7 /src
parent270768cd6e5c704b0e1377b09d0f1691a5a11116 (diff)
downloademacs-490011a6cc38e11c81697c8f5e7353dcd3d81187.tar.gz
emacs-490011a6cc38e11c81697c8f5e7353dcd3d81187.zip
* xsettings.c (store_monospaced_changed): Define only if used.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog3
-rw-r--r--src/xsettings.c10
2 files changed, 9 insertions, 4 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index e964e06894d..a52f71bbf7b 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -2,6 +2,9 @@
2 2
3 Fix recently-introduced minor problems. 3 Fix recently-introduced minor problems.
4 * term.c (init_tty): Remove unused local. 4 * term.c (init_tty): Remove unused local.
5 * xsettings.c (store_monospaced_changed): Define this function only
6 if (defined HAVE_GSETTINGS || define defined HAVE_GCONF), as it's
7 not used otherwise.
5 8
62011-07-12 Chong Yidong <cyd@stupidchicken.com> 92011-07-12 Chong Yidong <cyd@stupidchicken.com>
7 10
diff --git a/src/xsettings.c b/src/xsettings.c
index 06718df5a3c..dadbe68b4cb 100644
--- a/src/xsettings.c
+++ b/src/xsettings.c
@@ -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{
@@ -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 */