From 7ca2a8a3e598b49b9becb104747fa09ee10954b3 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Thu, 16 Dec 2010 19:38:31 +0000 Subject: background: Use g_settings_delay() properly g_settings_delay() doesn't work like GConf's changesets. Either you create a separate GSettings for non-delayed application, or you call g_settings_apply() any time you want changes applied. --- panels/background/cc-background-panel.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/panels/background/cc-background-panel.c b/panels/background/cc-background-panel.c index ba3badd03..feacab34d 100644 --- a/panels/background/cc-background-panel.c +++ b/panels/background/cc-background-panel.c @@ -461,9 +461,6 @@ backgrounds_changed_cb (GtkIconView *icon_view, gtk_tree_model_get (model, &iter, 1, &item, -1); - /* Do all changes in one 'transaction' */ - g_settings_delay (priv->settings); - if (!g_strcmp0 (item->filename, "(none)")) { g_settings_set_enum (priv->settings, WP_OPTIONS_KEY, G_DESKTOP_BACKGROUND_STYLE_NONE); @@ -673,6 +670,8 @@ style_changed_cb (GtkComboBox *box, if (priv->current_background) priv->current_background->options = value; + g_settings_apply (priv->settings); + update_preview (priv, NULL, TRUE); } @@ -704,6 +703,8 @@ color_changed_cb (GtkColorButton *button, else g_settings_set_string (priv->settings, WP_SCOLOR_KEY, value); + g_settings_apply (priv->settings); + g_free (value); update_preview (priv, NULL, TRUE); @@ -736,6 +737,7 @@ cc_background_panel_init (CcBackgroundPanel *self) } priv->settings = g_settings_new (WP_PATH_ID); + g_settings_delay (priv->settings); store = (GtkListStore*) gtk_builder_get_object (priv->builder, "sources-liststore"); -- cgit v1.2.3