"gen_extended" : false,
"items" : [
{
+ "# Gee.ArrayList<Gtk.Widget>? error_widgets" : "null",
"# JsRender.JsRender file" : "",
"# JsRender.Node node" : "",
"# Xcls_MainWindow main_window" : "null",
" var lb = (Gtk.Label) ((Gtk.ListItem)listitem).get_child();",
" var item = (JsRender.NodeProp) ((Gtk.ListItem)listitem).get_item();",
"",
- "",
+ " if (item == null) {",
+ " \treturn;",
+ "}",
"item.bind_property(\"to_display_name_prop\",",
" lb, \"label\",",
" GLib.BindingFlags.SYNC_CREATE);",
"\tcb.hide();",
"\t",
"\tvar prop = (JsRender.NodeProp) ((Gtk.ListItem)listitem).get_item();",
+ " \tif (prop == null || _this.node == null ) {",
+ " \t\tGLib.error(\"something is wrong\");",
+ "\t \t ",
+ "\t}",
+ "\tif ( _this.node.fqn() == \"\") {",
+ " \t\tGLib.debug(\"node is missing fqn\");",
+ "\t \treturn;",
+ "\t}",
+ "\t",
"\t//GLib.debug(\"prop = %s\", prop.get_type().name());",
"\t//GLib.debug(\"prop.val = %s\", prop.val);",
"\t//GLib.debug(\"prop.key = %s\", prop.to_display_name());",
"\t\t}",
"\t\tif (l.get_visible()) {",
"\t\t \t_this.stop_editor();",
+ "\t\t \tif (prop.parent == null) {",
+ "\t\t \t\treturn;",
+ "\t \t\t}",
"\t \t_this.show_editor(_this.file, prop.parent, prop);",
"\t\t",
"\t\t}",
" \t",
" }",
" ",
- " GLib.debug(\"load leftprops\\n\");",
+ " GLib.debug(\"load leftprops\");",
"",
" this.node = node;",
" this.file = file;",
" ",
" //this.get('/RightEditor').el.hide();",
" if (node ==null) {",
+ " GLib.debug(\"node is null return\");",
" return ;",
" }",
"",
],
"| void removeErrors" : [
"() {",
- "\tvar child = this.view.el.get_first_child(); ",
- " ",
- "\tvar reading_header = true;",
- " ",
- "\twhile (child != null) {",
- "\t\t//GLib.debug(\"Got %s\", child.get_type().name());",
- "\t ",
- "\t if (reading_header) {",
- "\t\t\t",
- "",
- "\t\t\tif (child.get_type().name() != \"GtkColumnListView\") {",
- "\t\t\t ",
- "\t\t\t\tchild = child.get_next_sibling();",
- "\t\t\t\tcontinue;",
- "\t\t\t}",
- "\t\t\t// should be columnlistview",
- "\t\t\tchild = child.get_first_child(); ",
- "\t\t ",
- "\t\t ",
- "\t\t\t",
- "\t\t\treading_header = false;",
- "\t\t\tcontinue;",
- "\t }",
- "\t ",
- "\t \tif (child.has_css_class(\"node-err\")) {",
+ "\t\tif (this.error_widgets == null || this.error_widgets.size < 1) {",
+ " \t\treturn;",
+ "\t}",
+ "\tforeach(var child in this.error_widgets) {",
+ "\t",
+ "\t\tif (child.has_css_class(\"node-err\")) {",
"\t\t\tchild.remove_css_class(\"node-err\");",
"\t\t}",
"\t\tif (child.has_css_class(\"node-warn\")) {",
"\t\tif (child.has_css_class(\"node-depr\")) {",
"\t\t\tchild.remove_css_class(\"node-depr\");",
"\t\t}",
- "\t\t",
- " child = child.get_next_sibling(); ",
"\t}",
+ "\tthis.error_widgets = null;",
+ "\treturn;",
"\t//GLib.debug(\"Rturning null\");",
" ",
"}"
"\t\treturn;",
"\t}",
"\tthis.removeErrors();",
- "\t",
+ "\tthis.error_widgets = new Gee.ArrayList<Gtk.Widget>();",
"\tforeach(var diag in ar) { ",
"\t",
"\t\t ",
" \tif (w == null) {",
" \t\treturn;",
"\t\t}",
- "\t \t\tvar ed = diag.category.down();",
+ "",
+ "\t\t",
+ " \t\tvar ed = diag.category.down();",
"\t\tif (ed != \"err\" && w.has_css_class(\"node-err\")) {",
"\t\t\tcontinue;",
"\t\t}",
+ "\t\tthis.error_widgets.add(w);\t\t",
"\t\tif (ed == \"err\" && w.has_css_class(\"node-warn\")) {",
"\t\t\tw.remove_css_class(\"node-warn\");",
"\t\t}",