summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ChangeLog3
-rw-r--r--src/xsettings.c8
2 files changed, 8 insertions, 3 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index e2f66eec15b..d77a246a50a 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,8 @@
2011-07-03 Paul Eggert <eggert@cs.ucla.edu>
+ * xsettings.c (SYSTEM_FONT): Define only when used.
+ No need to define when HAVE_GSETTINGS || !HAVE_XFT.
+
* keymap.c (access_keymap_1): Now static.
2011-07-02 Chong Yidong <cyd@stupidchicken.com>
diff --git a/src/xsettings.c b/src/xsettings.c
index 4162912f2c1..5411d3fc7fb 100644
--- a/src/xsettings.c
+++ b/src/xsettings.c
@@ -128,7 +128,6 @@ struct xsettings
#ifdef HAVE_GSETTINGS
#define GSETTINGS_SCHEMA "org.gnome.desktop.interface"
#define SYSTEM_MONO_FONT "monospace-font-name"
-#define SYSTEM_FONT "font-name"
static void
something_changedCB (GSettings *settings,
@@ -153,7 +152,10 @@ something_changedCB (GSettings *settings,
#else
#ifdef HAVE_GCONF
#define SYSTEM_MONO_FONT "/desktop/gnome/interface/monospace_font_name"
-#define SYSTEM_FONT "/desktop/gnome/interface/font_name"
+
+#ifdef HAVE_XFT
+# define SYSTEM_FONT "/desktop/gnome/interface/font_name"
+#endif
/* Callback called when something changed in GConf that we care about,
that is SYSTEM_MONO_FONT. */
@@ -697,7 +699,7 @@ init_gsettings (void)
g_object_ref_sink (G_OBJECT (gsettings_client));
val = g_settings_get_value (gsettings_client, SYSTEM_MONO_FONT);
- if (val)
+ if (val)
{
g_variant_ref_sink (val);
if (g_variant_is_of_type (val, G_VARIANT_TYPE_STRING))