[gnome-shell] overview: Handle drag-cancelled signal for items
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] overview: Handle drag-cancelled signal for items
- Date: Sat, 19 Mar 2011 10:16:29 +0000 (UTC)
commit 6ae914da2f8f22fe1eae8e83958f4b46b93d0157
Author: Florian Müllner <fmuellner gnome org>
Date: Wed Mar 9 16:40:48 2011 +0100
overview: Handle drag-cancelled signal for items
Allow handling the drag-cancelled signal for non-window items, just
like the handling for windows instroduced in commit a80e88e33.
https://bugzilla.gnome.org/show_bug.cgi?id=644324
js/ui/appDisplay.js | 4 ++++
js/ui/overview.js | 4 ++++
js/ui/searchDisplay.js | 4 ++++
3 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index ffd49fa..5017446 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -412,6 +412,10 @@ AppWellIcon.prototype = {
this._removeMenuTimeout();
Main.overview.beginItemDrag(this);
}));
+ this._draggable.connect('drag-cancelled', Lang.bind(this,
+ function () {
+ Main.overview.cancelledItemDrag(this);
+ }));
this._draggable.connect('drag-end', Lang.bind(this,
function () {
Main.overview.endItemDrag(this);
diff --git a/js/ui/overview.js b/js/ui/overview.js
index 3bb4789..34ebec5 100644
--- a/js/ui/overview.js
+++ b/js/ui/overview.js
@@ -474,6 +474,10 @@ Overview.prototype = {
this.emit('item-drag-begin');
},
+ cancelledItemDrag: function(source) {
+ this.emit('item-drag-cancelled');
+ },
+
endItemDrag: function(source) {
this.emit('item-drag-end');
},
diff --git a/js/ui/searchDisplay.js b/js/ui/searchDisplay.js
index 0527d8f..81fd89b 100644
--- a/js/ui/searchDisplay.js
+++ b/js/ui/searchDisplay.js
@@ -49,6 +49,10 @@ SearchResult.prototype = {
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]