[gnome-documents] query: fix query with no online accounts



commit 94f41c9a1f2655b80d10b76ffa58b4cdbdd58ab3
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Thu Nov 15 09:46:39 2012 -0500

    query: fix query with no online accounts
    
    Regression from 0ab456521533881749639ae35a4b57785454a75b

 src/query.js |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/query.js b/src/query.js
index fe5f693..5032604 100644
--- a/src/query.js
+++ b/src/query.js
@@ -123,9 +123,6 @@ const QueryBuilder = new Lang.Class({
     },
 
     buildFilterNotLocal: function() {
-        if (Global.sourceManager.getItemsCount() == 0)
-            return '(false)';
-
         let sources = Global.sourceManager.getItems();
         let filters = [];
 
@@ -135,6 +132,9 @@ const QueryBuilder = new Lang.Class({
                 filters.push(source.getFilter());
         }
 
+        if (filters.length == 0)
+            filters.push('false');
+
         return '(' + filters.join(' || ') + ')';
     },
 



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