search: propagate GAppInfo to SearchProvider
Save the GAppInfo in the provider object; this will be used when filtering. https://bugzilla.gnome.org/show_bug.cgi?id=687491
This commit is contained in:
parent
8499e4aab2
commit
6e46ddaad3
@ -91,8 +91,7 @@ function loadRemoteSearchProvidersFromDir(dir, loadedProviders, addProviderCallb
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
remoteProvider = new RemoteSearchProvider(appInfo.get_name(),
|
remoteProvider = new RemoteSearchProvider(appInfo,
|
||||||
appInfo.get_icon(),
|
|
||||||
busName,
|
busName,
|
||||||
objectPath);
|
objectPath);
|
||||||
loadedProviders[objectPath] = remoteProvider;
|
loadedProviders[objectPath] = remoteProvider;
|
||||||
@ -111,11 +110,11 @@ const RemoteSearchProvider = new Lang.Class({
|
|||||||
Name: 'RemoteSearchProvider',
|
Name: 'RemoteSearchProvider',
|
||||||
Extends: Search.SearchProvider,
|
Extends: Search.SearchProvider,
|
||||||
|
|
||||||
_init: function(title, icon, dbusName, dbusPath) {
|
_init: function(appInfo, dbusName, dbusPath) {
|
||||||
this._proxy = new SearchProviderProxy(Gio.DBus.session,
|
this._proxy = new SearchProviderProxy(Gio.DBus.session,
|
||||||
dbusName, dbusPath, Lang.bind(this, this._onProxyConstructed));
|
dbusName, dbusPath, Lang.bind(this, this._onProxyConstructed));
|
||||||
|
|
||||||
this.parent(title.toUpperCase());
|
this.parent(appInfo.get_name().toUpperCase(), appInfo);
|
||||||
this._cancellable = new Gio.Cancellable();
|
this._cancellable = new Gio.Cancellable();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -74,8 +74,9 @@ const SearchResultDisplay = new Lang.Class({
|
|||||||
const SearchProvider = new Lang.Class({
|
const SearchProvider = new Lang.Class({
|
||||||
Name: 'SearchProvider',
|
Name: 'SearchProvider',
|
||||||
|
|
||||||
_init: function(title) {
|
_init: function(title, appInfo) {
|
||||||
this.title = title;
|
this.title = title;
|
||||||
|
this.appInfo = appInfo;
|
||||||
this.searchSystem = null;
|
this.searchSystem = null;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user