"gen_extended" : false,
"items" : [
{
+ "# Gee.ArrayList<Gtk.Widget>? error_widgets" : "null",
"# JsRender.JsRender file" : "",
"# JsRender.Node node" : "",
"# Xcls_MainWindow main_window" : "null",
],
"| 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}",
public JsRender.JsRender file;
public JsRender.Node node;
public signal void show_editor (JsRender.JsRender file, JsRender.Node node, JsRender.NodeProp prop);
+ public Gee.ArrayList<Gtk.Widget>? error_widgets;
// ctor
public Xcls_LeftProps()
this.allow_edit = false;
this.main_window = null;
this.last_error_counter = -1;
+ this.error_widgets = null;
// set gobject values
this.el.homogeneous = false ;
return;
}
this.removeErrors();
-
+ this.error_widgets = new Gee.ArrayList<Gtk.Widget>();
foreach(var diag in ar) {
if (w == null) {
return;
}
- var ed = diag.category.down();
+
+
+ var ed = diag.category.down();
if (ed != "err" && w.has_css_class("node-err")) {
continue;
}
+ this.error_widgets.add(w);
if (ed == "err" && w.has_css_class("node-warn")) {
w.remove_css_class("node-warn");
}
*/
}
public void removeErrors () {
- var child = this.view.el.get_first_child();
-
- var reading_header = true;
-
- while (child != null) {
- //GLib.debug("Got %s", child.get_type().name());
-
- if (reading_header) {
-
-
- if (child.get_type().name() != "GtkColumnListView") {
-
- child = child.get_next_sibling();
- continue;
- }
- // should be columnlistview
- child = child.get_first_child();
-
-
-
- reading_header = false;
- continue;
- }
-
- if (child.has_css_class("node-err")) {
+ if (this.error_widgets == null || this.error_widgets.size < 1) {
+ return;
+ }
+ foreach(var child in this.error_widgets) {
+
+ if (child.has_css_class("node-err")) {
child.remove_css_class("node-err");
}
if (child.has_css_class("node-warn")) {
if (child.has_css_class("node-depr")) {
child.remove_css_class("node-depr");
}
-
- child = child.get_next_sibling();
}
+ this.error_widgets = null;
+ return;
//GLib.debug("Rturning null");
}
// set gobject values
var child_1 = new Xcls_Box7( _this );
+ child_1.ref();
this.el.child = child_1.el;
}
// set gobject values
this.el.has_frame = false;
var child_1 = new Xcls_Label9( _this );
+ child_1.ref();
this.el.child = child_1.el;
//listeners
// set gobject values
this.el.has_frame = false;
var child_1 = new Xcls_Label11( _this );
+ child_1.ref();
this.el.child = child_1.el;
//listeners
// set gobject values
this.el.has_frame = false;
var child_1 = new Xcls_Label13( _this );
+ child_1.ref();
this.el.child = child_1.el;
//listeners
// set gobject values
this.el.has_frame = false;
var child_1 = new Xcls_Label15( _this );
+ child_1.ref();
this.el.child = child_1.el;
//listeners
// set gobject values
this.el.has_frame = false;
var child_1 = new Xcls_Label17( _this );
+ child_1.ref();
this.el.child = child_1.el;
//listeners
// set gobject values
this.el.has_frame = false;
var child_1 = new Xcls_Label20( _this );
+ child_1.ref();
this.el.child = child_1.el;
//listeners
// set gobject values
this.el.has_frame = false;
var child_1 = new Xcls_Label22( _this );
+ child_1.ref();
this.el.child = child_1.el;
//listeners
// set gobject values
this.el.has_frame = false;
var child_1 = new Xcls_Label24( _this );
+ child_1.ref();
this.el.child = child_1.el;
//listeners
// set gobject values
this.el.has_frame = false;
var child_1 = new Xcls_Label27( _this );
+ child_1.ref();
this.el.child = child_1.el;
//listeners
// set gobject values
this.el.has_frame = false;
var child_1 = new Xcls_Label29( _this );
+ child_1.ref();
this.el.child = child_1.el;
//listeners
// set gobject values
this.el.has_frame = false;
var child_1 = new Xcls_Label31( _this );
+ child_1.ref();
this.el.child = child_1.el;
//listeners
// set gobject values
this.el.has_frame = false;
var child_1 = new Xcls_Label34( _this );
+ child_1.ref();
this.el.child = child_1.el;
//listeners
// set gobject values
this.el.has_frame = false;
var child_1 = new Xcls_Label36( _this );
+ child_1.ref();
this.el.child = child_1.el;
//listeners
this.el.has_frame = false;
this.el.tooltip_markup = "Add a flexy include (for HTML templates)";
var child_1 = new Xcls_Label38( _this );
+ child_1.ref();
this.el.child = child_1.el;
//listeners
// set gobject values
var child_1 = new Xcls_Box42( _this );
+ child_1.ref();
this.el.child = child_1.el;
}
this.el.has_frame = false;
this.el.label = "Delete";
var child_1 = new Xcls_Label44( _this );
+ child_1.ref();
this.el.child = child_1.el;
//listeners
// set gobject values
var child_1 = new Xcls_Box54( _this );
+ child_1.ref();
this.el.child = child_1.el;
}
"gen_extended" : false,
"items" : [
{
+ "# Gee.ArrayList<Gtk.Widget>? error_widgets" : "null",
"# Xcls_MainWindow? main_window" : "null",
"# int last_error_counter" : "-1",
"$ xns" : "Gtk",
],
"| void removeErrors" : [
"() {",
+ "\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\t\tchild.remove_css_class(\"node-warn\");",
+ "\t\t}",
+ "\t\t",
+ "\t\tif (child.has_css_class(\"node-depr\")) {",
+ "\t\t\tchild.remove_css_class(\"node-depr\");",
+ "\t\t}",
+ "\t}",
+ "\tthis.error_widgets = null;",
+ "\treturn;",
+ "\t",
+ "\t/*",
"\tvar child = this.view.el.get_first_child(); ",
" ",
"\tvar reading_header = true;",
" child = child.get_next_sibling(); ",
"\t}",
"\t//GLib.debug(\"Rturning null\");",
+ "\t*/",
" ",
"}"
],
"\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\tthis.error_widgets.add(w);",
"\t\t// always show errors.",
"\t\tvar ed = diag.category.down();",
"\t\tif (ed != \"err\" && w.has_css_class(\"node-err\")) {",
public int last_error_counter;
public signal void changed ();
public signal void node_selected (JsRender.Node? node);
+ public Gee.ArrayList<Gtk.Widget>? error_widgets;
// ctor
public Xcls_WindowLeftTree()
// my vars (dec)
this.main_window = null;
this.last_error_counter = -1;
+ this.error_widgets = null;
// set gobject values
this.el.hexpand = true;
return;
}
this.removeErrors();
-
+ this.error_widgets = new Gee.ArrayList<Gtk.Widget>();
foreach(var diag in ar) {
if (w == null) {
return;
}
+ this.error_widgets.add(w);
// always show errors.
var ed = diag.category.down();
if (ed != "err" && w.has_css_class("node-err")) {
// _this.maincol.el.set_max_width( _this.viewwin.el.get_width() - 32 );
}
public void removeErrors () {
+ if (this.error_widgets == null || this.error_widgets.size < 1) {
+ return;
+ }
+ foreach(var child in this.error_widgets) {
+
+ if (child.has_css_class("node-err")) {
+ child.remove_css_class("node-err");
+ }
+ if (child.has_css_class("node-warn")) {
+ child.remove_css_class("node-warn");
+ }
+
+ if (child.has_css_class("node-depr")) {
+ child.remove_css_class("node-depr");
+ }
+ }
+ this.error_widgets = null;
+ return;
+
+ /*
var child = this.view.el.get_first_child();
var reading_header = true;
child = child.get_next_sibling();
}
//GLib.debug("Rturning null");
+ */
}
public JsRender.Node? getActiveElement () { // return path to actie node.
// set gobject values
var child_1 = new Xcls_Box18( _this );
+ child_1.ref();
this.el.child = child_1.el;
}