[gnome-control-center] background: Load initial state from GSettings
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] background: Load initial state from GSettings
- Date: Fri, 11 Feb 2011 12:51:14 +0000 (UTC)
commit 9b55bb20e3bcc229ce74a46dbda942c7c0f9dd14
Author: Bastien Nocera <hadess hadess net>
Date: Fri Feb 11 12:39:51 2011 +0000
background: Load initial state from GSettings
gnome_wp_item_update() used to do that for us.
panels/background/cc-background-panel.c | 20 ++++++++++++--------
1 files changed, 12 insertions(+), 8 deletions(-)
---
diff --git a/panels/background/cc-background-panel.c b/panels/background/cc-background-panel.c
index 871f014..47a5532 100644
--- a/panels/background/cc-background-panel.c
+++ b/panels/background/cc-background-panel.c
@@ -825,17 +825,21 @@ cc_background_panel_init (CcBackgroundPanel *self)
/* initalise the current background information from settings */
filename = g_settings_get_string (priv->settings, WP_FILE_KEY);
priv->current_background = cc_background_item_new (filename);
- g_object_set (G_OBJECT (priv->current_background), "name", _("Current background"), NULL);
- //FIXME load other properties
+ /* FIXME Set flags too:
+ * - if we have a gradient and no filename, set PCOLOR, etc.
+ *
+ * Move into cc-background-item.c like the old cc_background_item_update()?
+ */
+ g_object_set (G_OBJECT (priv->current_background),
+ "name", _("Current background"),
+ "placement", g_settings_get_enum (priv->settings, WP_OPTIONS_KEY),
+ "shading", g_settings_get_enum (priv->settings, WP_SHADING_KEY),
+ "primary-color", g_settings_get_string (priv->settings, WP_PCOLOR_KEY),
+ "secondary-color", g_settings_get_string (priv->settings, WP_SCOLOR_KEY),
+ NULL);
cc_background_item_load (priv->current_background, NULL);
- //FIXME call load?
-#if 0
- cc_background_item_update (priv->current_background);
- cc_background_item_ensure_gnome_bg (priv->current_background);
- cc_background_item_update_size (priv->current_background, priv->thumb_factory);
-#endif
update_preview (priv, NULL, TRUE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]