gnome-settings-daemon r598 - in trunk: . plugins/background
- From: behdad svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-settings-daemon r598 - in trunk: . plugins/background
- Date: Thu, 6 Nov 2008 20:47:41 +0000 (UTC)
Author: behdad
Date: Thu Nov 6 20:47:41 2008
New Revision: 598
URL: http://svn.gnome.org/viewvc/gnome-settings-daemon?rev=598&view=rev
Log:
2008-11-06 Behdad Esfahbod <behdad gnome org>
* plugins/background/gsd-background-manager.c (setup_bg),
(queue_draw_background), (gsd_background_manager_start):
Delay constructing the GnomeBg object until we need it. This avoids
unneeded change triggers caused by a bug in gnome-screensaver (fixed
in trunk it seems). (bug #559639)
Modified:
trunk/ChangeLog
trunk/plugins/background/gsd-background-manager.c
Modified: trunk/plugins/background/gsd-background-manager.c
==============================================================================
--- trunk/plugins/background/gsd-background-manager.c (original)
+++ trunk/plugins/background/gsd-background-manager.c Thu Nov 6 20:47:41 2008
@@ -193,14 +193,6 @@
gnome_settings_profile_end (NULL);
}
-static gboolean
-queue_draw_background (GsdBackgroundManager *manager)
-{
- manager->priv->timeout_id = 0;
- draw_background (manager);
- return FALSE;
-}
-
static void
on_bg_changed (GnomeBG *bg,
GsdBackgroundManager *manager)
@@ -235,16 +227,11 @@
NULL);
}
-gboolean
-gsd_background_manager_start (GsdBackgroundManager *manager,
- GError **error)
+static void
+setup_bg (GsdBackgroundManager *manager)
{
- gboolean nautilus_show_desktop;
+ g_return_if_fail (manager->priv->bg == NULL);
- g_debug ("Starting background manager");
- gnome_settings_profile_start (NULL);
-
- manager->priv->client = gconf_client_get_default ();
manager->priv->bg = gnome_bg_new ();
g_signal_connect (manager->priv->bg,
@@ -255,6 +242,27 @@
watch_bg_preferences (manager);
gnome_bg_load_from_preferences (manager->priv->bg,
manager->priv->client);
+}
+
+static gboolean
+queue_draw_background (GsdBackgroundManager *manager)
+{
+ manager->priv->timeout_id = 0;
+ setup_bg (manager);
+ draw_background (manager);
+ return FALSE;
+}
+
+gboolean
+gsd_background_manager_start (GsdBackgroundManager *manager,
+ GError **error)
+{
+ gboolean nautilus_show_desktop;
+
+ g_debug ("Starting background manager");
+ gnome_settings_profile_start (NULL);
+
+ manager->priv->client = gconf_client_get_default ();
/* If this is set, nautilus will draw the background and is
* almost definitely in our session. however, it may not be
@@ -268,6 +276,7 @@
NULL);
if (!nautilus_show_desktop) {
+ setup_bg (manager);
draw_background (manager);
} else {
/* even when nautilus is supposedly handling the
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]