[gnome-control-center] background: hide the placement options only when a background is selected
- From: Thomas Wood <thos src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] background: hide the placement options only when a background is selected
- Date: Fri, 13 Aug 2010 16:33:07 +0000 (UTC)
commit f41e3268df0dfd3a2ee8a5edc6a9bb54e9a198a8
Author: Thomas Wood <thomas wood intel com>
Date: Fri Aug 13 16:54:49 2010 +0100
background: hide the placement options only when a background is selected
Only update the visibility of the placement options when a background is
selected, not when the source is selected.
panels/background/cc-background-panel.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/panels/background/cc-background-panel.c b/panels/background/cc-background-panel.c
index 5a48872..99ffc1a 100644
--- a/panels/background/cc-background-panel.c
+++ b/panels/background/cc-background-panel.c
@@ -213,7 +213,6 @@ source_changed_cb (GtkTreeSelection *selection,
gtk_tree_selection_get_selected (selection, &model, &iter);
gtk_tree_model_get (model, &iter,
1, &type,
- 2, &priv->current_source_readonly,
3, &source, -1);
view = (GtkIconView *) gtk_builder_get_object (priv->builder,
@@ -316,12 +315,21 @@ backgrounds_changed_cb (GtkIconView *icon_view,
GConfChangeSet *cs;
gchar *pcolor, *scolor;
CcBackgroundPanelPrivate *priv = panel->priv;
+ GtkTreeSelection *selection;
list = gtk_icon_view_get_selected_items (icon_view);
if (!list)
return;
+ /* check if the current source is read only, i.e. the image placement and
+ * color is predefined */
+ selection = gtk_tree_view_get_selection (WID ("sources-treeview"));
+ model = gtk_tree_view_get_model (WID ("sources-treeview"));
+ gtk_tree_selection_get_selected (selection, &model, &iter);
+ gtk_tree_model_get (model, &iter, 2, &priv->current_source_readonly, -1);
+
+
model = gtk_icon_view_get_model (icon_view);
gtk_tree_model_get_iter (model, &iter, (GtkTreePath*) list->data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]