diff --git a/js/ui/remoteSearch.js b/js/ui/remoteSearch.js index baeaa1269..4f376bc31 100644 --- a/js/ui/remoteSearch.js +++ b/js/ui/remoteSearch.js @@ -278,7 +278,8 @@ const RemoteSearchProvider = new Lang.Class({ name: metas[i]['name'], description: metas[i]['description'], createIcon: Lang.bind(this, - this.createIcon, metas[i]) }); + this.createIcon, metas[i]), + clipboardText: metas[i]['clipboardText'] }); } callback(resultMetas); }, diff --git a/js/ui/search.js b/js/ui/search.js index 2ea1afb62..4d29e59ef 100644 --- a/js/ui/search.js +++ b/js/ui/search.js @@ -152,6 +152,8 @@ const SearchResultsBase = new Lang.Class({ this._resultDisplays = {}; + this._clipboard = St.Clipboard.get_default(); + this._cancellable = new Gio.Cancellable(); }, @@ -181,6 +183,8 @@ const SearchResultsBase = new Lang.Class({ _activateResult: function(result, id) { this.provider.activateResult(id, this._terms); + if (result.metaInfo.clipboardText) + this._clipboard.set_text(St.ClipboardType.CLIPBOARD, result.metaInfo.clipboardText); Main.overview.toggle(); },