summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorJasmine Hassan <[email protected]>2012-12-01 21:24:16 +0200
committerJasmine Hassan <[email protected]>2012-12-01 21:39:00 +0200
commitd4fa668e674bbf38054aa8573539892738a1815d (patch)
tree77fc23e56cf142826c03ee4e3428b608a071d633 /plugins
parent4d1c861ade36250c2650f4526c375c3f6f7db73c (diff)
downloadmate-settings-daemon-d4fa668e674bbf38054aa8573539892738a1815d.tar.bz2
mate-settings-daemon-d4fa668e674bbf38054aa8573539892738a1815d.tar.xz
[background] listen for draw-background/show-desktop-icons changed signals
Because we should handle the background drawing when either: - "draw-background" is re-enabled, or - "show-desktop-icons" is disabled. N.B. We may still need to consider this issue, which was never resolved in gnome, because they stopped auto-launching nautilus & removed it from 3.0 sessions: Nautilus registers with the session before it's ready. https://bugzilla.gnome.org/show_bug.cgi?id=568588 Would also be wise to import the (recent) changes made in the bug below: Provide a singleton SessionManager proxy object https://bugzilla.gnome.org/show_bug.cgi?id=686556
Diffstat (limited to 'plugins')
-rw-r--r--plugins/background/msd-background-manager.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/plugins/background/msd-background-manager.c b/plugins/background/msd-background-manager.c
index 40d396b..c98a225 100644
--- a/plugins/background/msd-background-manager.c
+++ b/plugins/background/msd-background-manager.c
@@ -340,7 +340,8 @@ queue_draw_background (MsdBackgroundManager *manager)
{
manager->priv->timeout_id = 0;
- setup_bg (manager);
+ if (manager->priv->bg == NULL)
+ setup_bg (manager);
draw_background (manager, FALSE);
@@ -467,6 +468,15 @@ connect_screen_signals (MsdBackgroundManager* manager)
}
}
+static void
+background_handling_changed (GSettings *settings,
+ const char *key,
+ MsdBackgroundManager *manager)
+{
+ if (dont_draw_background (manager) == FALSE)
+ queue_timeout (manager);
+}
+
gboolean
msd_background_manager_start (MsdBackgroundManager *manager,
GError **error)
@@ -477,6 +487,10 @@ msd_background_manager_start (MsdBackgroundManager *manager,
mate_settings_profile_start(NULL);
manager->priv->settings = g_settings_new (MATE_BG_SCHEMA);
+ g_signal_connect (manager->priv->settings, "changed::" MATE_BG_DRAW_BACKGROUND,
+ G_CALLBACK (background_handling_changed), manager);
+ g_signal_connect (manager->priv->settings, "changed::" MATE_BG_SHOW_DESKTOP_ICONS,
+ G_CALLBACK (background_handling_changed), manager);
/* If this is set, caja will draw the background and is
* almost definitely in our session. however, it may not be