src/Builder4/WindowLeftTree.bjs
authorAlan Knowles <alan@roojs.com>
Fri, 12 Jun 2015 04:07:10 +0000 (12:07 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 12 Jun 2015 04:07:10 +0000 (12:07 +0800)
src/Builder4/WindowLeftTree.vala

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

index 05bee1d..71bf809 100644 (file)
@@ -41,6 +41,7 @@
      "# int drag_y" : "",
      "* init" : "{\n    var description = new Pango.FontDescription();\n    description.set_size(8000);\n    this.el.override_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    BuilderApplication.targetList,            /* lists of target to support */\n\t    Gdk.DragAction.COPY   | Gdk.DragAction.MOVE    |  Gdk.DragAction.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        BuilderApplication.targetList,            /* lists of target to support */\n        Gdk.DragAction.COPY   | Gdk.DragAction.MOVE   | Gdk.DragAction.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,
+     "bool expand" : true,
      "* pack" : "add",
      "xtype" : "TreeView",
      "$ enable_tree_lines" : true,
index 2d2dcc1..769f742 100644 (file)
@@ -94,6 +94,7 @@ public class Xcls_WindowLeftTree : Object
             this.blockChanges = false;
 
             // set gobject values
+            this.el.expand = true;
             this.el.tooltip_column = 1;
             this.el.enable_tree_lines = true;
             this.el.headers_visible = false;