[gnome-shell] Make workspace indicators drop targets
- From: Adel Gadllah <agadllah src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-shell] Make workspace indicators drop targets
- Date: Mon, 15 Feb 2010 16:25:07 +0000 (UTC)
commit a6df234528e188081058dd71de857c0766e2d8b3
Author: Adel Gadllah <adel gadllah gmail com>
Date: Mon Feb 15 15:01:48 2010 +0100
Make workspace indicators drop targets
Allow dropping on the workspace indicators to open apps on specific workspaces.
https://bugzilla.gnome.org/show_bug.cgi?id=609913
js/ui/workspacesView.js | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index c640fe1..dc6aa7d 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -699,6 +699,16 @@ SingleView.prototype = {
this._workspaces[i]._metaWorkspace.activate(global.get_current_time());
}));
+ actor._delegate = {};
+ actor._delegate.acceptDrop = Lang.bind(this, function(source, actor, x, y, time) {
+ if (this._workspaces[i].acceptDrop(source, actor, x, y, time)) {
+ this._workspaces[i]._metaWorkspace.activate(global.get_current_time());
+ return true;
+ }
+ else
+ return false;
+ });
+
actor.connect('scroll-event', Lang.bind(this, function(actor, event) {
let direction = event.get_scroll_direction();
let activeWorkspaceIndex = global.screen.get_active_workspace_index();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]