[gnome-shell/wip/re-search-v2: 9/28] remote-search: launch the app if LaunchSearch is not available
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/re-search-v2: 9/28] remote-search: launch the app if LaunchSearch is not available
- Date: Mon, 3 Dec 2012 18:15:57 +0000 (UTC)
commit dae0215e54cb2d7f3cee0e50e9d7be6f8a1e3f34
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Mon Nov 26 23:50:49 2012 -0500
remote-search: launch the app if LaunchSearch is not available
But log a message, so we can file bugs for apps.
js/ui/remoteSearch.js | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/remoteSearch.js b/js/ui/remoteSearch.js
index 503e632..317b18a 100644
--- a/js/ui/remoteSearch.js
+++ b/js/ui/remoteSearch.js
@@ -264,8 +264,14 @@ const RemoteSearchProvider = new Lang.Class({
},
launchSearch: function(terms) {
- this._proxy.LaunchSearchRemote(terms);
+ this._proxy.LaunchSearchRemote(terms, Lang.bind(this,
+ function(result, error) {
+ if (error && error.matches(Gio.DBusError, Gio.DBusError.UNKNOWN_METHOD)) {
+ // the provider is not compatible with this version of the interface, launch
+ // the app itself but warn so we can catch the error in logs
+ log('Search provider ' + this.appInfo.get_id() + ' does not implement LaunchSearch');
+ this.appInfo.launch([], global.create_app_launch_context());
+ }
+ }));
}
});
-
-
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]