From ccefe286f88f49805295f5b05021f6502775ae15 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Mon, 30 May 2016 18:36:02 +0800 Subject: [PATCH] src/Builder4/WindowLeftTree.bjs src/Builder4/WindowLeftTree.vala --- src/Builder4/WindowLeftTree.bjs | 2 +- src/Builder4/WindowLeftTree.vala | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Builder4/WindowLeftTree.bjs b/src/Builder4/WindowLeftTree.bjs index a37822282..2b4863c13 100644 --- a/src/Builder4/WindowLeftTree.bjs +++ b/src/Builder4/WindowLeftTree.bjs @@ -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" : [ { diff --git a/src/Builder4/WindowLeftTree.vala b/src/Builder4/WindowLeftTree.vala index f574d6394..03cf6107c 100644 --- a/src/Builder4/WindowLeftTree.vala +++ b/src/Builder4/WindowLeftTree.vala @@ -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; -- 2.39.2