if (Node.gen == null) {
Node.gen = new Json.Generator();
gen.pretty = true;
- gen.indent = 4;
+ gen.indent = 1;
}
var n = new Json.Node(Json.NodeType.OBJECT);
n.set_object(this.toJsonObject () );
if (this.has("layout")) { txt += ("<i>" + GLib.Markup.escape_text(this.get("layout")) + "</i>"); }
if (this.has("title")) { txt += ("<b>" + GLib.Markup.escape_text(this.get("title")) + "</b>"); }
- if (this.has("html")) { txt += ("<b>" + GLib.Markup.escape_text(this.get("html")) + "</b>"); }
+ if (this.has("html") && this.get("html").length > 0) {
+ var ht = this.get("html").split("\n");
+ if (ht.length > 1) {
+ txt += ("<b>" + GLib.Markup.escape_text(ht[0]) + "...</b>");
+ } else {
+ txt += ("<b>" + GLib.Markup.escape_text(this.get("html")) + "</b>");
+ }
+ }
if (this.has("label")) { txt += ("<b>" + GLib.Markup.escape_text(this.get("label"))+ "</b>"); }
if (this.has("header")) { txt += ("<b>" + GLib.Markup.escape_text(this.get("header")) + "</b>"); }
if (this.has("legend")) { txt += ("<b>" + GLib.Markup.escape_text(this.get("legend")) + "</b>"); }