appDisplay: Accept dropping any kind of icon over it

The grid will be able to handle them. As of now, it doesn't
do anything with folder icons, or icons in folders.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1284
This commit is contained in:
Georges Basile Stavracas Neto 2020-05-26 11:19:39 -03:00 committed by Florian Müllner
parent 1e31caf0b8
commit 2bc8175219

View File

@ -912,14 +912,8 @@ class AppDisplay extends BaseAppView {
}
_canAccept(source) {
if (!(source instanceof AppIcon))
return false;
let view = _getViewFromIcon(source);
if (!(view instanceof FolderView))
return false;
return true;
return (source instanceof AppIcon) ||
(source instanceof FolderIcon);
}
handleDragOver(source) {
@ -934,7 +928,8 @@ class AppDisplay extends BaseAppView {
return false;
let view = _getViewFromIcon(source);
view.removeApp(source.app);
if (view instanceof FolderView)
view.removeApp(source.app);
if (this._currentDialog)
this._currentDialog.popdown();