From a9ad9d5e6d9128a59e558562bf3dde7a1db05a34 Mon Sep 17 00:00:00 2001 From: Cosimo Cecchi Date: Mon, 28 Jan 2013 12:04:59 -0500 Subject: [PATCH] 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 file changed, 9 insertions(+), 5 deletions(-) diff --git a/js/ui/remoteSearch.js b/js/ui/remoteSearch.js index 761d3153e..96bf81bfe 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([]); } },