[gnome-shell] search: Remove unused MUTLIPLE_* match types



commit 7ba8c7c2b57066c6eb398a7404c8e059052e7bfd
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed May 2 15:31:01 2012 -0400

    search: Remove unused MUTLIPLE_* match types
    
    https://bugzilla.gnome.org/show_bug.cgi?id=675328

 js/ui/placeDisplay.js |   13 +++----------
 js/ui/search.js       |    4 +---
 2 files changed, 4 insertions(+), 13 deletions(-)
---
diff --git a/js/ui/placeDisplay.js b/js/ui/placeDisplay.js
index 8441282..c3117df 100644
--- a/js/ui/placeDisplay.js
+++ b/js/ui/placeDisplay.js
@@ -396,9 +396,7 @@ const PlaceSearchProvider = new Lang.Class({
     },
 
     _searchPlaces: function(places, terms) {
-        let multiplePrefixResults = [];
         let prefixResults = [];
-        let multipleSubstringResults = [];
         let substringResults = [];
 
         terms = terms.map(String.toLowerCase);
@@ -406,20 +404,15 @@ const PlaceSearchProvider = new Lang.Class({
         for (let i = 0; i < places.length; i++) {
             let place = places[i];
             let mtype = place.matchTerms(terms);
-            if (mtype == Search.MatchType.MULTIPLE_PREFIX)
-                multiplePrefixResults.push(place.id);
-            else if (mtype == Search.MatchType.PREFIX)
+            if (mtype == Search.MatchType.PREFIX)
                 prefixResults.push(place.id);
-            else if (mtype == Search.MatchType.MULTIPLE_SUBSTRING)
-                multipleSubstringResults.push(place.id);
             else if (mtype == Search.MatchType.SUBSTRING)
                 substringResults.push(place.id);
         }
-        multiplePrefixResults.sort(this._compareResultMeta);
         prefixResults.sort(this._compareResultMeta);
-        multipleSubstringResults.sort(this._compareResultMeta);
         substringResults.sort(this._compareResultMeta);
-        return multiplePrefixResults.concat(prefixResults.concat(multipleSubstringResults.concat(substringResults)));
+
+        return prefixResults.concat(substringResults);
     },
 
     getInitialResultSet: function(terms) {
diff --git a/js/ui/search.js b/js/ui/search.js
index b2348d5..98de089 100644
--- a/js/ui/search.js
+++ b/js/ui/search.js
@@ -18,9 +18,7 @@ const DISABLED_OPEN_SEARCH_PROVIDERS_KEY = 'disabled-open-search-providers';
 const MatchType = {
     NONE: 0,
     SUBSTRING: 1,
-    MULTIPLE_SUBSTRING: 2,
-    PREFIX: 3,
-    MULTIPLE_PREFIX: 4
+    PREFIX: 2
 };
 
 const SearchResultDisplay = new Lang.Class({



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