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.
This commit is contained in:
Bastien Nocera 2010-12-16 19:38:31 +00:00
parent 7f309202c5
commit 7ca2a8a3e5

View file

@ -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");