},
{
"listeners" : {
- "changed" : "() => {\n\tGtk.TreeIter iter;\n\tif (!this.el.get_active_iter(out iter)) {\n\t\treturn;\n\t}\n Value vfname;\n _this.ftdbmodel.el.get_value (iter, 0, out vfname);\n var is_bjs = ((string)vfname) == \"BJS\";\n \n \n \n \n \n \n \n \n\n\n}"
+ "changed" : "() => {\n\tGtk.TreeIter iter;\n\tbool is_bjs = true;\n\tif (this.el.get_active_iter(out iter)) {\n\t\tValue vfname;\n\t\t_this.ftdbmodel.el.get_value (iter, 0, out vfname);\n\t\t is_bjs = ((string)vfname) == \"BJS\";\n\t}\n \n for (var i = 2; i < 8;i++) {\n\t\tvar el = this.el.get_child_at(0,i);\n\t\tif (is_bjs) {\n\t\t el.show();\n\t\t} else {\n\t\t\tel.hide();\n\t\t}\n\t\tvar el = this.el.get_child_at(1,i);\n\t\tif (is_bjs) {\n\t\t el.show();\n\t\t} else {\n\t\t\tel.hide();\n\t\t} \n }\n \n \n\n\n}"
},
"id" : "filetype",
"* init" : "this.el.add_attribute(_this.ftdbcellrenderer.el , \"markup\", 1 );",
//listeners
this.el.changed.connect( () => {
Gtk.TreeIter iter;
- if (!this.el.get_active_iter(out iter)) {
- return;
+ bool is_bjs = true;
+ if (this.el.get_active_iter(out iter)) {
+ Value vfname;
+ _this.ftdbmodel.el.get_value (iter, 0, out vfname);
+ is_bjs = ((string)vfname) == "BJS";
}
- Value vfname;
- _this.ftdbmodel.el.get_value (iter, 0, out vfname);
- var is_bjs = ((string)vfname) == "BJS";
-
-
-
-
-
+ for (var i = 2; i < 8;i++) {
+ var el = this.el.get_child_at(0,i);
+ if (is_bjs) {
+ el.show();
+ } else {
+ el.hide();
+ }
+ var el = this.el.get_child_at(1,i);
+ if (is_bjs) {
+ el.show();
+ } else {
+ el.hide();
+ }
+ }