[gnome-shell/wip/swarm: 4/4] search: Remove DND code from GridSearchResult
- From: Carlos Soriano <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/swarm: 4/4] search: Remove DND code from GridSearchResult
- Date: Fri, 29 Aug 2014 22:54:19 +0000 (UTC)
commit 66ce03ee0c3473b1aa336a05b7b9fcc6edb20c4f
Author: Florian Müllner <fmuellner gnome org>
Date: Thu Aug 21 12:17:46 2014 +0200
search: Remove DND code from GridSearchResult
Providers that need drag-and-drop behavior can implement this via the
createResultObject() hook (as the app search provider already does), no
need to duplicate that code in the generic result objects
(ListSearchResult already does not implement DND).
js/ui/appDisplay.js | 8 --------
js/ui/search.js | 31 -------------------------------
2 files changed, 0 insertions(+), 39 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 76b10e1..0685075 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -1094,14 +1094,6 @@ const AppSearchProvider = new Lang.Class({
// Rely on AppIcon.activate() having been called instead
},
- dragActivateResult: function(id, params) {
- params = Params.parse(params, { workspace: -1,
- timestamp: 0 });
-
- let app = this._appSys.lookup_app(id);
- app.open_new_window(workspace);
- },
-
createResultObject: function (resultMeta) {
let app = this._appSys.lookup_app(resultMeta['id']);
let appIcon = new AppIcon(app);
diff --git a/js/ui/search.js b/js/ui/search.js
index 01fc52d..739db7b 100644
--- a/js/ui/search.js
+++ b/js/ui/search.js
@@ -237,37 +237,6 @@ const GridSearchResult = new Lang.Class({
let content = new St.Bin({ child: this.icon.actor });
this.actor.set_child(content);
this.actor.label_actor = this.icon.label;
-
- let draggable = DND.makeDraggable(this.actor);
- draggable.connect('drag-begin',
- Lang.bind(this, function() {
- Main.overview.beginItemDrag(this);
- }));
- draggable.connect('drag-cancelled',
- Lang.bind(this, function() {
- Main.overview.cancelledItemDrag(this);
- }));
- draggable.connect('drag-end',
- Lang.bind(this, function() {
- Main.overview.endItemDrag(this);
- }));
-
- this._dragActorSource = content;
- },
-
- getDragActorSource: function() {
- return this._dragActorSource;
- },
-
- getDragActor: function() {
- return this.metaInfo['createIcon'](Main.overview.dashIconSize);
- },
-
- shellWorkspaceLaunch: function(params) {
- if (this.provider.dragActivateResult)
- this.provider.dragActivateResult(this.metaInfo.id, params);
- else
- this.provider.activateResult(this.metaInfo.id, this.terms);
}
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]