[gnome-shell/gbsneto/custom-icon-positions: 6/27] appDisplay: Accept dropping any kind of icon over it
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gnome-shell/gbsneto/custom-icon-positions: 6/27] appDisplay: Accept dropping any kind of icon over it
 
- Date: Thu, 25 Jun 2020 13:11:10 +0000 (UTC)
 
commit ac5fd886473f97c111f8756501fc0740e9ea44a2
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Tue May 26 11:19:39 2020 -0300
    appDisplay: Accept dropping any kind of icon over it
    
    The grid can handle it now!
    
    https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1284
 js/ui/appDisplay.js | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index d39bd74198..d9854163bf 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -876,14 +876,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) {
@@ -898,7 +892,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();
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]