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,
function () {
this._removeMenuTimeout();
Main.overview.beginItemDrag(this);
Main.overview.beginAppDrag(this);
}));
this._draggable.connect('drag-cancelled', Lang.bind(this,
function () {
Main.overview.cancelledItemDrag(this);
Main.overview.cancelledAppDrag(this);
}));
this._draggable.connect('drag-end', Lang.bind(this,
function () {
Main.overview.endItemDrag(this);
Main.overview.endAppDrag(this);
}));
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));
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));
Main.overview.connect('item-drag-end',
Main.overview.connect('app-drag-end',
Lang.bind(this, this._onDragEnd));
Main.overview.connect('item-drag-cancelled',
Main.overview.connect('app-drag-cancelled',
Lang.bind(this, this._onDragCancelled));
Main.overview.connect('window-drag-begin',
Lang.bind(this, this._onDragBegin));

View File

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

View File

@ -219,15 +219,15 @@ const GridSearchResult = new Lang.Class({
let draggable = DND.makeDraggable(this.actor);
draggable.connect('drag-begin',
Lang.bind(this, function() {
Main.overview.beginItemDrag(this);
Main.overview.beginAppDrag(this);
}));
draggable.connect('drag-cancelled',
Lang.bind(this, function() {
Main.overview.cancelledItemDrag(this);
Main.overview.cancelledAppDrag(this);
}));
draggable.connect('drag-end',
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);
Main.overview.connect('item-drag-begin',
Main.overview.connect('app-drag-begin',
Lang.bind(this, this._resetShowAppsButton));
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-release-event', Lang.bind(this, this._onButtonRelease));
Main.overview.connect('item-drag-begin',
Main.overview.connect('app-drag-begin',
Lang.bind(this, this._onDragBegin));
Main.overview.connect('item-drag-end',
Main.overview.connect('app-drag-end',
Lang.bind(this, this._onDragEnd));
Main.overview.connect('item-drag-cancelled',
Main.overview.connect('app-drag-cancelled',
Lang.bind(this, this._onDragCancelled));
Main.overview.connect('window-drag-begin',
Lang.bind(this, this._onDragBegin));

View File

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