[gnome-documents] search: Unbreak books mode



commit 0a29c2931776a1b899b26a4e68236cc7eeb985b7
Author: Debarshi Ray <debarshir gnome org>
Date:   Mon Feb 23 18:07:55 2015 +0100

    search: Unbreak books mode
    
    Fallout from 48fbfc1559975c2bcd58c0c915089649ee68506b

 src/search.js |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/src/search.js b/src/search.js
index 557ffeb..190f185 100644
--- a/src/search.js
+++ b/src/search.js
@@ -242,10 +242,15 @@ const SearchTypeManager = new Lang.Class({
     getDocumentTypes: function() {
         let types = [];
 
-        types.push(this.getItemById(SearchTypeStock.PDF));
-        types.push(this.getItemById(SearchTypeStock.PRESENTATIONS));
-        types.push(this.getItemById(SearchTypeStock.SPREADSHEETS));
-        types.push(this.getItemById(SearchTypeStock.TEXTDOCS));
+        if (!Application.application.isBooks) {
+            types.push(this.getItemById(SearchTypeStock.PDF));
+            types.push(this.getItemById(SearchTypeStock.PRESENTATIONS));
+            types.push(this.getItemById(SearchTypeStock.SPREADSHEETS));
+            types.push(this.getItemById(SearchTypeStock.TEXTDOCS));
+        } else {
+            types.push(this.getItemById(SearchTypeStock.EBOOKS));
+            types.push(this.getItemById(SearchTypeStock.COMICS));
+        }
 
         return types;
     },


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