[gnome-documents/wip/rishi/split-view: 9/14] search: Add a helper to get all document SearchTypes



commit aca4664973cf539507e98fbe91afe84c667636e0
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri Oct 17 13:30:29 2014 +0200

    search: Add a helper to get all document SearchTypes
    
    We will need it to construct the queries for the document view.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=686461

 src/search.js |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/search.js b/src/search.js
index 03c96d7..af5c096 100644
--- a/src/search.js
+++ b/src/search.js
@@ -234,6 +234,17 @@ const SearchTypeManager = new Lang.Class({
         return [ activeItem ];
     },
 
+    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));
+
+        return types;
+    },
+
     getAllTypes: function() {
         let types = [];
 


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