]
}
]
- }
- ]
- },
- {
- "xtype" : "Label",
- "* pack" : "pack_start,false,false,0",
- "$ xns" : "Gtk",
- "utf8 label" : "Available Directories"
- },
- {
- "* pack" : "pack_start,true,true,0",
- "xtype" : "ScrolledWindow",
- "$ xns" : "Gtk",
- "items" : [
+ },
{
- "listeners" : {
- "button_press_event" : " ( ev) => {\n //console.log(\"button press?\");\n \n \n if (ev.type != Gdk.EventType.BUTTON_PRESS || ev.button != 3) {\n //print(\"click\" + ev.type);\n return false;\n }\n //Gtk.TreePath res;\n //if (!this.el.get_path_at_pos((int)ev.x,(int)ev.y, out res, null, null, null) ) {\n // return true;\n //}\n \n // this.el.get_selection().select_path(res);\n \n //if (!this.get('/LeftTreeMenu').el) { \n // this.get('/LeftTreeMenu').init(); \n // }\n \n _this.default_directory_menu.el.set_screen(Gdk.Screen.get_default());\n _this.default_directory_menu.el.show_all();\n _this.default_directory_menu.el.popup(null, null, null, 3, ev.time);\n // print(\"click:\" + res.path.to_string());\n return true;\n}"
- },
- "gboolean headers_visible" : false,
- "id" : "default_directory_tree",
- "* pack" : "add",
- "xtype" : "TreeView",
+ "* pack" : "pack_start,true,true,0",
+ "xtype" : "ScrolledWindow",
"$ xns" : "Gtk",
"items" : [
{
- "id" : "default_directory_tree_store",
- "* pack" : "set_model",
- "xtype" : "ListStore",
- "$ n_columns" : 1,
- "| void load" : "() {\n \n this.el.clear();\n \n \n var def = _this.project.compilegroups.get(\"_default_\");\n var items = def.sources;\n \n \n Gtk.TreeIter citer;\n\n for(var i =0 ; i < items.size; i++) {\n this.el.append(out citer); \n \n this.el.set_value(citer, 0, items.get(i) ); // title \n //this.el.set_value(citer, 1, items.get(i) );\n }\n this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);\n \n}\n",
- "$ columns" : " typeof(string)\n ",
- "$ xns" : "Gtk"
- },
- {
- "utf8 title" : "name",
- "* init" : "\n this.el.add_attribute(_this.directory_render.el , \"text\", 0 );\n ",
- "* pack" : "append_column",
- "xtype" : "TreeViewColumn",
- "gboolean resizable" : true,
+ "listeners" : {
+ "button_press_event" : " ( ev) => {\n //console.log(\"button press?\");\n \n \n if (ev.type != Gdk.EventType.BUTTON_PRESS || ev.button != 3) {\n //print(\"click\" + ev.type);\n return false;\n }\n //Gtk.TreePath res;\n //if (!this.el.get_path_at_pos((int)ev.x,(int)ev.y, out res, null, null, null) ) {\n // return true;\n //}\n \n // this.el.get_selection().select_path(res);\n \n //if (!this.get('/LeftTreeMenu').el) { \n // this.get('/LeftTreeMenu').init(); \n // }\n \n _this.default_directory_menu.el.set_screen(Gdk.Screen.get_default());\n _this.default_directory_menu.el.show_all();\n _this.default_directory_menu.el.popup(null, null, null, 3, ev.time);\n // print(\"click:\" + res.path.to_string());\n return true;\n}"
+ },
+ "gboolean headers_visible" : false,
+ "id" : "default_directory_tree",
+ "* pack" : "add",
+ "xtype" : "TreeView",
"$ xns" : "Gtk",
"items" : [
{
- "id" : "directory_render",
- "* pack" : "pack_start,false",
- "xtype" : "CellRendererText",
+ "id" : "default_directory_tree_store",
+ "* pack" : "set_model",
+ "xtype" : "ListStore",
+ "$ n_columns" : 1,
+ "| void load" : "() {\n \n this.el.clear();\n \n \n var def = _this.project.compilegroups.get(\"_default_\");\n var items = def.sources;\n \n \n Gtk.TreeIter citer;\n\n for(var i =0 ; i < items.size; i++) {\n this.el.append(out citer); \n \n this.el.set_value(citer, 0, items.get(i) ); // title \n //this.el.set_value(citer, 1, items.get(i) );\n }\n this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);\n \n}\n",
+ "$ columns" : " typeof(string)\n ",
"$ xns" : "Gtk"
+ },
+ {
+ "utf8 title" : "name",
+ "* init" : "\n this.el.add_attribute(_this.directory_render.el , \"text\", 0 );\n ",
+ "* pack" : "append_column",
+ "xtype" : "TreeViewColumn",
+ "gboolean resizable" : true,
+ "$ xns" : "Gtk",
+ "items" : [
+ {
+ "id" : "directory_render",
+ "* pack" : "pack_start,false",
+ "xtype" : "CellRendererText",
+ "$ xns" : "Gtk"
+ }
+ ]
}
]
- }
- ]
- },
- {
- "id" : "default_directory_menu",
- "xtype" : "Menu",
- "$ xns" : "Gtk",
- "items" : [
- {
- "listeners" : {
- "activate" : "() => {\n \n var chooser = new Gtk.FileChooserDialog (\n\t\"Add a directory\", _this.window.el, Gtk.FileChooserAction.SELECT_FOLDER ,\n\t\"_Cancel\",\n\tGtk.ResponseType.CANCEL,\n\t\"_Add\",\n\tGtk.ResponseType.ACCEPT);\n if (chooser.run () != Gtk.ResponseType.ACCEPT) {\n chooser.close ();\n return;\n }\n chooser.close ();\n // add the directory..\n var fn = _this.project.relPath(chooser.get_filename());\n _this.project.compilegroups.get(\"_default_\").sources.add(fn);\n _this.default_directory_tree_store.load();\n}"
- },
- "* pack" : "add",
- "xtype" : "MenuItem",
- "$ xns" : "Gtk",
- "utf8 label" : "Add Directory"
},
{
- "listeners" : {
- "activate" : "() => {\n \n var chooser = new Gtk.FileChooserDialog (\n\t\"Add a directory\", _this.window.el, Gtk.FileChooserAction.OPEN ,\n\t\"_Cancel\",\n\tGtk.ResponseType.CANCEL,\n\t\"_Add\",\n\tGtk.ResponseType.ACCEPT);\n if (chooser.run () != Gtk.ResponseType.ACCEPT) {\n chooser.close ();\n return;\n }\n chooser.close ();\n // add the directory..\n var fn = _this.project.relPath(chooser.get_filename());\n _this.project.compilegroups.get(\"_default_\").sources.add(fn);\n _this.default_directory_tree_store.load();\n}"
- },
- "* pack" : "add",
- "xtype" : "MenuItem",
- "$ xns" : "Gtk",
- "utf8 label" : "Add File"
- },
- {
- "* pack" : "add",
- "xtype" : "SeparatorMenuItem",
- "$ xns" : "Gtk"
- },
- {
- "listeners" : {
- "activate" : "() => {\n \n //\n Gtk.TreeModel mod;\n Gtk.TreeIter iter;\n if (!_this.default_directory_tree.el.get_selection().get_selected(out mod, out iter)) {\n print(\"nothing selected\\n\");\n return;\n }\n\n \n // add the directory..\n \n \n GLib.Value val;\n mod.get_value(iter,0, out val);\n var fn = (string) val;\n \n print(\"remove: %s\\n\", fn);\n if (!_this.project.compilegroups.get(\"_default_\").sources.remove(fn)) {\n print(\"remove failed\");\n }\n _this.default_directory_tree_store.load();\n}"
- },
- "* pack" : "add",
- "xtype" : "MenuItem",
+ "id" : "default_directory_menu",
+ "xtype" : "Menu",
"$ xns" : "Gtk",
- "utf8 label" : "Remove File/Directory"
+ "items" : [
+ {
+ "listeners" : {
+ "activate" : "() => {\n \n var chooser = new Gtk.FileChooserDialog (\n\t\"Add a directory\", _this.window.el, Gtk.FileChooserAction.SELECT_FOLDER ,\n\t\"_Cancel\",\n\tGtk.ResponseType.CANCEL,\n\t\"_Add\",\n\tGtk.ResponseType.ACCEPT);\n if (chooser.run () != Gtk.ResponseType.ACCEPT) {\n chooser.close ();\n return;\n }\n chooser.close ();\n // add the directory..\n var fn = _this.project.relPath(chooser.get_filename());\n _this.project.compilegroups.get(\"_default_\").sources.add(fn);\n _this.default_directory_tree_store.load();\n}"
+ },
+ "* pack" : "add",
+ "xtype" : "MenuItem",
+ "$ xns" : "Gtk",
+ "utf8 label" : "Add Directory"
+ },
+ {
+ "listeners" : {
+ "activate" : "() => {\n \n var chooser = new Gtk.FileChooserDialog (\n\t\"Add a directory\", _this.window.el, Gtk.FileChooserAction.OPEN ,\n\t\"_Cancel\",\n\tGtk.ResponseType.CANCEL,\n\t\"_Add\",\n\tGtk.ResponseType.ACCEPT);\n if (chooser.run () != Gtk.ResponseType.ACCEPT) {\n chooser.close ();\n return;\n }\n chooser.close ();\n // add the directory..\n var fn = _this.project.relPath(chooser.get_filename());\n _this.project.compilegroups.get(\"_default_\").sources.add(fn);\n _this.default_directory_tree_store.load();\n}"
+ },
+ "* pack" : "add",
+ "xtype" : "MenuItem",
+ "$ xns" : "Gtk",
+ "utf8 label" : "Add File"
+ },
+ {
+ "* pack" : "add",
+ "xtype" : "SeparatorMenuItem",
+ "$ xns" : "Gtk"
+ },
+ {
+ "listeners" : {
+ "activate" : "() => {\n \n //\n Gtk.TreeModel mod;\n Gtk.TreeIter iter;\n if (!_this.default_directory_tree.el.get_selection().get_selected(out mod, out iter)) {\n print(\"nothing selected\\n\");\n return;\n }\n\n \n // add the directory..\n \n \n GLib.Value val;\n mod.get_value(iter,0, out val);\n var fn = (string) val;\n \n print(\"remove: %s\\n\", fn);\n if (!_this.project.compilegroups.get(\"_default_\").sources.remove(fn)) {\n print(\"remove failed\");\n }\n _this.default_directory_tree_store.load();\n}"
+ },
+ "* pack" : "add",
+ "xtype" : "MenuItem",
+ "$ xns" : "Gtk",
+ "utf8 label" : "Remove File/Directory"
+ }
+ ]
}
]
}
]
+ },
+ {
+ "xtype" : "Label",
+ "* pack" : "pack_start,false,false,0",
+ "$ xns" : "Gtk",
+ "utf8 label" : "Available Directories"
}
]
},
var child_3 = new Xcls_HBox9( _this );
child_3.ref();
this.el.pack_start ( child_3.el , true,true,0 );
- var child_4 = new Xcls_Label17( _this );
+ var child_4 = new Xcls_Label27( _this );
child_4.ref();
this.el.pack_start ( child_4.el , false,false,0 );
- var child_5 = new Xcls_ScrolledWindow18( _this );
- child_5.ref();
- this.el.pack_start ( child_5.el , true,true,0 );
}
// user defined functions
var child_0 = new Xcls_ScrolledWindow10( _this );
child_0.ref();
this.el.pack_start ( child_0.el , true,true,0 );
+ var child_1 = new Xcls_ScrolledWindow17( _this );
+ child_1.ref();
+ this.el.pack_start ( child_1.el , true,true,0 );
}
// user defined functions
// user defined functions
}
- public class Xcls_Label17 : Object
- {
- public Gtk.Label el;
- private ValaProjectSettings _this;
-
-
- // my vars (def)
-
- // ctor
- public Xcls_Label17(ValaProjectSettings _owner )
- {
- _this = _owner;
- this.el = new Gtk.Label( "Available Directories" );
-
- // my vars (dec)
-
- // set gobject values
- }
-
- // user defined functions
- }
- public class Xcls_ScrolledWindow18 : Object
+ public class Xcls_ScrolledWindow17 : Object
{
public Gtk.ScrolledWindow el;
private ValaProjectSettings _this;
// my vars (def)
// ctor
- public Xcls_ScrolledWindow18(ValaProjectSettings _owner )
+ public Xcls_ScrolledWindow17(ValaProjectSettings _owner )
{
_this = _owner;
this.el = new Gtk.ScrolledWindow( null, null );
var child_0 = new Xcls_default_directory_tree_store( _this );
child_0.ref();
this.el.set_model ( child_0.el );
- var child_1 = new Xcls_TreeViewColumn21( _this );
+ var child_1 = new Xcls_TreeViewColumn20( _this );
child_1.ref();
this.el.append_column ( child_1.el );
}
}
- public class Xcls_TreeViewColumn21 : Object
+ public class Xcls_TreeViewColumn20 : Object
{
public Gtk.TreeViewColumn el;
private ValaProjectSettings _this;
// my vars (def)
// ctor
- public Xcls_TreeViewColumn21(ValaProjectSettings _owner )
+ public Xcls_TreeViewColumn20(ValaProjectSettings _owner )
{
_this = _owner;
this.el = new Gtk.TreeViewColumn();
// my vars (dec)
// set gobject values
- var child_0 = new Xcls_MenuItem24( _this );
+ var child_0 = new Xcls_MenuItem23( _this );
child_0.ref();
this.el.add ( child_0.el );
- var child_1 = new Xcls_MenuItem25( _this );
+ var child_1 = new Xcls_MenuItem24( _this );
child_1.ref();
this.el.add ( child_1.el );
- var child_2 = new Xcls_SeparatorMenuItem26( _this );
+ var child_2 = new Xcls_SeparatorMenuItem25( _this );
child_2.ref();
this.el.add ( child_2.el );
- var child_3 = new Xcls_MenuItem27( _this );
+ var child_3 = new Xcls_MenuItem26( _this );
child_3.ref();
this.el.add ( child_3.el );
}
// user defined functions
}
- public class Xcls_MenuItem24 : Object
+ public class Xcls_MenuItem23 : Object
{
public Gtk.MenuItem el;
private ValaProjectSettings _this;
// my vars (def)
// ctor
- public Xcls_MenuItem24(ValaProjectSettings _owner )
+ public Xcls_MenuItem23(ValaProjectSettings _owner )
{
_this = _owner;
this.el = new Gtk.MenuItem();
// user defined functions
}
- public class Xcls_MenuItem25 : Object
+ public class Xcls_MenuItem24 : Object
{
public Gtk.MenuItem el;
private ValaProjectSettings _this;
// my vars (def)
// ctor
- public Xcls_MenuItem25(ValaProjectSettings _owner )
+ public Xcls_MenuItem24(ValaProjectSettings _owner )
{
_this = _owner;
this.el = new Gtk.MenuItem();
// user defined functions
}
- public class Xcls_SeparatorMenuItem26 : Object
+ public class Xcls_SeparatorMenuItem25 : Object
{
public Gtk.SeparatorMenuItem el;
private ValaProjectSettings _this;
// my vars (def)
// ctor
- public Xcls_SeparatorMenuItem26(ValaProjectSettings _owner )
+ public Xcls_SeparatorMenuItem25(ValaProjectSettings _owner )
{
_this = _owner;
this.el = new Gtk.SeparatorMenuItem();
// user defined functions
}
- public class Xcls_MenuItem27 : Object
+ public class Xcls_MenuItem26 : Object
{
public Gtk.MenuItem el;
private ValaProjectSettings _this;
// my vars (def)
// ctor
- public Xcls_MenuItem27(ValaProjectSettings _owner )
+ public Xcls_MenuItem26(ValaProjectSettings _owner )
{
_this = _owner;
this.el = new Gtk.MenuItem();
// user defined functions
}
+ public class Xcls_Label27 : Object
+ {
+ public Gtk.Label el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_Label27(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.Label( "Available Directories" );
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
public class Xcls_HPaned28 : Object
{
public Gtk.HPaned el;