remote-search: implement LaunchSearch() DBus method
This will be used to launch a search in the application itself. https://bugzilla.gnome.org/show_bug.cgi?id=689735
This commit is contained in:

committed by
Cosimo Cecchi

parent
72d54d9915
commit
2cc7fd07f8
@ -265,6 +265,13 @@ const RemoteSearchProvider = new Lang.Class({
|
||||
|
||||
activateResult: function(id) {
|
||||
this.proxy.ActivateResultRemote(id);
|
||||
},
|
||||
|
||||
launchSearch: function(terms) {
|
||||
// the provider is not compatible with the new 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());
|
||||
}
|
||||
});
|
||||
|
||||
@ -274,9 +281,15 @@ const RemoteSearchProvider2 = new Lang.Class({
|
||||
|
||||
_init: function(appInfo, dbusName, dbusPath) {
|
||||
this.parent(appInfo, dbusName, dbusPath, SearchProvider2Proxy);
|
||||
|
||||
this.canLaunchSearch = true;
|
||||
},
|
||||
|
||||
activateResult: function(id) {
|
||||
this.proxy.ActivateResultRemote(id, [], 0);
|
||||
},
|
||||
|
||||
launchSearch: function(terms) {
|
||||
this.proxy.LaunchSearchRemote(terms);
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user