[gnome-settings-daemon] xsettings: Make fontconfig a hard dependency
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] xsettings: Make fontconfig a hard dependency
- Date: Wed, 20 Oct 2010 14:01:28 +0000 (UTC)
commit f6257d7e81aaa79dcd7430c0de092145f64f6146
Author: Bastien Nocera <hadess hadess net>
Date: Wed Oct 20 15:00:42 2010 +0100
xsettings: Make fontconfig a hard dependency
It's required lower down the GTK+ stack on Unices anyway, so there's
no point in making it an option.
configure.ac | 7 +------
plugins/xsettings/Makefile.am | 16 ++++------------
plugins/xsettings/gsd-xsettings-manager.c | 13 -------------
3 files changed, 5 insertions(+), 31 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index a442278..3026d27 100644
--- a/configure.ac
+++ b/configure.ac
@@ -197,12 +197,7 @@ dnl ---------------------------------------------------------------------------
dnl - Fontconfig
dnl ---------------------------------------------------------------------------
-have_fontconfig=no
-PKG_CHECK_MODULES(FONTCONFIG, fontconfig,
- [AC_DEFINE(HAVE_FONTCONFIG, 1, [Define if Fontconfig functionality is available])
- have_fontconfig=yes],
- [have_fontconfig=no])
-AM_CONDITIONAL(HAVE_FONTCONFIG, test x"$have_fontconfig" = "xyes")
+PKG_CHECK_MODULES(FONTCONFIG, fontconfig)
dnl ---------------------------------------------------------------------------
dnl - Keyboard plugin stuff
diff --git a/plugins/xsettings/Makefile.am b/plugins/xsettings/Makefile.am
index cb4ce8f..b677eb1 100644
--- a/plugins/xsettings/Makefile.am
+++ b/plugins/xsettings/Makefile.am
@@ -13,6 +13,8 @@ libxsettings_la_SOURCES = \
xsettings-common.c \
xsettings-manager.h \
xsettings-manager.c \
+ fontconfig-monitor.h \
+ fontconfig-monitor.c \
$(NULL)
libxsettings_la_CPPFLAGS = \
@@ -23,6 +25,7 @@ libxsettings_la_CPPFLAGS = \
libxsettings_la_CFLAGS = \
$(SETTINGS_PLUGIN_CFLAGS) \
+ $(FONTCONFIG_CFLAGS) \
$(AM_CFLAGS)
libxsettings_la_LDFLAGS = \
@@ -31,20 +34,9 @@ libxsettings_la_LDFLAGS = \
libxsettings_la_LIBADD = \
$(SETTINGS_PLUGIN_LIBS) \
+ $(FONTCONFIG_LIBS) \
$(NULL)
-if HAVE_FONTCONFIG
-libxsettings_la_SOURCES += \
- fontconfig-monitor.h \
- fontconfig-monitor.c \
- $(NULL)
-libxsettings_la_CFLAGS += \
- $(FONTCONFIG_CFLAGS)
-libxsettings_la_LIBADD += \
- $(FONTCONFIG_LIBS)
-endif
-
-
plugin_in_files = \
xsettings.gnome-settings-plugin.in \
$(NULL)
diff --git a/plugins/xsettings/gsd-xsettings-manager.c b/plugins/xsettings/gsd-xsettings-manager.c
index 0feb0e1..df33d49 100644
--- a/plugins/xsettings/gsd-xsettings-manager.c
+++ b/plugins/xsettings/gsd-xsettings-manager.c
@@ -44,9 +44,7 @@
#include "gsd-enums.h"
#include "gsd-xsettings-manager.h"
#include "xsettings-manager.h"
-#ifdef HAVE_FONTCONFIG
#include "fontconfig-monitor.h"
-#endif /* HAVE_FONTCONFIG */
#define GNOME_XSETTINGS_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GNOME_TYPE_XSETTINGS_MANAGER, GnomeXSettingsManagerPrivate))
@@ -56,7 +54,6 @@
#define GTK_MODULES_DIR "/apps/gnome_settings_daemon/gtk-modules"
-#ifdef HAVE_FONTCONFIG
#define FONT_RENDER_DIR "org.gnome.settings-daemon.plugins.xsettings"
#define FONT_ANTIALIASING_KEY "antialiasing"
#define FONT_HINTING_KEY "hinting"
@@ -77,8 +74,6 @@
#define DPI_LOW_REASONABLE_VALUE 50
#define DPI_HIGH_REASONABLE_VALUE 500
-#endif /* HAVE_FONTCONFIG */
-
typedef struct _TranslationEntry TranslationEntry;
typedef void (* TranslationFunc) (GnomeXSettingsManager *manager,
TranslationEntry *trans,
@@ -99,9 +94,7 @@ struct GnomeXSettingsManagerPrivate
guint gtk_modules_notify;
GSettings *font_settings;
-#ifdef HAVE_FONTCONFIG
fontconfig_monitor_handle_t *fontconfig_handle;
-#endif /* HAVE_FONTCONFIG */
};
#define GSD_XSETTINGS_ERROR gsd_xsettings_error_quark ()
@@ -221,7 +214,6 @@ static TranslationEntry translations [] = {
{ "org.gnome.desktop.sound", "input-feedback-sounds", "Net/EnableInputFeedbackSounds", translate_bool_int }
};
-#ifdef HAVE_FONTCONFIG
static double
dpi_from_pixels_and_mm (int pixels,
int mm)
@@ -509,7 +501,6 @@ stop_fontconfig_monitor (GnomeXSettingsManager *manager)
manager->priv->fontconfig_handle = NULL;
}
}
-#endif /* HAVE_FONTCONFIG */
static const char *
type_to_string (GConfValueType type)
@@ -799,14 +790,12 @@ gnome_xsettings_manager_start (GnomeXSettingsManager *manager,
g_object_unref (client);
-#ifdef HAVE_FONTCONFIG
manager->priv->font_settings = g_settings_new (FONT_RENDER_DIR);
g_signal_connect (manager->priv->font_settings, "changed",
G_CALLBACK (xft_callback), manager);
update_xft_settings (manager);
start_fontconfig_monitor (manager);
-#endif /* HAVE_FONTCONFIG */
for (i = 0; manager->priv->managers [i]; i++)
xsettings_manager_set_string (manager->priv->managers [i],
@@ -840,10 +829,8 @@ gnome_xsettings_manager_stop (GnomeXSettingsManager *manager)
p->managers = NULL;
}
-#ifdef HAVE_FONTCONFIG
g_object_unref (manager->priv->font_settings);
stop_fontconfig_monitor (manager);
-#endif /* HAVE_FONTCONFIG */
/* Stopping GTK+ modules */
client = gconf_client_get_default ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]