[gnome-documents] selections: make the initial placeholder checkbox invisible



commit 67ad5be3c12c2c0b9e1259587b5227ed8e64e48b
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Thu Mar 8 15:15:31 2012 -0500

    selections: make the initial placeholder checkbox invisible
    
    You wouldn't be able to click it anyway.

 src/selections.js |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/selections.js b/src/selections.js
index 7de3752..9f763dd 100644
--- a/src/selections.js
+++ b/src/selections.js
@@ -38,6 +38,8 @@ const Utils = imports.utils;
 const Lang = imports.lang;
 const Signals = imports.signals;
 
+const _COLLECTION_PLACEHOLDER_ID = 'collection-placeholder';
+
 // fetch all the collections a given item is part of
 function FetchCollectionsJob(urn) {
     this._init(urn);
@@ -404,7 +406,7 @@ OrganizeCollectionModel.prototype = {
 
         let iter = this.model.append();
         Gd.organize_store_set(this.model, iter,
-                              'collection-placeholder', '', OrganizeCollectionState.ACTIVE);
+                              _COLLECTION_PLACEHOLDER_ID, '', OrganizeCollectionState.ACTIVE);
 
         let placeholderPath = this.model.get_path(iter);
         if (placeholderPath != null)
@@ -547,9 +549,11 @@ OrganizeCollectionView.prototype = {
 
     _checkCellFunc: function(col, cell, model, iter) {
         let state = model.get_value(iter, OrganizeModelColumns.STATE);
+        let id = model.get_value(iter, OrganizeModelColumns.ID);
 
         cell.active = (state & OrganizeCollectionState.ACTIVE);
         cell.inconsistent = (state & OrganizeCollectionState.INCONSISTENT);
+        cell.visible = (id != _COLLECTION_PLACEHOLDER_ID);
     },
 
     _detailCellFunc: function(col, cell, model, iter) {



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