public string[] dropList;
public int drag_x;
public int drag_y;
+ public string lastEventSource;
public bool drag_in_motion;
public bool blockChanges;
this.el = new Gtk.TreeView();
// my vars (dec)
+ this.lastEventSource = "";
this.blockChanges = false;
// set gobject values
//listeners
this.el.button_press_event.connect( ( ev) => {
//console.log("button press?");
+ this.lastEventSource = "tree";
if (! _this.before_node_change(null) ) {
return true;
print("selected rows < 1\n");
//??this.model.load( false);
- _this.node_selected(null);
+ _this.node_selected(null, this.lastEventSource);
return false ;
}
_this.model.activePath = mod.get_path(iter).to_string();
var node = (JsRender.Node)value.dup_object();
- _this.node_selected(node);
+ _this.node_selected(node, this.lastEventSource);
while (Gtk.events_pending()) {
Gtk.main_iteration();
}
}
}
- public void selectNode (string treepath_str) {
+ 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;
//this.selection.select_path(new Gtk.TreePath.from_string( treepath_str));
var tp = new Gtk.TreePath.from_string(treepath_str);