},
{
"listeners" : {
- "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 < 9;i++) {\n\t\tvar el = _this.grid.el.get_child_at(0,i);\n\t\t\n\t\tvar showhide= is_bjs;\n\t\tif (i> 7) {\n\t\t\tshowhide = !showhide;\n\t\t}\n\t\t\n\t\tif (showhide) {\n\t\t el.show();\n\t\t} else {\n\t\t\tel.hide();\n\t\t}\n\t\t el = _this.grid.el.get_child_at(1,i);\n\t\tif (showhide) {\n\t\t el.show();\n\t\t} else {\n\t\t\tel.hide();\n\t\t} \n }\n // directory is only available for non-bjs \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 \n // directory is only available for non-bjs \n \n\n\n}\n"
},
"id" : "filetype",
"* init" : "this.el.add_attribute(_this.ftdbcellrenderer.el , \"markup\", 1 );",
"* pack" : "attach,1,0,1,1",
"xtype" : "ComboBox",
- "| void showhide" : "() {\n\n}\n",
+ "| void showhide" : "(bool is_bjs) {\n\tfor (var i = 2; i < 9;i++) {\n\t\tvar el = _this.grid.el.get_child_at(0,i);\n\t\t\n\t\tvar showhide= is_bjs;\n\t\tif (i> 7) {\n\t\t\tshowhide = !showhide;\n\t\t}\n\t\t\n\t\tif (showhide) {\n\t\t el.show();\n\t\t} else {\n\t\t\tel.hide();\n\t\t}\n\t\t el = _this.grid.el.get_child_at(1,i);\n\t\tif (showhide) {\n\t\t el.show();\n\t\t} else {\n\t\t\tel.hide();\n\t\t} \n }\n}\n",
"$ xns" : "Gtk",
"items" : [
{
is_bjs = ((string)vfname) == "bjs";
}
- for (var i = 2; i < 9;i++) {
- var el = _this.grid.el.get_child_at(0,i);
-
- var showhide= is_bjs;
- if (i> 7) {
- showhide = !showhide;
- }
-
- if (showhide) {
- el.show();
- } else {
- el.hide();
- }
- el = _this.grid.el.get_child_at(1,i);
- if (showhide) {
- el.show();
- } else {
- el.hide();
- }
- }
+
// directory is only available for non-bjs
}
// user defined functions
- public void showhide () {
-
+ public void showhide (bool is_bjs) {
+ for (var i = 2; i < 9;i++) {
+ var el = _this.grid.el.get_child_at(0,i);
+
+ var showhide= is_bjs;
+ if (i> 7) {
+ showhide = !showhide;
+ }
+
+ if (showhide) {
+ el.show();
+ } else {
+ el.hide();
+ }
+ el = _this.grid.el.get_child_at(1,i);
+ if (showhide) {
+ el.show();
+ } else {
+ el.hide();
+ }
+ }
}
}
public class Xcls_ftdbcellrenderer : Object