src/Builder4/WindowLeftTree.bjs
authorAlan Knowles <alan@roojs.com>
Mon, 30 May 2016 10:36:02 +0000 (18:36 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 30 May 2016 10:36:02 +0000 (18:36 +0800)
src/Builder4/WindowLeftTree.vala

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

index a378222..2b4863c 100644 (file)
@@ -51,7 +51,7 @@
      "# bool drag_in_motion" : "",
      "# bool blockChanges" : false,
      "$ xns" : "Gtk",
-     "| void setCursor" : "() {\n\n}\n",
+     "| void setCursor" : "(string treepath, string sourceEvent) {\n\tthis.lastEventSource = sourceEvent;\n    this.el.set_cursor(new Gtk.TreePath.from_string(treepath), null, false); \n           \n}\n",
      "|           void selectNode" : "(string treepath_str, string source) {\n\tthis.lastEventSource = source;\n    //this.selection.select_path(new  Gtk.TreePath.from_string( treepath_str));\n     var tp = new Gtk.TreePath.from_string(treepath_str);\n     \n     this.el.set_cursor(tp, null, false);  \n     this.el.scroll_to_cell(tp, null, false, 0,0);\n}\n",
      "items" : [
       {
index f574d63..03cf610 100644 (file)
@@ -829,8 +829,10 @@ public class Xcls_WindowLeftTree : Object
                  }
                      
         }
-        public void setCursor () {
-        
+        public void setCursor (string treepath, string sourceEvent) {
+               this.lastEventSource = sourceEvent;
+            this.el.set_cursor(new Gtk.TreePath.from_string(treepath), null, false); 
+                   
         }
         public           void selectNode (string treepath_str, string source) {
                this.lastEventSource = source;