[gnome-shell] remoteSearch: fix fallout from RemoteSearchProvider refactor



commit a9ad9d5e6d9128a59e558562bf3dde7a1db05a34
Author: Cosimo Cecchi <cosimoc gnome org>
Date:   Mon Jan 28 12:04:59 2013 -0500

    remoteSearch: fix fallout from RemoteSearchProvider refactor
    
    RemoteSearchProvider.title was removed, but we were still using it in a
    few places.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=692723

 js/ui/remoteSearch.js |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/js/ui/remoteSearch.js b/js/ui/remoteSearch.js
index 761d315..96bf81b 100644
--- a/js/ui/remoteSearch.js
+++ b/js/ui/remoteSearch.js
@@ -137,8 +137,12 @@ function remoteProvidersLoaded(loadState) {
             idxB = sortOrder.indexOf(appIdB);
 
             // if no provider is found in the order, use alphabetical order
-            if ((idxA == -1) && (idxB == -1))
-                return GLib.utf8_collate(providerA.title, providerB.title);
+            if ((idxA == -1) && (idxB == -1)) {
+                let nameA = providerA.appInfo.get_name();
+                let nameB = providerB.appInfo.get_name();
+
+                return GLib.utf8_collate(nameA, nameB);
+            }
 
             if (numSorted > 1) {
                 // if providerA is the last, it goes after everything
@@ -217,7 +221,7 @@ const RemoteSearchProvider = new Lang.Class({
                                                  Lang.bind(this, this._getResultsFinished),
                                                  this._cancellable);
         } catch(e) {
-            log('Error calling GetInitialResultSet for provider %s: %s'.format( this.title, e.toString()));
+            log('Error calling GetInitialResultSet for provider %s: %s'.format(this.id, e.toString()));
             this.searchSystem.pushResults(this, []);
         }
     },
@@ -230,7 +234,7 @@ const RemoteSearchProvider = new Lang.Class({
                                                    Lang.bind(this, this._getResultsFinished),
                                                    this._cancellable);
         } catch(e) {
-            log('Error calling GetSubsearchResultSet for provider %s: %s'.format(this.title, e.toString()));
+            log('Error calling GetSubsearchResultSet for provider %s: %s'.format(this.id, e.toString()));
             this.searchSystem.pushResults(this, []);
         }
     },
@@ -261,7 +265,7 @@ const RemoteSearchProvider = new Lang.Class({
                                             Lang.bind(this, this._getResultMetasFinished, callback),
                                             this._cancellable);
         } catch(e) {
-            log('Error calling GetResultMetas for provider %s: %s'.format(this.title, e.toString()));
+            log('Error calling GetResultMetas for provider %s: %s'.format(this.id, e.toString()));
             callback([]);
         }
     },



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