"bool expand" : true,
"items" : [
{
+ "# bool in_bind" : false,
"$ xns" : "Gtk",
"* prop" : "factory",
"listeners" : {
"bind" : [
"(listitem) => {",
+ "\tif (this.in_bind) {",
+ "\t\treturn;",
+ "\t}",
"\t// GLib.debug(\"listitme is is %s\", ((Gtk.ListItem)listitem).get_type().name());",
"\t",
"\t//var expand = (Gtk.TreeExpander) ((Gtk.ListItem)listitem).get_child();",
" ",
" expand.set_hide_expander( sym.children.get_n_items() < 1);",
" \texpand.set_list_row(lr);",
- " \t",
+ " \tthis.in_bind = true;",
" \t// default is to expand",
" \tswitch (sym.kind) {",
" \t\tcase Lsp.SymbolKind.Enum: ",
- " \t\t\t//expand.list_row.expanded = false;",
+ " \t\t\texpand.list_row.expanded = false;",
" \t\t\tbreak;",
"\t\tdefault:",
"\t\t\tbreak;",
"\t}",
- " \t",
+ " \tthis.in_bind = false;",
" \t",
" \tsym.bind_property(\"symbol_icon\",",
" img, \"icon_name\",",
// my vars (def)
+ public bool in_bind;
// ctor
public Xcls_SignalListItemFactory32(Editor _owner )
this.el = new Gtk.SignalListItemFactory();
// my vars (dec)
+ this.in_bind = false;
// set gobject values
});
this.el.bind.connect( (listitem) => {
+ if (this.in_bind) {
+ return;
+ }
// GLib.debug("listitme is is %s", ((Gtk.ListItem)listitem).get_type().name());
//var expand = (Gtk.TreeExpander) ((Gtk.ListItem)listitem).get_child();
expand.set_hide_expander( sym.children.get_n_items() < 1);
expand.set_list_row(lr);
-
+ this.in_bind = true;
// default is to expand
switch (sym.kind) {
case Lsp.SymbolKind.Enum:
- //expand.list_row.expanded = false;
+ expand.list_row.expanded = false;
break;
default:
break;
}
-
+ this.in_bind = false;
sym.bind_property("symbol_icon",
img, "icon_name",