public Xcls_default_directory_tree_store default_directory_tree_store;
public Xcls_directory_render directory_render;
public Xcls_default_directory_menu default_directory_menu;
+ public Xcls_default_directory_menu default_directory_menu;
public Xcls_targets_tree targets_tree;
public Xcls_targets_tree_store targets_tree_store;
public Xcls_targets_render targets_render;
// my vars (dec)
// set gobject values
- var child_0 = new Xcls_targets_tree( _this );
+ var child_0 = new Xcls_default_directory_menu( _this );
child_0.ref();
this.el.add ( child_0.el );
+ var child_1 = new Xcls_targets_tree( _this );
+ child_1.ref();
+ this.el.add ( child_1.el );
// init method
// user defined functions
}
+ public class Xcls_default_directory_menu : Object
+ {
+ public Gtk.Menu el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_default_directory_menu(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ _this.default_directory_menu = this;
+ this.el = new Gtk.Menu();
+
+ // my vars (dec)
+
+ // set gobject values
+ var child_0 = new Xcls_MenuItem30( _this );
+ child_0.ref();
+ this.el.add ( child_0.el );
+ var child_1 = new Xcls_MenuItem31( _this );
+ child_1.ref();
+ this.el.add ( child_1.el );
+ var child_2 = new Xcls_SeparatorMenuItem32( _this );
+ child_2.ref();
+ this.el.add ( child_2.el );
+ var child_3 = new Xcls_MenuItem33( _this );
+ child_3.ref();
+ this.el.add ( child_3.el );
+ }
+
+ // user defined functions
+ }
+ public class Xcls_MenuItem30 : Object
+ {
+ public Gtk.MenuItem el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_MenuItem30(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.MenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "Add Directory";
+
+ // listeners
+ this.el.activate.connect( () => {
+
+ var chooser = new Gtk.FileChooserDialog (
+ "Add a directory", _this.window.el, Gtk.FileChooserAction.SELECT_FOLDER ,
+ "_Cancel",
+ Gtk.ResponseType.CANCEL,
+ "_Add",
+ Gtk.ResponseType.ACCEPT);
+ if (chooser.run () != Gtk.ResponseType.ACCEPT) {
+ chooser.close ();
+ return;
+ }
+ chooser.close ();
+ // add the directory..
+ var fn = _this.project.relPath(chooser.get_filename());
+ _this.project.compilegroups.get("_default_").sources.add(fn);
+ _this.default_directory_tree_store.load();
+ });
+ }
+
+ // user defined functions
+ }
+ public class Xcls_MenuItem31 : Object
+ {
+ public Gtk.MenuItem el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_MenuItem31(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.MenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "Add File";
+
+ // listeners
+ this.el.activate.connect( () => {
+
+ var chooser = new Gtk.FileChooserDialog (
+ "Add a directory", _this.window.el, Gtk.FileChooserAction.OPEN ,
+ "_Cancel",
+ Gtk.ResponseType.CANCEL,
+ "_Add",
+ Gtk.ResponseType.ACCEPT);
+ if (chooser.run () != Gtk.ResponseType.ACCEPT) {
+ chooser.close ();
+ return;
+ }
+ chooser.close ();
+ // add the directory..
+ var fn = _this.project.relPath(chooser.get_filename());
+ _this.project.compilegroups.get("_default_").sources.add(fn);
+ _this.default_directory_tree_store.load();
+ });
+ }
+
+ // user defined functions
+ }
+ public class Xcls_SeparatorMenuItem32 : Object
+ {
+ public Gtk.SeparatorMenuItem el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_SeparatorMenuItem32(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.SeparatorMenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ }
+
+ // user defined functions
+ }
+ public class Xcls_MenuItem33 : Object
+ {
+ public Gtk.MenuItem el;
+ private ValaProjectSettings _this;
+
+
+ // my vars (def)
+
+ // ctor
+ public Xcls_MenuItem33(ValaProjectSettings _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.MenuItem();
+
+ // my vars (dec)
+
+ // set gobject values
+ this.el.label = "Remove File/Directory";
+
+ // listeners
+ this.el.activate.connect( () => {
+
+ //
+ Gtk.TreeModel mod;
+ Gtk.TreeIter iter;
+ if (!_this.default_directory_tree.el.get_selection().get_selected(out mod, out iter)) {
+ print("nothing selected\n");
+ return;
+ }
+
+
+ // add the directory..
+
+
+ GLib.Value val;
+ mod.get_value(iter,0, out val);
+ var fn = (string) val;
+
+ print("remove: %s\n", fn);
+ if (!_this.project.compilegroups.get("_default_").sources.remove(fn)) {
+ print("remove failed");
+ }
+ _this.default_directory_tree_store.load();
+ });
+ }
+
+ // user defined functions
+ }
public class Xcls_targets_tree : Object
{
public Gtk.TreeView el;
var child_0 = new Xcls_targets_tree_store( _this );
child_0.ref();
this.el.set_model ( child_0.el );
- var child_1 = new Xcls_TreeViewColumn31( _this );
+ var child_1 = new Xcls_TreeViewColumn36( _this );
child_1.ref();
this.el.append_column ( child_1.el );
}
}
}
- public class Xcls_TreeViewColumn31 : Object
+ public class Xcls_TreeViewColumn36 : Object
{
public Gtk.TreeViewColumn el;
private ValaProjectSettings _this;
// my vars (def)
// ctor
- public Xcls_TreeViewColumn31(ValaProjectSettings _owner )
+ public Xcls_TreeViewColumn36(ValaProjectSettings _owner )
{
_this = _owner;
this.el = new Gtk.TreeViewColumn();
// my vars (dec)
// set gobject values
- var child_0 = new Xcls_Label34( _this );
+ var child_0 = new Xcls_Label39( _this );
child_0.ref();
this.el.pack_start ( child_0.el , false,false,0 );
var child_1 = new Xcls_build_pack_target( _this );
child_1.ref();
this.el.pack_start ( child_1.el , false,false,0 );
- var child_2 = new Xcls_Label36( _this );
+ var child_2 = new Xcls_Label41( _this );
child_2.ref();
this.el.pack_start ( child_2.el , false,false,0 );
var child_3 = new Xcls_build_compile_flags( _this );
child_3.ref();
this.el.pack_start ( child_3.el , false,false,0 );
- var child_4 = new Xcls_Label38( _this );
+ var child_4 = new Xcls_Label43( _this );
child_4.ref();
this.el.pack_start ( child_4.el , false,false,0 );
- var child_5 = new Xcls_ScrolledWindow39( _this );
+ var child_5 = new Xcls_ScrolledWindow44( _this );
child_5.ref();
this.el.pack_start ( child_5.el , true,true,0 );
}
// user defined functions
}
- public class Xcls_Label34 : Object
+ public class Xcls_Label39 : Object
{
public Gtk.Label el;
private ValaProjectSettings _this;
// my vars (def)
// ctor
- public Xcls_Label34(ValaProjectSettings _owner )
+ public Xcls_Label39(ValaProjectSettings _owner )
{
_this = _owner;
this.el = new Gtk.Label( "target filename" );
// user defined functions
}
- public class Xcls_Label36 : Object
+ public class Xcls_Label41 : Object
{
public Gtk.Label el;
private ValaProjectSettings _this;
// my vars (def)
// ctor
- public Xcls_Label36(ValaProjectSettings _owner )
+ public Xcls_Label41(ValaProjectSettings _owner )
{
_this = _owner;
this.el = new Gtk.Label( "compile flags" );
// user defined functions
}
- public class Xcls_Label38 : Object
+ public class Xcls_Label43 : Object
{
public Gtk.Label el;
private ValaProjectSettings _this;
// my vars (def)
// ctor
- public Xcls_Label38(ValaProjectSettings _owner )
+ public Xcls_Label43(ValaProjectSettings _owner )
{
_this = _owner;
this.el = new Gtk.Label( "Files to compile" );
// user defined functions
}
- public class Xcls_ScrolledWindow39 : Object
+ public class Xcls_ScrolledWindow44 : Object
{
public Gtk.ScrolledWindow el;
private ValaProjectSettings _this;
// my vars (def)
// ctor
- public Xcls_ScrolledWindow39(ValaProjectSettings _owner )
+ public Xcls_ScrolledWindow44(ValaProjectSettings _owner )
{
_this = _owner;
this.el = new Gtk.ScrolledWindow( null, null );
// my vars (dec)
// set gobject values
- var child_0 = new Xcls_ListStore41( _this );
+ var child_0 = new Xcls_ListStore46( _this );
child_0.ref();
this.el.set_model ( child_0.el );
- var child_1 = new Xcls_TreeViewColumn42( _this );
+ var child_1 = new Xcls_TreeViewColumn47( _this );
child_1.ref();
this.el.append_column ( child_1.el );
}
// user defined functions
}
- public class Xcls_ListStore41 : Object
+ public class Xcls_ListStore46 : Object
{
public Gtk.ListStore el;
private ValaProjectSettings _this;
// my vars (def)
// ctor
- public Xcls_ListStore41(ValaProjectSettings _owner )
+ public Xcls_ListStore46(ValaProjectSettings _owner )
{
_this = _owner;
this.el = new Gtk.ListStore( 2, typeof(string), // 0 key type
// user defined functions
}
- public class Xcls_TreeViewColumn42 : Object
+ public class Xcls_TreeViewColumn47 : Object
{
public Gtk.TreeViewColumn el;
private ValaProjectSettings _this;
// my vars (def)
// ctor
- public Xcls_TreeViewColumn42(ValaProjectSettings _owner )
+ public Xcls_TreeViewColumn47(ValaProjectSettings _owner )
{
_this = _owner;
this.el = new Gtk.TreeViewColumn();