src/Builder4/WindowLeftTree.bjs
authorAlan <alan@roojs.com>
Thu, 25 Jan 2024 09:22:53 +0000 (17:22 +0800)
committerAlan <alan@roojs.com>
Thu, 25 Jan 2024 09:22:53 +0000 (17:22 +0800)
src/Builder4/WindowLeftTree.vala

src/Builder4/WindowLeftTree.bjs
src/Builder4/WindowLeftTree.vala

index 7159968..a18ebb5 100644 (file)
            "\t \tif (!drop_on_to.contains(node.fqn())) {",
            "\t\t\tGLib.debug(\"drop on does not contain %s - try center\" , node.fqn());",
            "\t\t\tthis.addHighlight(null, \"\"); ",
-           "\t\t\treturn Gdk.DragAction.COPY;\t\t",
+           "\t\t\treturn is_shift ?  Gdk.DragAction.MOVE :  Gdk.DragAction.COPY;\t\t",
            "\t\t}",
            "\t}",
            " \t",
            " \t    // _this.view.highlightDropPath(\"\", (Gtk.TreeViewDropPosition)0);",
            "\tvar w = _this.view.getWidgetAt(x,y);",
            "\tthis.addHighlight(w, pos); ",
-           "    return Gdk.DragAction.COPY;\t\t\t",
+           "\treturn is_shift ?  Gdk.DragAction.MOVE :  Gdk.DragAction.COPY;\t\t",
            "}"
           ]
          },
index 2ca2629..bd5a22f 100644 (file)
@@ -1050,7 +1050,7 @@ public class Xcls_WindowLeftTree : Object
                                        if (!drop_on_to.contains(node.fqn())) {
                                                GLib.debug("drop on does not contain %s - try center" , node.fqn());
                                                this.addHighlight(null, ""); 
-                                               return Gdk.DragAction.COPY;             
+                                               return is_shift ?  Gdk.DragAction.MOVE :  Gdk.DragAction.COPY;          
                                        }
                                }
                                
@@ -1058,7 +1058,7 @@ public class Xcls_WindowLeftTree : Object
                                    // _this.view.highlightDropPath("", (Gtk.TreeViewDropPosition)0);
                                var w = _this.view.getWidgetAt(x,y);
                                this.addHighlight(w, pos); 
-                           return Gdk.DragAction.COPY;                 
+                               return is_shift ?  Gdk.DragAction.MOVE :  Gdk.DragAction.COPY;          
                        });
                        this.el.leave.connect( ( ) => {
                                this.addHighlight(null,"");