public Gee.HashMap<int,string> line_map; // store of l:xxx or p:.... // fixme - not needed as we can store line numbers in props now.
public Gee.ArrayList<int> node_lines;
public Gee.HashMap<int,Node> node_lines_map; // store of l:xxx or p:....
-
+ public JsRender? file = null;
public string node_pad = "";
}
set {
this.nodeTitleProp = ""; // ?? should trigger set?
- this.iconFilename = "";
+ this.iconResourceName = "";
this._updated_count = value;
+
+
+ //GLib.debug("Update Node %d p%d - rev %d", this.oid, this.parent != null ? this.parent.oid : -1, value);
if (this.parent != null) {
- this.parent.updated_count++;
+ this.parent.updated_count++; // will recurse up.
+ } else {
+ if (this.file != null) {
+ this.file.updateUndo();
+ }
}
}
} // changes to this trigger updates on the tree..
-
+
+ public string as_source = "";
+ public int as_source_version = -1;
+ public int as_source_start_line = -1;
+
+
+
+ //public signal void version_changed();
+
public Node()
{
this.items = new Gee.ArrayList<Node>();
for(var i= 0; i < this.propstore.get_n_items();i++) {
var p = (NodeProp) this.propstore.get_item(i);
- GLib.debug("prop %s lines %d -> %d", p.name, p.start_line, p.end_line);
+ //GLib.debug("prop %s lines %d -> %d", p.name, p.start_line, p.end_line);
if (p.start_line > line) {
continue;
}
if ( this.parent.childstore.find(this, out pos)) {
this.parent.childstore.remove(pos);
}
-
+ this.parent.updated_count++;
this.parent.items = nlist;
this.parent = null;
case PROP:
case RAW: // should they be the same?
- props += "\n\t" + GLib.Markup.escape_text(prop.rtype) +
+ props += "\n\t" + (prop.rtype != null && prop.rtype.length > 0 ? GLib.Markup.escape_text(prop.rtype) : "") +
" <b>" + GLib.Markup.escape_text(i) +"</b> : " +
- GLib.Markup.escape_text(val.split("\n")[0]);
+ (val.length > 0 ? GLib.Markup.escape_text(val.split("\n")[0]) : "");
break;
-
-
+
case METHOD :
- funcs += "\n\t" + GLib.Markup.escape_text(prop.rtype) +
+ funcs += "\n\t" + (prop.rtype != null && prop.rtype.length > 0 ? GLib.Markup.escape_text(prop.rtype) : "") +
" <b>" + GLib.Markup.escape_text(i) +"</b> : " +
- GLib.Markup.escape_text(val.split("\n")[0]);
+ (val.length > 0 ? GLib.Markup.escape_text(val.split("\n")[0]) : "");
break;
case USER : // user defined.
uprops += "\n\t<b>" +
GLib.Markup.escape_text(i) +"</b> : " +
- GLib.Markup.escape_text(val.split("\n")[0]);
+ (val.length > 0 ? GLib.Markup.escape_text(val.split("\n")[0]) : "");
break;
case SPECIAL : // * prop| args | ctor | init
spec += "\n\t<b>" +
GLib.Markup.escape_text(i) +"</b> : " +
- GLib.Markup.escape_text(val.split("\n")[0]);
+ (val.length > 0 ? GLib.Markup.escape_text(val.split("\n")[0]) : "");
break;
case LISTENER : return ""; // always raw...
}
// used by trees to display icons?
// needs more thought?!?
- public string iconFilename {
+ public string iconResourceName {
set {
// NOOp ??? should
}
var clsb = clsname.split(".");
var sub = clsb.length > 1 ? clsb[1].down() : "";
- var fn = "/usr/share/glade/pixmaps/hicolor/16x16/actions/widget-gtk-" + sub + ".png";
+ var fn = "/glade-icons/widget-gtk-" + sub + ".png";
//if (FileUtils.test (fn, FileTest.IS_REGULAR)) {
return fn;
//}
public void insertChild(int pos, Node child)
{
+ child.parent = this;
this.items.insert(pos, child);
this.childstore.insert(pos, child);
- child.parent = this;
+
}
public void appendChild(Node child)
{
+ child.parent = this;
this.items.add( child);
this.childstore.append(child);
- child.parent = this;
+
}
- public void loadProps(GLib.ListStore model)
+ public void loadProps(GLib.ListStore model, Project.Project project)
{
// fixme sorting?? - no need to loop twice .. just use sorting.!
this.propstore = model;
for(var i = 0; i < oldstore.n_items; i++ ) {
var it = (NodeProp) oldstore.get_item(i);
+ it.update_is_valid_ptype(project);
model.append(it);
}