[gnome-settings-daemon] background: reintroduce GnomeBg "changed" signal
- From: Tomas Bzatek <tbzatek src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] background: reintroduce GnomeBg "changed" signal
- Date: Tue, 7 Dec 2010 15:41:45 +0000 (UTC)
commit d7a6f707c9e6f924fea7565967d9c5c1ad8b1533
Author: Tomas Bzatek <tbzatek redhat com>
Date: Tue Dec 7 16:40:09 2010 +0100
background: reintroduce GnomeBg "changed" signal
GnomeBG sends "changed" signal when any property changes, also when
settings is loaded from GSettings. Listening to it would assure
that we set background on plugin startup.
See bug 636191 for details.
plugins/background/gsd-background-manager.c | 26 +++++++++++++++-----------
1 files changed, 15 insertions(+), 11 deletions(-)
---
diff --git a/plugins/background/gsd-background-manager.c b/plugins/background/gsd-background-manager.c
index d4010b7..06be0d7 100644
--- a/plugins/background/gsd-background-manager.c
+++ b/plugins/background/gsd-background-manager.c
@@ -221,22 +221,14 @@ on_bg_transitioned (GnomeBG *bg,
draw_background (manager, FALSE);
}
-static void
-background_changed (GsdBackgroundManager *manager,
- gboolean use_crossfade)
-{
- gnome_bg_load_from_preferences (manager->priv->bg,
- manager->priv->settings);
- draw_background (manager, use_crossfade);
-}
-
static gboolean
settings_change_event_cb (GSettings *settings,
gpointer keys,
gint n_keys,
GsdBackgroundManager *manager)
{
- background_changed (manager, TRUE);
+ gnome_bg_load_from_preferences (manager->priv->bg,
+ manager->priv->settings);
return FALSE;
}
@@ -244,7 +236,7 @@ static void
on_screen_size_changed (GdkScreen *screen,
GsdBackgroundManager *manager)
{
- background_changed (manager, FALSE);
+ draw_background (manager, FALSE);
}
static void
@@ -257,6 +249,13 @@ watch_bg_preferences (GsdBackgroundManager *manager)
}
static void
+on_bg_changed (GnomeBG *bg,
+ GsdBackgroundManager *manager)
+{
+ draw_background (manager, TRUE);
+}
+
+static void
setup_bg (GsdBackgroundManager *manager)
{
g_return_if_fail (manager->priv->bg == NULL);
@@ -264,6 +263,11 @@ setup_bg (GsdBackgroundManager *manager)
manager->priv->bg = gnome_bg_new ();
g_signal_connect (manager->priv->bg,
+ "changed",
+ G_CALLBACK (on_bg_changed),
+ manager);
+
+ g_signal_connect (manager->priv->bg,
"transitioned",
G_CALLBACK (on_bg_transitioned),
manager);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]