[gnome-shell/gbsneto/icon-grid-dnd: 21/35] folderIcon: Don't accept applications from other folders



commit 5f5aa32da1cf63210f36b4cd0a10beb338f3a736
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Sat Jun 29 00:01:34 2019 -0300

    folderIcon: Don't accept applications from other folders
    
    Moving an application from a folder to the main grid will be
    the default action. However, if someone accidentally drops
    the icon over another folder, we currently will duplicate the
    icon.
    
    Prevent those edge cases by simply ignoring app icons coming
    from other folders.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/603

 js/ui/appDisplay.js | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index a2af6a837..1109be694 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -1220,6 +1220,9 @@ var FolderIcon = class FolderIcon {
         if (!global.settings.is_writable('favorite-apps'))
             return false;
 
+        if (source.parentView instanceof FolderView)
+            return false;
+
         return true;
     }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]