overview and others: Rename item-drag signals to app-drag

Since results other than apps should not be draggable, be more descriptive and
rename item-drag signals to app-drag signals.

https://bugzilla.gnome.org/show_bug.cgi?id=682050
This commit is contained in:
Tanner Doshier 2012-07-13 13:17:18 -05:00 committed by Jasper St. Pierre
parent e073670c4d
commit 6aa8f14285
7 changed files with 45 additions and 45 deletions

View File

@ -462,15 +462,15 @@ const AppWellIcon = new Lang.Class({
this._draggable.connect('drag-begin', Lang.bind(this, this._draggable.connect('drag-begin', Lang.bind(this,
function () { function () {
this._removeMenuTimeout(); this._removeMenuTimeout();
Main.overview.beginItemDrag(this); Main.overview.beginAppDrag(this);
})); }));
this._draggable.connect('drag-cancelled', Lang.bind(this, this._draggable.connect('drag-cancelled', Lang.bind(this,
function () { function () {
Main.overview.cancelledItemDrag(this); Main.overview.cancelledAppDrag(this);
})); }));
this._draggable.connect('drag-end', Lang.bind(this, this._draggable.connect('drag-end', Lang.bind(this,
function () { function () {
Main.overview.endItemDrag(this); Main.overview.endAppDrag(this);
})); }));
this.actor.connect('destroy', Lang.bind(this, this._onDestroy)); this.actor.connect('destroy', Lang.bind(this, this._onDestroy));

View File

@ -410,11 +410,11 @@ const Dash = new Lang.Class({
AppFavorites.getAppFavorites().connect('changed', Lang.bind(this, this._queueRedisplay)); AppFavorites.getAppFavorites().connect('changed', Lang.bind(this, this._queueRedisplay));
this._appSystem.connect('app-state-changed', Lang.bind(this, this._queueRedisplay)); this._appSystem.connect('app-state-changed', Lang.bind(this, this._queueRedisplay));
Main.overview.connect('item-drag-begin', Main.overview.connect('app-drag-begin',
Lang.bind(this, this._onDragBegin)); Lang.bind(this, this._onDragBegin));
Main.overview.connect('item-drag-end', Main.overview.connect('app-drag-end',
Lang.bind(this, this._onDragEnd)); Lang.bind(this, this._onDragEnd));
Main.overview.connect('item-drag-cancelled', Main.overview.connect('app-drag-cancelled',
Lang.bind(this, this._onDragCancelled)); Lang.bind(this, this._onDragCancelled));
Main.overview.connect('window-drag-begin', Main.overview.connect('window-drag-begin',
Lang.bind(this, this._onDragBegin)); Lang.bind(this, this._onDragBegin));

View File

@ -525,16 +525,16 @@ const Overview = new Lang.Class({
//// Public methods //// //// Public methods ////
beginItemDrag: function(source) { beginAppDrag: function(source) {
this.emit('item-drag-begin'); this.emit('app-drag-begin');
}, },
cancelledItemDrag: function(source) { cancelledAppDrag: function(source) {
this.emit('item-drag-cancelled'); this.emit('app-drag-cancelled');
}, },
endItemDrag: function(source) { endAppDrag: function(source) {
this.emit('item-drag-end'); this.emit('app-drag-end');
}, },
beginWindowDrag: function(source) { beginWindowDrag: function(source) {

View File

@ -219,15 +219,15 @@ const GridSearchResult = new Lang.Class({
let draggable = DND.makeDraggable(this.actor); let draggable = DND.makeDraggable(this.actor);
draggable.connect('drag-begin', draggable.connect('drag-begin',
Lang.bind(this, function() { Lang.bind(this, function() {
Main.overview.beginItemDrag(this); Main.overview.beginAppDrag(this);
})); }));
draggable.connect('drag-cancelled', draggable.connect('drag-cancelled',
Lang.bind(this, function() { Lang.bind(this, function() {
Main.overview.cancelledItemDrag(this); Main.overview.cancelledAppDrag(this);
})); }));
draggable.connect('drag-end', draggable.connect('drag-end',
Lang.bind(this, function() { Lang.bind(this, function() {
Main.overview.endItemDrag(this); Main.overview.endAppDrag(this);
})); }));
}, },

View File

@ -114,7 +114,7 @@ const ViewSelector = new Lang.Class({
global.focus_manager.add_group(this._searchResults.actor); global.focus_manager.add_group(this._searchResults.actor);
Main.overview.connect('item-drag-begin', Main.overview.connect('app-drag-begin',
Lang.bind(this, this._resetShowAppsButton)); Lang.bind(this, this._resetShowAppsButton));
this._stageKeyPressId = 0; this._stageKeyPressId = 0;

View File

@ -542,11 +542,11 @@ const ThumbnailsBox = new Lang.Class({
this.actor.connect('button-press-event', function() { return true; }); this.actor.connect('button-press-event', function() { return true; });
this.actor.connect('button-release-event', Lang.bind(this, this._onButtonRelease)); this.actor.connect('button-release-event', Lang.bind(this, this._onButtonRelease));
Main.overview.connect('item-drag-begin', Main.overview.connect('app-drag-begin',
Lang.bind(this, this._onDragBegin)); Lang.bind(this, this._onDragBegin));
Main.overview.connect('item-drag-end', Main.overview.connect('app-drag-end',
Lang.bind(this, this._onDragEnd)); Lang.bind(this, this._onDragEnd));
Main.overview.connect('item-drag-cancelled', Main.overview.connect('app-drag-cancelled',
Lang.bind(this, this._onDragCancelled)); Lang.bind(this, this._onDragCancelled));
Main.overview.connect('window-drag-begin', Main.overview.connect('window-drag-begin',
Lang.bind(this, this._onDragBegin)); Lang.bind(this, this._onDragBegin));

View File

@ -106,9 +106,9 @@ const WorkspacesView = new Lang.Class({
global.window_manager.connect('switch-workspace', global.window_manager.connect('switch-workspace',
Lang.bind(this, this._activeWorkspaceChanged)); Lang.bind(this, this._activeWorkspaceChanged));
this._itemDragBeginId = Main.overview.connect('item-drag-begin', this._appDragBeginId = Main.overview.connect('app-drag-begin',
Lang.bind(this, this._dragBegin)); Lang.bind(this, this._dragBegin));
this._itemDragEndId = Main.overview.connect('item-drag-end', this._appDragEndId = Main.overview.connect('app-drag-end',
Lang.bind(this, this._dragEnd)); Lang.bind(this, this._dragEnd));
this._windowDragBeginId = Main.overview.connect('window-drag-begin', this._windowDragBeginId = Main.overview.connect('window-drag-begin',
Lang.bind(this, this._dragBegin)); Lang.bind(this, this._dragBegin));
@ -327,13 +327,13 @@ const WorkspacesView = new Lang.Class({
if (this._inDrag) if (this._inDrag)
this._dragEnd(); this._dragEnd();
if (this._itemDragBeginId > 0) { if (this._appDragBeginId > 0) {
Main.overview.disconnect(this._itemDragBeginId); Main.overview.disconnect(this._appDragBeginId);
this._itemDragBeginId = 0; this._appDragBeginId = 0;
} }
if (this._itemDragEndId > 0) { if (this._appDragEndId > 0) {
Main.overview.disconnect(this._itemDragEndId); Main.overview.disconnect(this._appDragEndId);
this._itemDragEndId = 0; this._appDragEndId = 0;
} }
if (this._windowDragBeginId > 0) { if (this._windowDragBeginId > 0) {
Main.overview.disconnect(this._windowDragBeginId); Main.overview.disconnect(this._windowDragBeginId);
@ -516,9 +516,9 @@ const WorkspacesDisplay = new Lang.Class({
this._switchWorkspaceNotifyId = 0; this._switchWorkspaceNotifyId = 0;
this._itemDragBeginId = 0; this._appDragBeginId = 0;
this._itemDragCancelledId = 0; this._appDragCancelledId = 0;
this._itemDragEndId = 0; this._appDragEndId = 0;
this._windowDragBeginId = 0; this._windowDragBeginId = 0;
this._windowDragCancelledId = 0; this._windowDragCancelledId = 0;
this._windowDragEndId = 0; this._windowDragEndId = 0;
@ -565,14 +565,14 @@ const WorkspacesDisplay = new Lang.Class({
global.screen.connect('restacked', global.screen.connect('restacked',
Lang.bind(this, this._onRestacked)); Lang.bind(this, this._onRestacked));
if (this._itemDragBeginId == 0) if (this._appDragBeginId == 0)
this._itemDragBeginId = Main.overview.connect('item-drag-begin', this._appDragBeginId = Main.overview.connect('app-drag-begin',
Lang.bind(this, this._dragBegin)); Lang.bind(this, this._dragBegin));
if (this._itemDragCancelledId == 0) if (this._appDragCancelledId == 0)
this._itemDragCancelledId = Main.overview.connect('item-drag-cancelled', this._appDragCancelledId = Main.overview.connect('app-drag-cancelled',
Lang.bind(this, this._dragCancelled)); Lang.bind(this, this._dragCancelled));
if (this._itemDragEndId == 0) if (this._appDragEndId == 0)
this._itemDragEndId = Main.overview.connect('item-drag-end', this._appDragEndId = Main.overview.connect('app-drag-end',
Lang.bind(this, this._dragEnd)); Lang.bind(this, this._dragEnd));
if (this._windowDragBeginId == 0) if (this._windowDragBeginId == 0)
this._windowDragBeginId = Main.overview.connect('window-drag-begin', this._windowDragBeginId = Main.overview.connect('window-drag-begin',
@ -604,17 +604,17 @@ const WorkspacesDisplay = new Lang.Class({
global.screen.disconnect(this._restackedNotifyId); global.screen.disconnect(this._restackedNotifyId);
this._restackedNotifyId = 0; this._restackedNotifyId = 0;
} }
if (this._itemDragBeginId > 0) { if (this._appDragBeginId > 0) {
Main.overview.disconnect(this._itemDragBeginId); Main.overview.disconnect(this._appDragBeginId);
this._itemDragBeginId = 0; this._appDragBeginId = 0;
} }
if (this._itemDragCancelledId > 0) { if (this._appDragCancelledId > 0) {
Main.overview.disconnect(this._itemDragCancelledId); Main.overview.disconnect(this._appDragCancelledId);
this._itemDragCancelledId = 0; this._appDragCancelledId = 0;
} }
if (this._itemDragEndId > 0) { if (this._appDragEndId > 0) {
Main.overview.disconnect(this._itemDragEndId); Main.overview.disconnect(this._appDragEndId);
this._itemDragEndId = 0; this._appDragEndId = 0;
} }
if (this._windowDragBeginId > 0) { if (this._windowDragBeginId > 0) {
Main.overview.disconnect(this._windowDragBeginId); Main.overview.disconnect(this._windowDragBeginId);