Builder4/WindowLeftTree.bjs
authorAlan Knowles <alan@roojs.com>
Thu, 9 Oct 2014 09:27:59 +0000 (17:27 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 9 Oct 2014 09:27:59 +0000 (17:27 +0800)
Builder4/WindowLeftTree.vala

Builder4/WindowLeftTree.bjs
Builder4/WindowLeftTree.vala

index 4fcecd7..731bc24 100644 (file)
@@ -38,7 +38,7 @@
                     "id" : "view",
                     "gboolean headers_visible" : true,
                     "# int drag_y" : "",
-                    "* init" : "{\n    var description = new Pango.FontDescription();\n    description.set_size(8000);\n    this.el.modify_font(description);\n\n    var selection = this.el.get_selection();\n    selection.set_mode( Gtk.SelectionMode.SINGLE);\n\n\n    // is this really needed??\n    /*\n    this.selection.signal['changed'].connect(function() {\n\t    _this.get('/LeftTree.view').listeners.cursor_changed.apply(\n\t        _this.get('/LeftTree.view'), [ _this.get('/LeftTree.view'), '']\n\t    );\n    });\n    */\n    Gtk.drag_source_set (\n\t    this.el,            /* widget will be drag-able */\n\t    Gdk.ModifierType.BUTTON1_MASK,       /* modifier that will start a drag */\n\t    Builder4.Application.targetList,            /* lists of target to support */\n\t    Gdk.DragAction.COPY   | Gdk.DragAction.MOVE           /* what to do with data after dropped */\n    );\n\n    // ?? needed??\n    //Gtk.drag_source_add_text_targets(this.el); \n\n    Gtk.drag_dest_set\n    (\n        this.el,              /* widget that will accept a drop */\n        Gtk.DestDefaults.MOTION  | Gtk.DestDefaults.HIGHLIGHT,\n        Builder4.Application.targetList,            /* lists of target to support */\n        Gdk.DragAction.COPY   | Gdk.DragAction.MOVE   | GDK_ACTION_LINK     /* what to do with data after dropped */\n    );\n\n    //Gtk.drag_dest_set_target_list(this.el, Builder.Application.targetList);\n    //Gtk.drag_dest_add_text_targets(this.el);\n}\n",
+                    "* init" : "{\n    var description = new Pango.FontDescription();\n    description.set_size(8000);\n    this.el.modify_font(description);\n\n    var selection = this.el.get_selection();\n    selection.set_mode( Gtk.SelectionMode.SINGLE);\n\n\n    // is this really needed??\n    /*\n    this.selection.signal['changed'].connect(function() {\n\t    _this.get('/LeftTree.view').listeners.cursor_changed.apply(\n\t        _this.get('/LeftTree.view'), [ _this.get('/LeftTree.view'), '']\n\t    );\n    });\n    */\n    Gtk.drag_source_set (\n\t    this.el,            /* widget will be drag-able */\n\t    Gdk.ModifierType.BUTTON1_MASK,       /* modifier that will start a drag */\n\t    Builder4.Application.targetList,            /* lists of target to support */\n\t    Gdk.DragAction.COPY   | Gdk.DragAction.MOVE    | GDK_ACTION_LINK           /* what to do with data after dropped */\n    );\n\n    // ?? needed??\n    //Gtk.drag_source_add_text_targets(this.el); \n\n    Gtk.drag_dest_set\n    (\n        this.el,              /* widget that will accept a drop */\n        Gtk.DestDefaults.MOTION  | Gtk.DestDefaults.HIGHLIGHT,\n        Builder4.Application.targetList,            /* lists of target to support */\n        Gdk.DragAction.COPY   | Gdk.DragAction.MOVE   | GDK_ACTION_LINK     /* what to do with data after dropped */\n    );\n\n    //Gtk.drag_dest_set_target_list(this.el, Builder.Application.targetList);\n    //Gtk.drag_dest_add_text_targets(this.el);\n}\n",
                     "tooltip_column" : 1,
                     "* pack" : "add",
                     "xtype" : "TreeView",
index f75fc66..0701e1c 100644 (file)
@@ -126,7 +126,7 @@ public class Xcls_WindowLeftTree : Object
                    this.el,            /* widget will be drag-able */
                    Gdk.ModifierType.BUTTON1_MASK,       /* modifier that will start a drag */
                    Builder4.Application.targetList,            /* lists of target to support */
-                   Gdk.DragAction.COPY   | Gdk.DragAction.MOVE           /* what to do with data after dropped */
+                   Gdk.DragAction.COPY   | Gdk.DragAction.MOVE    | GDK_ACTION_LINK           /* what to do with data after dropped */
                 );
             
                 // ?? needed??