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
This commit is contained in:
parent
2cc7fd07f8
commit
9b846cbb83
@ -340,18 +340,15 @@ const AppSearchProvider = new Lang.Class({
|
|||||||
this.searchSystem.pushResults(this, this._appSys.subsearch(previousResults, terms));
|
this.searchSystem.pushResults(this, this._appSys.subsearch(previousResults, terms));
|
||||||
},
|
},
|
||||||
|
|
||||||
activateResult: function(app, params) {
|
activateResult: function(app) {
|
||||||
params = Params.parse(params, { workspace: -1,
|
|
||||||
timestamp: 0 });
|
|
||||||
|
|
||||||
let event = Clutter.get_current_event();
|
let event = Clutter.get_current_event();
|
||||||
let modifiers = event ? event.get_state() : 0;
|
let modifiers = event ? event.get_state() : 0;
|
||||||
let openNewWindow = modifiers & Clutter.ModifierType.CONTROL_MASK;
|
let openNewWindow = modifiers & Clutter.ModifierType.CONTROL_MASK;
|
||||||
|
|
||||||
if (openNewWindow)
|
if (openNewWindow)
|
||||||
app.open_new_window(params.workspace);
|
app.open_new_window(-1);
|
||||||
else
|
else
|
||||||
app.activate_full(params.workspace, params.timestamp);
|
app.activate();
|
||||||
},
|
},
|
||||||
|
|
||||||
dragActivateResult: function(id, params) {
|
dragActivateResult: function(id, params) {
|
||||||
@ -402,15 +399,8 @@ const SettingsSearchProvider = new Lang.Class({
|
|||||||
this.searchSystem.pushResults(this, this._appSys.search_settings(terms));
|
this.searchSystem.pushResults(this, this._appSys.search_settings(terms));
|
||||||
},
|
},
|
||||||
|
|
||||||
activateResult: function(pref, params) {
|
activateResult: function(pref) {
|
||||||
params = Params.parse(params, { workspace: -1,
|
pref.activate();
|
||||||
timestamp: 0 });
|
|
||||||
|
|
||||||
pref.activate_full(params.workspace, params.timestamp);
|
|
||||||
},
|
|
||||||
|
|
||||||
dragActivateResult: function(pref, params) {
|
|
||||||
this.activateResult(pref, params);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
createResultActor: function (resultMeta, terms) {
|
createResultActor: function (resultMeta, terms) {
|
||||||
|
@ -96,7 +96,7 @@ const SearchResult = new Lang.Class({
|
|||||||
if (this.provider.dragActivateResult)
|
if (this.provider.dragActivateResult)
|
||||||
this.provider.dragActivateResult(this.metaInfo.id, params);
|
this.provider.dragActivateResult(this.metaInfo.id, params);
|
||||||
else
|
else
|
||||||
this.provider.activateResult(this.metaInfo.id, params);
|
this.provider.activateResult(this.metaInfo.id);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -162,7 +162,7 @@ const WandaSearchProvider = new Lang.Class({
|
|||||||
this.getInitialResultSet(terms);
|
this.getInitialResultSet(terms);
|
||||||
},
|
},
|
||||||
|
|
||||||
activateResult: function(fish, params) {
|
activateResult: function(fish) {
|
||||||
if (this._dialog)
|
if (this._dialog)
|
||||||
this._dialog.destroy();
|
this._dialog.destroy();
|
||||||
this._dialog = new FortuneDialog(capitalize(fish), FISH_COMMAND);
|
this._dialog = new FortuneDialog(capitalize(fish), FISH_COMMAND);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user