[gnome-control-center/single-window] [shell] ensure there is no selection when the user switches back to icons



commit 28aab9b5e1e1a8b0628a6a0057ed9218c04e6561
Author: Thomas Wood <thomas pepper localdomain>
Date:   Wed Dec 2 16:54:22 2009 +0000

    [shell] ensure there is no selection when the user switches back to icons
    
    Remove the selection from all the icon views after a capplet has been
    activated so that no item is selected if the user switches back to the icon
    views.

 shell/control-center.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/shell/control-center.c b/shell/control-center.c
index 2368c4b..b895e7a 100644
--- a/shell/control-center.c
+++ b/shell/control-center.c
@@ -177,14 +177,21 @@ fill_model (GtkBuilder *b)
 }
 
 void
-plug_added_cb (GtkSocket *socket,
+plug_added_cb (GtkSocket  *socket,
                GtkBuilder *builder)
 {
   GtkWidget *notebook;
+  GSList *l, *iconviews;
 
   notebook = W (builder, "notebook");
 
   gtk_notebook_set_page (GTK_NOTEBOOK (notebook), 1);
+
+  /* make sure no items are selected when the user switches back to the icon
+   * views */
+  iconviews = (GSList*) g_object_get_data (G_OBJECT (builder), "iconviews");
+  for (l = iconviews; l; l = l->next)
+      gtk_icon_view_unselect_all (GTK_ICON_VIEW (l->data));
 }
 
 void



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]