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



commit 2d07c71270871ceb0a3ee868d28c1e82aaba7897
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 5b70eb34c..05771271c 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]