public Xcls_targets_tree targets_tree;
public Xcls_targets_tree_store targets_tree_store;
public Xcls_targets_render targets_render;
+ public Xcls_set_vbox set_vbox;
public Xcls_build_pack_target build_pack_target;
public Xcls_build_compile_flags build_compile_flags;
public Xcls_files_tree_store files_tree_store;
this.project= project;
- this.compile_flags.el.text = "";
+ this.compile_flags.el.text = _this.project.compilegroups.get("_default_").compile_flags;
this.default_directory_tree_store.load();
this.default_packages_tree_store.load();
this.files_tree_store.load();
}
+ public void save () {
+ this.project.writeConfig();
+ }
public class Xcls_Notebook2 : Object
{
public Gtk.Notebook el;
// my vars (dec)
// set gobject values
+ this.el.placeholder_text = "eg. -g --valasrc $BASEDIR ";
// listeners
this.el.changed.connect( () => {
-
+ _this.project.compilegroups.get("_default_").compile_flags = this.el.text;
+ _this.project.writeConfig();
// _this.project.save();
});
public void load () {
var def = _this.project.compilegroups.get("_default_");
- var items = def.packages;
+ var items = def.packages;
this.el.clear();
var pal = (Palete.Gtk) Palete.factory("Gtk");
// init method
- this.el.add_attribute(_this.packages_render.el , "text", 0 ); }
+ this.el.add_attribute(_this.packages_render.el , "text", 0 );
+ }
// user defined functions
}
{
this.el.add_attribute(_this.packages_render_use.el , "active", 1 );
- } }
+ }
+ }
// user defined functions
}
// init method
- this.el.add_attribute(_this.directory_render.el , "text", 0 ); }
+ this.el.add_attribute(_this.directory_render.el , "text", 0 );
+ }
// user defined functions
}
{
this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
- } }
+ }
+ }
// user defined functions
}
Gtk.TreeModel mod;
Gtk.TreeIter iter;
if (!this.el.get_selection().get_selected(out mod, out iter)) {
- print("nothing selected\n");
+ print("nothing selected\n");
+ // should disable the right hand side..
+ _this.set_vbox.el.hide();
return;
}
-
+ _this.set_vbox.el.show();
// add the directory..
this.cursor = fn;
var cg = _this.project.compilegroups.get(fn);
+
_this.build_pack_target.el.set_text(cg.target_bin);
_this.build_compile_flags.el.set_text(cg.compile_flags);
+ _this.set_vbox.cgroup = cg;
+ //_this.files_tree_store.updatesel(cg);
// load the srouces
-
+
});
}
//this.el.set_value(citer, 1, items.get(i) );
};
this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);
-
+ _this.set_vbox.el.hide();
}
}
public class Xcls_TreeViewColumn35 : Object
{
this.el.add_attribute(_this.targets_render.el , "text", 0 );
- } }
+ }
+ }
// user defined functions
}
cg.name = newtext;
_this.project.compilegroups.unset(oldval);
_this.project.compilegroups.set(newtext, cg);
- _this.targets_tree_store.load();
+ _this.targets_tree_store.load();
});
}
// my vars (def)
+ public Project.GtkValaSettings cgroup;
// ctor
public Xcls_set_vbox(ValaProjectSettings _owner )
{
_this = _owner;
+ _this.set_vbox = this;
this.el = new Gtk.VBox( false, 0 );
// my vars (dec)
+ this.cgroup = null;
// set gobject values
var child_0 = new Xcls_Label38( _this );
// set gobject values
var child_0 = new Xcls_files_tree( _this );
child_0.ref();
+ this.el.add ( child_0.el );
}
// user defined functions
{
_this = _owner;
_this.files_tree_store = this;
- this.el = new Gtk.ListStore( 2, typeof(string), // 0 file name
+ this.el = new Gtk.ListStore( 4, typeof(string), // 0 file name
+ typeof(string), // 0 basename
typeof(string), // type (dir orfile)
typeof(bool) // is checked.
);
// user defined functions
public void load () {
- this.el.clear();
+ this.el.clear();
var def = _this.project.compilegroups.get("_default_");
var items = def.sources;
+
+
+
Gtk.TreeIter citer;
this.el.append(out citer);
this.el.set_value(citer, 0, items.get(i) ); // title
- this.el.set_value(citer, 1, "dir"); // type
- this.el.set_value(citer, 2, false ); // checked
- /*
- var files = def.files(items.get(i));
+ this.el.set_value(citer, 1, "<span foreground=\"green\" font_weight=\"bold\">" +
+ GLib.Markup.escape_text(items.get(i)) + "</span>"
+ ); // title
+ print("ADD item %s", items.get(i));
+ this.el.set_value(citer, 2, "dir"); // type
+ this.el.set_value(citer, 3, false ); // checked
+
+ var files = _this.project.files(items.get(i));
for(var j =0 ; j < files.size; j++) {
this.el.append(out citer);
-
+ print("ADD item %s", files.get(j));
this.el.set_value(citer, 0, files.get(j) ); // title
- this.el.set_value(citer, 1, "file"); // type
- this.el.set_value(citer, 2, false ); // checked
+ this.el.set_value(citer, 1, GLib.Markup.escape_text( Path.get_basename (files.get(j))) ); // title
+ this.el.set_value(citer, 2, "file"); // type
+ this.el.set_value(citer, 3, false ); // checked
}
- */
+
//this.el.set_value(citer, 1, items.get(i) );
}
this.el.set_sort_column_id(0,Gtk.SortType.ASCENDING);
+ }
+ public void update () {
+
+
+ Gtk.TreeIter citer;
+
+ for(var i =0 ; i < this.el.iter_n_children(null); i++) {
+ this.el.iter_nth_child(citer,null,i);
+
+ GLib.Value val;
+ this.el.get_value(iter,0, out val);
+ var fn = (string) val;
+
+ var active = false;
+ if (_this.set_vbox.cgroup.sources.contains(fn)) {
+ active = true;
+ }
+
+ this.el.set_value(citer, 3, active ); // checked
+ }
+
+
}
}
public class Xcls_TreeViewColumn46 : Object
// init method
- /* this.el.add_attribute(_this.files_render.el , "markup", 2 );
- // this.el.add_attribute(_this.files_render.el , "text", 1 ); */ }
+ this.el.add_attribute(_this.files_render.el , "markup", 1 ); // basnemae
+
+ /* this.el.add_attribute(_this.files_render.el , "markup", 2 );
+ */
+ }
// user defined functions
}
// init method
- /*
-
- this.el.add_attribute(_this.packages_render_use.el , "active", 1 );
-
- */ }
+ {
+ this.el.add_attribute(_this.files_render_use.el , "active", 3 );
+ }
+ }
// user defined functions
}
// listeners
this.el.toggled.connect( ( path_string) => {
- var m = _this.default_packages_tree_store.el;
+
+
+
+ var m = _this.files_tree_store.el;
Gtk.TreeIter iter;
Gtk.TreePath path = new Gtk.TreePath.from_string (path_string);
m.get_iter (out iter, path);
GLib.Value val;
- m.get_value(iter, 1, out val);
- m.set_value(iter, 1, ((bool) val) ? false :true);
- GLib.Value fval;
+ m.get_value(iter, 3, out val);
+ m.set_value(iter, 3, ((bool) val) ? false :true);
+
+ // type.
+ GLib.Value ftval;
+ m.get_value(iter, 2, out ftval);
+ var ftype = (string)ftval;
+
+ // full name...
+ GLib.Value fval;
m.get_value(iter, 0, out fval);
var fn = (string)fval;
- var def = _this.project.compilegroups.get("_default_");
- var items = def.packages;
+
+ var cg = _this.set_vbox.cgroup;
+ // what's the sleected target?
+ // update the list..
+ // if ftype is a dir == then toggle all the bellow.
+ // if ftype is a file .. see if all the files in that directory are check and check the dir.
+
+
if ((bool)val) {
// renive
- items.remove(fn);
+ cg.sources.remove(fn);
} else {
- items.add(fn);
+ cg.sources.add(fn);
}
});