gnome-settings-daemon r375 - in branches/randr-12: . gnome-settings-daemon plugins/common plugins/font plugins/mouse plugins/sound plugins/xsettings po



Author: ssp
Date: Mon Jun 16 18:36:43 2008
New Revision: 375
URL: http://svn.gnome.org/viewvc/gnome-settings-daemon?rev=375&view=rev

Log:
Mon Jun 16 14:30:13 2008  SÃren Sandmann  <sandmann redhat com>

        * Merge from trunk.



Added:
   branches/randr-12/plugins/xsettings/fontconfig-monitor.c
      - copied unchanged from r374, /trunk/plugins/xsettings/fontconfig-monitor.c
   branches/randr-12/plugins/xsettings/fontconfig-monitor.h
      - copied unchanged from r374, /trunk/plugins/xsettings/fontconfig-monitor.h
Modified:
   branches/randr-12/ChangeLog
   branches/randr-12/NEWS
   branches/randr-12/configure.ac
   branches/randr-12/gnome-settings-daemon/gnome-settings-manager.c
   branches/randr-12/gnome-settings-daemon/main.c
   branches/randr-12/plugins/common/gsd-keygrab.c
   branches/randr-12/plugins/font/gsd-font-manager.c
   branches/randr-12/plugins/mouse/gsd-locate-pointer.c
   branches/randr-12/plugins/sound/Makefile.am
   branches/randr-12/plugins/sound/gsd-sound-manager.c
   branches/randr-12/plugins/xsettings/Makefile.am
   branches/randr-12/plugins/xsettings/gsd-xsettings-manager.c
   branches/randr-12/po/ChangeLog
   branches/randr-12/po/ar.po
   branches/randr-12/po/th.po
   branches/randr-12/po/vi.po

Modified: branches/randr-12/NEWS
==============================================================================
--- branches/randr-12/NEWS	(original)
+++ branches/randr-12/NEWS	Mon Jun 16 18:36:43 2008
@@ -1,3 +1,36 @@
+==============
+Version 2.23.3
+==============
+- Execute the correct action when there are multiple keyboard shortcuts with
+  the same keycode but different keysyms (Bastien Nocera) (#530356)
+- Fix wallpaper handling for people running a session without nautilus
+  (Matthias Clasen) (#531487)
+- Try to keep the keyboard layout from gdm (Matthias Clasen) (#531589)
+- Don't die when the user's home directory is read-only (Brian Cameron)
+  (#530975)
+- Fix artifacts from the locate pointer animation in non-composited mode
+  (Carlos Garnacho) (#531861)
+- Pass clicks to the media popup window through to the underlying window
+  (Carlos Garnacho) (#531862)
+- Use new gnome-desktop background API and get rid of libbackground (William
+  Jon McCann)
+- Don't eat keypresses for multimedia key events in the mouse plugin (Bastien
+  Nocera)
+- Shutdown when receiving the "SessionOver" signal from gnome-session (Lucas
+  Rocha, Jens Granseuer) (#522017)
+- Fix memory leaks in the font plugin (Jens Granseuer)
+- Move the locate pointer animation with the mouse cursor (Gerd Kohlberger)
+  (#531665)
+- Fix build without GStreamer (Jens Granseuer) (#536177)
+- Updated translation:
+  - ar (Djihed Afifi)
+  - bg (Yavor Doganov)
+  - es (Jorge Gonzalez)
+  - gl (Ignacio Casal Quinteiro)
+  - nb (Kjartan Maraas)
+  - th (Theppitak Karoonboonyanan)
+  - vi (Clytie Siddall)
+
 ================
 Version 2.23.1.1
 ================

Modified: branches/randr-12/configure.ac
==============================================================================
--- branches/randr-12/configure.ac	(original)
+++ branches/randr-12/configure.ac	Mon Jun 16 18:36:43 2008
@@ -5,7 +5,7 @@
 m4_define([gsd_api_version],[gsd_api_version_major.gsd_api_version_minor])
 
 AC_INIT([gnome-settings-daemon],
-        [2.23.2],
+        [2.23.3],
         [http://bugzilla.gnome.org/enter_bug.cgi?product=gnome-settings-daemon])
 
 AC_CONFIG_SRCDIR([gnome-settings-daemon/gnome-settings-manager.c])
@@ -175,12 +175,15 @@
 AC_SUBST(RANDR_LIBS)
 
 dnl ---------------------------------------------------------------------------
-dnl - XFT2
+dnl - Fontconfig
 dnl ---------------------------------------------------------------------------
 
-if $PKG_CONFIG --exists xft; then
-  AC_DEFINE(HAVE_XFT2, 1, [Define if Xft functionality is available])
-fi
+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")
 
 dnl ---------------------------------------------------------------------------
 dnl - Keyboard plugin stuff
@@ -219,10 +222,18 @@
        PKG_CHECK_MODULES(ESD, esound >= 0.2.28,
 	       AC_DEFINE(HAVE_ESD, 1, [Define if ESD sound server should be used]),
                AC_MSG_RESULT([disabled]))
+
+       GSD_ESD_LOCATION=`pkg-config esound --variable=esd_serverdir`
+       if test "x$GSD_ESD_LOCATION" != "x"; then
+           # Add slash so that if the ESD pkgconfig file does not
+           # specify esd_serverdir, g-s-d will look in the PATH
+           GSD_ESD_LOCATION="$GSD_ESD_LOCATION/"
+       fi
 fi
 
 AC_SUBST(ESD_CFLAGS)
 AC_SUBST(ESD_LIBS)
+AC_SUBST(ESD_LOCATION)
 
 dnl ==============================================
 dnl GStreamer section
@@ -251,7 +262,9 @@
    PKG_CHECK_MODULES(GST, $PKGS, have_gstreamer=yes,
                      AC_MSG_RESULT([no]))
 
-   GST_LIBS="$GST_LIBS -lgstinterfaces-0.10 -lgstaudio-0.10"
+   if test "x$have_gstreamer" = "xyes"; then
+      GST_LIBS="$GST_LIBS -lgstinterfaces-0.10 -lgstaudio-0.10"
+   fi
 else
    AC_MSG_NOTICE([*** GStreamer support disabled ***])
 fi

Modified: branches/randr-12/gnome-settings-daemon/gnome-settings-manager.c
==============================================================================
--- branches/randr-12/gnome-settings-daemon/gnome-settings-manager.c	(original)
+++ branches/randr-12/gnome-settings-daemon/gnome-settings-manager.c	Mon Jun 16 18:36:43 2008
@@ -273,9 +273,18 @@
 }
 
 static void
+_unload_plugin (GnomeSettingsPluginInfo *info, gpointer user_data)
+{
+        if (gnome_settings_plugin_info_get_enabled (info)) {
+                gnome_settings_plugin_info_deactivate (info);
+        }
+        g_object_unref (info);
+}
+
+static void
 _unload_all (GnomeSettingsManager *manager)
 {
-         g_slist_foreach (manager->priv->plugins, (GFunc) g_object_unref, NULL);
+         g_slist_foreach (manager->priv->plugins, (GFunc) _unload_plugin, NULL);
          g_slist_free (manager->priv->plugins);
          manager->priv->plugins = NULL;
 }

Modified: branches/randr-12/gnome-settings-daemon/main.c
==============================================================================
--- branches/randr-12/gnome-settings-daemon/main.c	(original)
+++ branches/randr-12/gnome-settings-daemon/main.c	Mon Jun 16 18:36:43 2008
@@ -38,6 +38,10 @@
 
 #define GSD_DBUS_NAME         "org.gnome.SettingsDaemon"
 
+#define GNOME_SESSION_DBUS_NAME      "org.gnome.SessionManager"
+#define GNOME_SESSION_DBUS_OBJECT    "/org/gnome/SessionManager"
+#define GNOME_SESSION_DBUS_INTERFACE "org.gnome.SessionManager"
+
 static char      *gconf_prefix = NULL;
 static gboolean   no_daemon    = FALSE;
 static gboolean   debug        = FALSE;
@@ -130,9 +134,8 @@
 }
 
 static gboolean
-bus_register (void)
+bus_register (DBusGConnection *bus)
 {
-        DBusGConnection *bus;
         DBusGProxy      *bus_proxy;
         gboolean         ret;
 
@@ -140,14 +143,7 @@
 
         ret = FALSE;
 
-        bus = get_session_bus ();
-        if (bus == NULL) {
-                g_warning ("Could not get a connection to the bus");
-                goto out;
-        }
-
         bus_proxy = get_bus_proxy (bus);
-        dbus_g_connection_unref (bus);
 
         if (bus_proxy == NULL) {
                 g_warning ("Could not construct bus_proxy object");
@@ -171,6 +167,46 @@
 }
 
 static void
+on_session_over (DBusGProxy *proxy, GnomeSettingsManager *manager)
+{
+        gnome_settings_manager_stop (manager);
+        gtk_main_quit ();
+}
+
+static void
+set_session_over_handler (DBusGConnection *bus, GnomeSettingsManager *manager)
+{
+        DBusGProxy *session_proxy;
+
+        g_assert (bus != NULL);
+
+        gnome_settings_profile_start (NULL);
+
+        session_proxy = 
+                 dbus_g_proxy_new_for_name (bus,
+                                            GNOME_SESSION_DBUS_NAME,
+                                            GNOME_SESSION_DBUS_OBJECT,
+                                            GNOME_SESSION_DBUS_INTERFACE);
+
+	dbus_g_object_register_marshaller (
+		g_cclosure_marshal_VOID__VOID,
+		G_TYPE_NONE,
+		G_TYPE_INVALID);
+
+        dbus_g_proxy_add_signal (session_proxy, 
+                                 "SessionOver",
+                                 G_TYPE_INVALID);
+
+        dbus_g_proxy_connect_signal (session_proxy, 
+                                     "SessionOver",
+                                     G_CALLBACK (on_session_over), 
+                                     manager,
+                                     NULL);
+
+        gnome_settings_profile_end (NULL);
+}
+
+static void
 gsd_log_default_handler (const gchar   *log_domain,
                          GLogLevelFlags log_level,
                          const gchar   *message,
@@ -193,6 +229,7 @@
 {
         GnomeSettingsManager *manager;
         GnomeProgram         *program;
+        DBusGConnection      *bus;
         gboolean              res;
         GError               *error;
         gboolean              create_dirs;
@@ -229,7 +266,13 @@
                 g_error ("Could not daemonize: %s", g_strerror (errno));
         }
 
-        if (! bus_register ()) {
+        bus = get_session_bus ();
+        if (bus == NULL) {
+                g_warning ("Could not get a connection to the bus");
+                goto out;
+        }
+
+        if (! bus_register (bus)) {
                 goto out;
         }
 
@@ -257,6 +300,8 @@
                 goto out;
         }
 
+        set_session_over_handler (bus, manager);
+
         /* If we aren't started by dbus then load the plugins
            automatically.  Otherwise, wait for an Awake etc. */
         if (g_getenv ("DBUS_STARTER_BUS_TYPE") == NULL) {
@@ -278,6 +323,10 @@
  out:
         g_free (gconf_prefix);
 
+        if (bus != NULL) {
+                dbus_g_connection_unref (bus);
+        }
+
         if (manager != NULL) {
                 g_object_unref (manager);
         }

Modified: branches/randr-12/plugins/common/gsd-keygrab.c
==============================================================================
--- branches/randr-12/plugins/common/gsd-keygrab.c	(original)
+++ branches/randr-12/plugins/common/gsd-keygrab.c	Mon Jun 16 18:36:43 2008
@@ -173,6 +173,12 @@
 		guint lower, upper;
 
 		gdk_keyval_convert_case (keyval, &lower, &upper);
+
+		/* If we don't have different keysyms depending on the
+		 * shift state, remove the shift state from the consumed */
+		if (upper == lower)
+			consumed &= ~GDK_SHIFT_MASK;
+
 		return ((lower == key->keysym || upper == key->keysym)
 			&& (key->state & ~consumed & GSD_USED_MODS) == key->state);
 	}

Modified: branches/randr-12/plugins/font/gsd-font-manager.c
==============================================================================
--- branches/randr-12/plugins/font/gsd-font-manager.c	(original)
+++ branches/randr-12/plugins/font/gsd-font-manager.c	Mon Jun 16 18:36:43 2008
@@ -156,18 +156,22 @@
 
         command = "xrdb -nocpp -merge";
 
-        add_string = g_string_new (NULL);
 
-        cursor_theme = gconf_client_get_string (client,
-                                                "/desktop/gnome/peripherals/mouse/cursor_theme",
-                                                NULL);
         size = gconf_client_get_int (client,
                                      "/desktop/gnome/peripherals/mouse/cursor_size",
                                      NULL);
-        if (cursor_theme == NULL || size <= 0) {
+        if (size <= 0) {
                 return;
         }
 
+        cursor_theme = gconf_client_get_string (client,
+                                                "/desktop/gnome/peripherals/mouse/cursor_theme",
+                                                NULL);
+        if (cursor_theme == NULL) {
+                return;
+        }
+
+        add_string = g_string_new (NULL);
         g_string_append_printf (add_string,
                                 "Xcursor.theme: %s\n",
                                 cursor_theme);

Modified: branches/randr-12/plugins/mouse/gsd-locate-pointer.c
==============================================================================
--- branches/randr-12/plugins/mouse/gsd-locate-pointer.c	(original)
+++ branches/randr-12/plugins/mouse/gsd-locate-pointer.c	Mon Jun 16 18:36:43 2008
@@ -153,6 +153,8 @@
 		   gpointer     user_data)
 {
   GsdLocatePointerData *data = (GsdLocatePointerData *) user_data;
+  GdkScreen *screen;
+  gint cursor_x, cursor_y;
 
   if (gtk_widget_is_composited (data->widget))
     {
@@ -165,6 +167,13 @@
       gdk_window_invalidate_rect (data->window, NULL, FALSE);
       data->progress += CIRCLES_PROGRESS_INTERVAL;
     }
+
+  screen = gdk_drawable_get_screen (data->window);
+  gdk_window_get_pointer (gdk_screen_get_root_window (screen),
+			  &cursor_x, &cursor_y, NULL);
+  gdk_window_move (data->window,
+                   cursor_x - WINDOW_SIZE / 2,
+                   cursor_y - WINDOW_SIZE / 2);
 }
 
 static void

Modified: branches/randr-12/plugins/sound/Makefile.am
==============================================================================
--- branches/randr-12/plugins/sound/Makefile.am	(original)
+++ branches/randr-12/plugins/sound/Makefile.am	Mon Jun 16 18:36:43 2008
@@ -16,6 +16,7 @@
 	$(AM_CPPFLAGS)
 
 libsound_la_CFLAGS = \
+	-DESD_LOCATION=\"$(ESD_LOCATION)\" \
 	$(SETTINGS_PLUGIN_CFLAGS)	\
 	$(GNOME_CFLAGS)			\
 	$(ESD_CFLAGS)			\

Modified: branches/randr-12/plugins/sound/gsd-sound-manager.c
==============================================================================
--- branches/randr-12/plugins/sound/gsd-sound-manager.c	(original)
+++ branches/randr-12/plugins/sound/gsd-sound-manager.c	Mon Jun 16 18:36:43 2008
@@ -97,7 +97,7 @@
 static gboolean
 start_gnome_sound (GsdSoundManager *manager)
 {
-        char    *argv[] = { "esd", "-nobeeps", NULL};
+        char    *argv[] = { ESD_LOCATION  "esd", "-nobeeps", NULL};
         GError  *error;
         gboolean res;
         time_t   starttime;

Modified: branches/randr-12/plugins/xsettings/Makefile.am
==============================================================================
--- branches/randr-12/plugins/xsettings/Makefile.am	(original)
+++ branches/randr-12/plugins/xsettings/Makefile.am	Mon Jun 16 18:36:43 2008
@@ -32,6 +32,18 @@
 	$(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: branches/randr-12/plugins/xsettings/gsd-xsettings-manager.c
==============================================================================
--- branches/randr-12/plugins/xsettings/gsd-xsettings-manager.c	(original)
+++ branches/randr-12/plugins/xsettings/gsd-xsettings-manager.c	Mon Jun 16 18:36:43 2008
@@ -28,6 +28,7 @@
 #include <unistd.h>
 #include <string.h>
 #include <errno.h>
+#include <time.h>
 
 #include <glib.h>
 #include <glib/gi18n.h>
@@ -40,6 +41,9 @@
 #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))
 
@@ -47,7 +51,7 @@
 #define GTK_SETTINGS_DIR       "/desktop/gtk"
 #define INTERFACE_SETTINGS_DIR "/desktop/gnome/interface"
 
-#ifdef HAVE_XFT2
+#ifdef HAVE_FONTCONFIG
 #define FONT_RENDER_DIR "/desktop/gnome/font_rendering"
 #define FONT_ANTIALIASING_KEY FONT_RENDER_DIR "/antialiasing"
 #define FONT_HINTING_KEY      FONT_RENDER_DIR "/hinting"
@@ -68,7 +72,7 @@
 #define DPI_LOW_REASONABLE_VALUE 50
 #define DPI_HIGH_REASONABLE_VALUE 500
 
-#endif /* HAVE_XFT2 */
+#endif /* HAVE_FONTCONFIG */
 
 typedef struct _TranslationEntry TranslationEntry;
 typedef void (* TranslationFunc) (GnomeXSettingsManager *manager,
@@ -87,6 +91,9 @@
 {
         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 ()
@@ -207,7 +214,7 @@
         { "/desktop/gnome/interface/show_unicode_menu",      "Gtk/ShowUnicodeMenu",     GCONF_VALUE_BOOL,     translate_bool_int },
 };
 
-#ifdef HAVE_XFT2
+#ifdef HAVE_FONTCONFIG
 static double
 dpi_from_pixels_and_mm (int pixels,
                         int mm)
@@ -536,7 +543,23 @@
         }
 }
 
-#endif /* HAVE_XFT2 */
+static void
+fontconfig_callback (fontconfig_monitor_handle_t *handle,
+                     GnomeXSettingsManager       *manager)
+{
+        int i;
+        int timestamp = time (NULL);
+
+        gnome_settings_profile_start (NULL);
+
+        for (i = 0; manager->priv->managers [i]; i++) {
+                xsettings_manager_set_int (manager->priv->managers [i], "Fontconfig/Timestamp", timestamp);
+                xsettings_manager_notify (manager->priv->managers [i]);
+        }
+        gnome_settings_profile_end (NULL);
+}
+
+#endif /* HAVE_FONTCONFIG */
 
 static const char *
 type_to_string (GConfValueType type)
@@ -746,13 +769,15 @@
                                           INTERFACE_SETTINGS_DIR,
                                           (GConfClientNotifyFunc) xsettings_callback);
 
-#ifdef HAVE_XFT2
+#ifdef HAVE_FONTCONFIG
         manager->priv->notify[3] =
                 register_config_callback (manager, client,
                                           FONT_RENDER_DIR,
                                           (GConfClientNotifyFunc) xft_callback);
         update_xft_settings (manager, client);
-#endif /* HAVE_XFT */
+
+        manager->priv->fontconfig_handle = fontconfig_monitor_start ((GFunc) fontconfig_callback, manager);
+#endif /* HAVE_FONTCONFIG */
 
         g_object_unref (client);
 
@@ -793,9 +818,12 @@
         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_XFT2
+#ifdef HAVE_FONTCONFIG
         gconf_client_remove_dir (client, FONT_RENDER_DIR, NULL);
-#endif
+
+        fontconfig_monitor_stop (manager->priv->fontconfig_handle);
+        manager->priv->fontconfig_handle = NULL;
+#endif /* HAVE_FONTCONFIG */
 
         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]