[gnome-shell] remote-search: implement new ActivateResult() method
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] remote-search: implement new ActivateResult() method
- Date: Thu, 6 Dec 2012 17:22:45 +0000 (UTC)
commit ec7ade4ee6125e27961ed30da9a22c8459834d97
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Dec 5 11:48:22 2012 -0500
remote-search: implement new ActivateResult() method
This allows us to fix the shortcomings of the original ActivateResult()
method. In particular:
- allow to pass the search terms to the provider
- allow to pass a user interaction timestamp
https://bugzilla.gnome.org/show_bug.cgi?id=689735
js/ui/remoteSearch.js | 4 ++--
js/ui/searchDisplay.js | 5 +++--
2 files changed, 5 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/remoteSearch.js b/js/ui/remoteSearch.js
index 5e9ee89..3bdba7d 100644
--- a/js/ui/remoteSearch.js
+++ b/js/ui/remoteSearch.js
@@ -285,8 +285,8 @@ const RemoteSearchProvider2 = new Lang.Class({
this.canLaunchSearch = true;
},
- activateResult: function(id) {
- this.proxy.ActivateResultRemote(id, [], 0);
+ activateResult: function(id, terms) {
+ this.proxy.ActivateResultRemote(id, terms, global.get_current_time());
},
launchSearch: function(terms) {
diff --git a/js/ui/searchDisplay.js b/js/ui/searchDisplay.js
index 7d81594..869586b 100644
--- a/js/ui/searchDisplay.js
+++ b/js/ui/searchDisplay.js
@@ -22,6 +22,7 @@ const SearchResult = new Lang.Class({
_init: function(provider, metaInfo, terms) {
this.provider = provider;
this.metaInfo = metaInfo;
+ this.terms = terms;
this.actor = new St.Button({ style_class: 'search-result',
reactive: true,
x_align: St.Align.START,
@@ -73,7 +74,7 @@ const SearchResult = new Lang.Class({
},
activate: function() {
- this.provider.activateResult(this.metaInfo.id);
+ this.provider.activateResult(this.metaInfo.id, this.terms);
Main.overview.toggle();
},
@@ -96,7 +97,7 @@ const SearchResult = new Lang.Class({
if (this.provider.dragActivateResult)
this.provider.dragActivateResult(this.metaInfo.id, params);
else
- this.provider.activateResult(this.metaInfo.id);
+ this.provider.activateResult(this.metaInfo.id, this.terms);
}
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]