dash: during drag, only offer trash can when dragging favorites

We should only show the trash can when the user starts dragging a
favorite from the dash, not when the user starts dragging an application
that happens to be a favorite via a window or an application icon
in the applications view.

https://bugzilla.gnome.org/show_bug.cgi?id=642895
This commit is contained in:
Owen W. Taylor 2011-05-03 13:22:06 -04:00
parent 4cab0c95d3
commit 019670b5ab

View File

@ -342,7 +342,10 @@ Dash.prototype = {
let srcIsFavorite = (id in favorites);
if (srcIsFavorite && this._favRemoveTarget == null) {
if (srcIsFavorite &&
dragEvent.source.actor &&
this.actor.contains (dragEvent.source.actor) &&
this._favRemoveTarget == null) {
this._favRemoveTarget = new RemoveFavoriteIcon();
this._favRemoveTarget.icon.setIconSize(this.iconSize);
this._box.add(this._favRemoveTarget.actor);