[gnome-documents] views: cache the current value of selection mode



commit 41233c755ff72717c0a386330b084df48027af32
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Thu Mar 1 17:24:03 2012 -0500

    views: cache the current value of selection mode

 src/lib/gd-main-icon-view.c |    3 +++
 src/lib/gd-main-list-view.c |    4 ++++
 2 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/lib/gd-main-icon-view.c b/src/lib/gd-main-icon-view.c
index ad7864b..b796280 100644
--- a/src/lib/gd-main-icon-view.c
+++ b/src/lib/gd-main-icon-view.c
@@ -35,6 +35,7 @@
 
 struct _GdMainIconViewPrivate {
   GtkCellRenderer *pixbuf_cell;
+  gboolean selection_mode;
 };
 
 static void gd_main_view_generic_iface_init (GdMainViewGenericIface *iface);
@@ -134,6 +135,8 @@ gd_main_icon_view_set_selection_mode (GdMainViewGeneric *mv,
 {
   GdMainIconView *self = GD_MAIN_ICON_VIEW (mv);
 
+  self->priv->selection_mode = selection_mode;
+
   g_object_set (self->priv->pixbuf_cell,
                 "toggle-visible", selection_mode,
                 NULL);
diff --git a/src/lib/gd-main-list-view.c b/src/lib/gd-main-list-view.c
index 5a93acd..34dabf3 100644
--- a/src/lib/gd-main-list-view.c
+++ b/src/lib/gd-main-list-view.c
@@ -29,6 +29,8 @@
 struct _GdMainListViewPrivate {
   GtkTreeViewColumn *tree_col;
   GtkCellRenderer *selection_cell;
+
+  gboolean selection_mode;
 };
 
 static void gd_main_view_generic_iface_init (GdMainViewGenericIface *iface);
@@ -126,6 +128,8 @@ gd_main_list_view_set_selection_mode (GdMainViewGeneric *mv,
 {
   GdMainListView *self = GD_MAIN_LIST_VIEW (mv);
 
+  self->priv->selection_mode = selection_mode;
+
   g_object_set (self->priv->selection_cell,
                 "visible", selection_mode,
                 NULL);



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