[gnome-shell] search: remove additional params from activateResult() call
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] search: remove additional params from activateResult() call
- Date: Thu, 6 Dec 2012 17:22:40 +0000 (UTC)
commit 9b846cbb83cd57a2cf539fd94a7ae70b9bcf2156
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Wed Dec 5 10:05:48 2012 -0500
search: remove additional params from activateResult() call
The only case when we're interested in using those parameters nowadays
is for DnD, which is handled in a separate method already.
Since we're not going to support DnD for non-app search results anyway,
drop the params from all the activateResults() calls; this will be
useful later since we're going to add another parameter to it.
https://bugzilla.gnome.org/show_bug.cgi?id=689735
js/ui/appDisplay.js | 20 +++++---------------
js/ui/searchDisplay.js | 2 +-
js/ui/wanda.js | 2 +-
3 files changed, 7 insertions(+), 17 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index a80b684..be5de90 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -340,18 +340,15 @@ const AppSearchProvider = new Lang.Class({
this.searchSystem.pushResults(this, this._appSys.subsearch(previousResults, terms));
},
- activateResult: function(app, params) {
- params = Params.parse(params, { workspace: -1,
- timestamp: 0 });
-
+ activateResult: function(app) {
let event = Clutter.get_current_event();
let modifiers = event ? event.get_state() : 0;
let openNewWindow = modifiers & Clutter.ModifierType.CONTROL_MASK;
if (openNewWindow)
- app.open_new_window(params.workspace);
+ app.open_new_window(-1);
else
- app.activate_full(params.workspace, params.timestamp);
+ app.activate();
},
dragActivateResult: function(id, params) {
@@ -402,15 +399,8 @@ const SettingsSearchProvider = new Lang.Class({
this.searchSystem.pushResults(this, this._appSys.search_settings(terms));
},
- activateResult: function(pref, params) {
- params = Params.parse(params, { workspace: -1,
- timestamp: 0 });
-
- pref.activate_full(params.workspace, params.timestamp);
- },
-
- dragActivateResult: function(pref, params) {
- this.activateResult(pref, params);
+ activateResult: function(pref) {
+ pref.activate();
},
createResultActor: function (resultMeta, terms) {
diff --git a/js/ui/searchDisplay.js b/js/ui/searchDisplay.js
index 1259966..7d81594 100644
--- a/js/ui/searchDisplay.js
+++ b/js/ui/searchDisplay.js
@@ -96,7 +96,7 @@ const SearchResult = new Lang.Class({
if (this.provider.dragActivateResult)
this.provider.dragActivateResult(this.metaInfo.id, params);
else
- this.provider.activateResult(this.metaInfo.id, params);
+ this.provider.activateResult(this.metaInfo.id);
}
});
diff --git a/js/ui/wanda.js b/js/ui/wanda.js
index 303d577..305bf9b 100644
--- a/js/ui/wanda.js
+++ b/js/ui/wanda.js
@@ -162,7 +162,7 @@ const WandaSearchProvider = new Lang.Class({
this.getInitialResultSet(terms);
},
- activateResult: function(fish, params) {
+ activateResult: function(fish) {
if (this._dialog)
this._dialog.destroy();
this._dialog = new FortuneDialog(capitalize(fish), FISH_COMMAND);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]