// my vars (def)
public bool loading;
public bool allow_node_scroll;
- public string propSelected;
- public JsRender.Node? nodeSelected;
+ public string prop_selected;
+ public JsRender.Node? node_selected;
// ctor
public Xcls_sourceview(Xcls_WindowRooView _owner )
// my vars (dec)
this.loading = true;
this.allow_node_scroll = true;
- this.propSelected = "";
- this.nodeSelected = null;
+ this.prop_selected = "";
+ this.node_selected = null;
// set gobject values
this.el.editable = false;
-
+ // ---------- this selects the tree's node...
var ltree = _this.main_window.windowstate.left_tree;
var tp = ltree.model.treePathFromNode(node);
// let's try allowing editing on the methods.
// a little klunky at present..
- this.propSelected = "";
+ this.prop_selected = "";
if (prop != null) {
//see if we can find it..
var kv = prop.split(":");
//var k = prop.get_key(kv[1]);
// fixme -- need to determine if it's an editable property...
- this.propSelected = prop;
+ this.prop_selected = prop;
} else if (kv[0] == "l") {
- this.propSelected = prop;
+ this.prop_selected = prop;
}
}
}
// highlight the node..
+ }
+ public void clearGreySelection () {
+ // clear all the marks..
+ Gtk.TextIter start;
+ Gtk.TextIter end;
+
+ sbuf.get_bounds (out start, out end);
+ sbuf.remove_source_marks (start, end, "grey");
+
+
}
public void nodeSelected (JsRender.Node? sel, bool scroll ) {
Gtk.main_iteration();
}
+ this.node_selected = sel;
print("node selected\n");
var buf = this.el.get_buffer();
var sbuf = (Gtk.SourceBuffer) buf;
- // clear all the marks..
- Gtk.TextIter start;
- Gtk.TextIter end;
-
- sbuf.get_bounds (out start, out end);
- sbuf.remove_source_marks (start, end, "grey");
-
-
+ this.clearGreySelection();
+
+
+
if (sel == null) {
print("no selected node\n");
// no highlighting..
var colon_pos = 0;
// now if we have selected a property...
- if (this.propSelected.length> 0 ) {
+ if (this.prop_selected.length> 0 ) {
int nstart, nend;
- if (sel.getPropertyRange(this.propSelected, out nstart, out nend) && nend > nstart) {
+ if (sel.getPropertyRange(this.prop_selected, out nstart, out nend) && nend > nstart) {
start_line = nstart;
end_line = nend;
this.el.editable = true;
}
- print("propSelected = %s range %d -> %d\n", this.propSelected, start_line, end_line);
+ print("propSelected = %s range %d -> %d\n", this.prop_selected, start_line, end_line);
}