From 5561f9707602bca1e768a58f9c2ff30d70586ead Mon Sep 17 00:00:00 2001 From: infirit Date: Sat, 13 Dec 2014 14:50:54 +0100 Subject: 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. Taken from GSD commit: f6257d7e81aaa79dcd7430c0de092145f64f6146 From: Bastien Nocera --- plugins/xsettings/Makefile.am | 16 ++++------------ plugins/xsettings/msd-xsettings-manager.c | 13 ------------- 2 files changed, 4 insertions(+), 25 deletions(-) (limited to 'plugins') diff --git a/plugins/xsettings/Makefile.am b/plugins/xsettings/Makefile.am index 87f0eab..c4d0520 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 = \ @@ -22,6 +24,7 @@ libxsettings_la_CPPFLAGS = \ libxsettings_la_CFLAGS = \ $(SETTINGS_PLUGIN_CFLAGS) \ + $(FONTCONFIG_CFLAGS) \ $(AM_CFLAGS) libxsettings_la_LDFLAGS = \ @@ -30,20 +33,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.mate-settings-plugin.in \ $(NULL) diff --git a/plugins/xsettings/msd-xsettings-manager.c b/plugins/xsettings/msd-xsettings-manager.c index 4293d18..61f5999 100644 --- a/plugins/xsettings/msd-xsettings-manager.c +++ b/plugins/xsettings/msd-xsettings-manager.c @@ -42,9 +42,7 @@ #include "mate-settings-profile.h" #include "msd-xsettings-manager.h" #include "xsettings-manager.h" -#ifdef HAVE_FONTCONFIG #include "fontconfig-monitor.h" -#endif /* HAVE_FONTCONFIG */ #define MATE_XSETTINGS_MANAGER_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), MATE_TYPE_XSETTINGS_MANAGER, MateXSettingsManagerPrivate)) @@ -52,7 +50,6 @@ #define INTERFACE_SCHEMA "org.mate.interface" #define SOUND_SCHEMA "org.mate.sound" -#ifdef HAVE_FONTCONFIG #define FONT_RENDER_SCHEMA "org.mate.font-rendering" #define FONT_ANTIALIASING_KEY "antialiasing" #define FONT_HINTING_KEY "hinting" @@ -73,8 +70,6 @@ #define DPI_LOW_REASONABLE_VALUE 50 #define DPI_HIGH_REASONABLE_VALUE 500 -#endif /* HAVE_FONTCONFIG */ - typedef struct _TranslationEntry TranslationEntry; typedef void (* TranslationFunc) (MateXSettingsManager *manager, TranslationEntry *trans, @@ -93,9 +88,7 @@ struct MateXSettingsManagerPrivate XSettingsManager **managers; GHashTable *gsettings; GSettings *gsettings_font; -#ifdef HAVE_FONTCONFIG fontconfig_monitor_handle_t *fontconfig_handle; -#endif /* HAVE_FONTCONFIG */ }; #define MSD_XSETTINGS_ERROR msd_xsettings_error_quark () @@ -216,7 +209,6 @@ static TranslationEntry translations [] = { { SOUND_SCHEMA, "input-feedback-sounds", "Net/EnableInputFeedbackSounds", translate_bool_int } }; -#ifdef HAVE_FONTCONFIG static double dpi_from_pixels_and_mm (int pixels, int mm) @@ -549,7 +541,6 @@ stop_fontconfig_monitor (MateXSettingsManager *manager) manager->priv->fontconfig_handle = NULL; } } -#endif /* HAVE_FONTCONFIG */ static void process_value (MateXSettingsManager *manager, @@ -717,13 +708,11 @@ mate_xsettings_manager_start (MateXSettingsManager *manager, } g_list_free (list); -#ifdef HAVE_FONTCONFIG manager->priv->gsettings_font = g_settings_new (FONT_RENDER_SCHEMA); g_signal_connect (manager->priv->gsettings_font, "changed", G_CALLBACK (xft_callback), manager); update_xft_settings (manager, manager->priv->gsettings_font); start_fontconfig_monitor (manager); -#endif /* HAVE_FONTCONFIG */ for (i = 0; manager->priv->managers [i]; i++) xsettings_manager_set_string (manager->priv->managers [i], @@ -760,14 +749,12 @@ mate_xsettings_manager_stop (MateXSettingsManager *manager) p->gsettings = NULL; } -#ifdef HAVE_FONTCONFIG if (p->gsettings_font != NULL) { g_object_unref (p->gsettings_font); p->gsettings_font = NULL; } stop_fontconfig_monitor (manager); -#endif /* HAVE_FONTCONFIG */ } -- cgit v1.2.1