gnome-settings-daemon r364 - in trunk: . plugins/xsettings



Author: behdad
Date: Tue Jun  3 01:28:52 2008
New Revision: 364
URL: http://svn.gnome.org/viewvc/gnome-settings-daemon?rev=364&view=rev

Log:
2008-06-02  Behdad Esfahbod  <behdad gnome org>

        * configure.ac:
        * plugins/xsettings/Makefile.am:
        * plugins/xsettings/fontconfig-monitor.c:
        * plugins/xsettings/fontconfig-monitor.h:
        * plugins/xsettings/gsd-xsettings-manager.c
        (gnome_xsettings_manager_start), (gnome_xsettings_manager_stop):
        Revert previous change.  Working on a slightly different design.
        (bug #490374)



Removed:
   trunk/plugins/xsettings/fontconfig-monitor.c
   trunk/plugins/xsettings/fontconfig-monitor.h
Modified:
   trunk/ChangeLog
   trunk/configure.ac
   trunk/plugins/xsettings/Makefile.am
   trunk/plugins/xsettings/gsd-xsettings-manager.c

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac	(original)
+++ trunk/configure.ac	Tue Jun  3 01:28:52 2008
@@ -175,15 +175,12 @@
 AC_SUBST(RANDR_LIBS)
 
 dnl ---------------------------------------------------------------------------
-dnl - Fontconfig
+dnl - XFT2
 dnl ---------------------------------------------------------------------------
 
-have_fontconfig=no
-PKG_CHECK_MODULES(FONTCONFIG, fontconfig,
-		  [AC_DEFINE(HAVE_FONTCONFIG, 1, [Define if Fontconfig functionality is available])
-		   have_fontconfig=yes],
-		  AC_MSG_RESULT([no]))
-AM_CONDITIONAL(HAVE_FONTCONFIG, test x"$have_fontconfig" = "xyes")
+if $PKG_CONFIG --exists xft; then
+  AC_DEFINE(HAVE_XFT2, 1, [Define if Xft functionality is available])
+fi
 
 dnl ---------------------------------------------------------------------------
 dnl - Keyboard plugin stuff

Modified: trunk/plugins/xsettings/Makefile.am
==============================================================================
--- trunk/plugins/xsettings/Makefile.am	(original)
+++ trunk/plugins/xsettings/Makefile.am	Tue Jun  3 01:28:52 2008
@@ -32,18 +32,6 @@
 	$(SETTINGS_PLUGIN_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)

Modified: trunk/plugins/xsettings/gsd-xsettings-manager.c
==============================================================================
--- trunk/plugins/xsettings/gsd-xsettings-manager.c	(original)
+++ trunk/plugins/xsettings/gsd-xsettings-manager.c	Tue Jun  3 01:28:52 2008
@@ -28,7 +28,6 @@
 #include <unistd.h>
 #include <string.h>
 #include <errno.h>
-#include <time.h>
 
 #include <glib.h>
 #include <glib/gi18n.h>
@@ -41,9 +40,6 @@
 #include "gnome-settings-profile.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))
 
@@ -51,7 +47,7 @@
 #define GTK_SETTINGS_DIR       "/desktop/gtk"
 #define INTERFACE_SETTINGS_DIR "/desktop/gnome/interface"
 
-#ifdef HAVE_FONTCONFIG
+#ifdef HAVE_XFT2
 #define FONT_RENDER_DIR "/desktop/gnome/font_rendering"
 #define FONT_ANTIALIASING_KEY FONT_RENDER_DIR "/antialiasing"
 #define FONT_HINTING_KEY      FONT_RENDER_DIR "/hinting"
@@ -72,7 +68,7 @@
 #define DPI_LOW_REASONABLE_VALUE 50
 #define DPI_HIGH_REASONABLE_VALUE 500
 
-#endif /* HAVE_FONTCONFIG */
+#endif /* HAVE_XFT2 */
 
 typedef struct _TranslationEntry TranslationEntry;
 typedef void (* TranslationFunc) (GnomeXSettingsManager *manager,
@@ -91,9 +87,6 @@
 {
         XSettingsManager **managers;
         guint              notify[4];
-#ifdef HAVE_FONTCONFIG
-        fontconfig_monitor_handle_t *fontconfig_handle;
-#endif /* HAVE_FONTCONFIG */
 };
 
 #define GSD_XSETTINGS_ERROR gsd_xsettings_error_quark ()
@@ -214,7 +207,7 @@
         { "/desktop/gnome/interface/show_unicode_menu",      "Gtk/ShowUnicodeMenu",     GCONF_VALUE_BOOL,     translate_bool_int },
 };
 
-#ifdef HAVE_FONTCONFIG
+#ifdef HAVE_XFT2
 static double
 dpi_from_pixels_and_mm (int pixels,
                         int mm)
@@ -543,22 +536,7 @@
         }
 }
 
-static void
-fontconfig_callback (fontconfig_monitor_handle_t *handle,
-                     GnomeXSettingsManager       *manager)
-{
-        int i;
-
-        gnome_settings_profile_start (NULL);
-
-        for (i = 0; manager->priv->managers [i]; i++) {
-                xsettings_manager_set_int (manager->priv->managers [i], "Fontconfig/Timestamp", time(NULL));
-                xsettings_manager_notify (manager->priv->managers [i]);
-        }
-        gnome_settings_profile_end (NULL);
-}
-
-#endif /* HAVE_FONTCONFIG */
+#endif /* HAVE_XFT2 */
 
 static const char *
 type_to_string (GConfValueType type)
@@ -768,15 +746,13 @@
                                           INTERFACE_SETTINGS_DIR,
                                           (GConfClientNotifyFunc) xsettings_callback);
 
-#ifdef HAVE_FONTCONFIG
+#ifdef HAVE_XFT2
         manager->priv->notify[3] =
                 register_config_callback (manager, client,
                                           FONT_RENDER_DIR,
                                           (GConfClientNotifyFunc) xft_callback);
         update_xft_settings (manager, client);
-
-        manager->priv->fontconfig_handle = fontconfig_monitor_start ((GFunc) fontconfig_callback, manager);
-#endif /* HAVE_FONTCONFIG */
+#endif /* HAVE_XFT */
 
         g_object_unref (client);
 
@@ -817,12 +793,9 @@
         gconf_client_remove_dir (client, MOUSE_SETTINGS_DIR, NULL);
         gconf_client_remove_dir (client, GTK_SETTINGS_DIR, NULL);
         gconf_client_remove_dir (client, INTERFACE_SETTINGS_DIR, NULL);
-#ifdef HAVE_FONTCONFIG
+#ifdef HAVE_XFT2
         gconf_client_remove_dir (client, FONT_RENDER_DIR, NULL);
-
-        fontconfig_monitor_stop (manager->priv->fontconfig_handle);
-        manager->priv->fontconfig_handle = NULL;
-#endif /* HAVE_FONTCONFIG */
+#endif
 
         for (i = 0; i < G_N_ELEMENTS (p->notify); ++i) {
                 if (p->notify[i] != 0) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]