[gnome-shell/wip/re-search-v2: 11/28] search: remove SearchResultDisplay base class



commit ce62a851cac33e577956bcff3d064b78bf7dd302
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Tue Nov 27 15:05:32 2012 -0500

    search: remove SearchResultDisplay base class
    
    It's unused, and the clear() method is just wrong. Remove it.

 js/ui/search.js        |   43 -------------------------------------------
 js/ui/searchDisplay.js |    6 ++----
 2 files changed, 2 insertions(+), 47 deletions(-)
---
diff --git a/js/ui/search.js b/js/ui/search.js
index a963143..d9a6aee 100644
--- a/js/ui/search.js
+++ b/js/ui/search.js
@@ -21,49 +21,6 @@ const MatchType = {
     PREFIX: 2
 };
 
-const SearchResultDisplay = new Lang.Class({
-    Name: 'SearchResultDisplay',
-
-    _init: function(provider) {
-        this.provider = provider;
-        this.actor = null;
-    },
-
-    /**
-     * renderResults:
-     * @results: List of identifier strings
-     * @terms: List of search term strings
-     *
-     * Display the given search matches which resulted
-     * from the given terms.  It's expected that not
-     * all results will fit in the space for the container
-     * actor; in this case, show as many as makes sense
-     * for your result type.
-     *
-     * The terms are useful for search match highlighting.
-     */
-    renderResults: function(results, terms) {
-        throw new Error('Not implemented');
-    },
-
-    /**
-     * clear:
-     * Remove all results from this display.
-     */
-    clear: function() {
-        this.actor.destroy_all_children();
-    },
-
-    /**
-     * getVisibleResultCount:
-     *
-     * Returns: The number of actors visible.
-     */
-    getVisibleResultCount: function() {
-        throw new Error('Not implemented');
-    },
-});
-
 /**
  * SearchProvider:
  *
diff --git a/js/ui/searchDisplay.js b/js/ui/searchDisplay.js
index 4dce4a3..e31c1d2 100644
--- a/js/ui/searchDisplay.js
+++ b/js/ui/searchDisplay.js
@@ -160,10 +160,9 @@ const GridSearchResult = new Lang.Class({
 
 const ListSearchResults = new Lang.Class({
     Name: 'ListSearchResults',
-    Extends: Search.SearchResultDisplay,
 
     _init: function(provider) {
-        this.parent(provider);
+        this.provider = provider;
 
         this.actor = new St.BoxLayout({ style_class: 'list-search-results',
                                         vertical: true });
@@ -227,10 +226,9 @@ const ListSearchResults = new Lang.Class({
 
 const GridSearchResults = new Lang.Class({
     Name: 'GridSearchResults',
-    Extends: Search.SearchResultDisplay,
 
     _init: function(provider) {
-        this.parent(provider);
+        this.provider = provider;
 
         this._grid = new IconGrid.IconGrid({ rowLimit: MAX_GRID_SEARCH_RESULTS_ROWS,
                                              xAlign: St.Align.START });



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