diff options
author | Bastien Nocera <hadess@hadess.net> | 2010-12-16 19:38:31 +0000 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2010-12-16 19:38:31 +0000 |
commit | 7ca2a8a3e598b49b9becb104747fa09ee10954b3 (patch) | |
tree | c0b764c20bd217cb335620de7d768e9f5b657c8d | |
parent | 7f309202c53127c557e65295ba82c475cf8286b2 (diff) |
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.
-rw-r--r-- | panels/background/cc-background-panel.c | 8 |
1 files 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"); |