},
loadFile : function(f) {
//console.dump(f);
- // print("LOADFILE");
+ print("LOADFILE");
this.el.clear();
this.file = f;
items : [
{
xtype: Gtk.TreeView,
+
listeners : {
cursor_changed : function (self) {
+
+ var model = this.get('/LeftProjectTree.model');
+
+
+
+ if (model.loading) {
+
+
+ return;
+ }
+ print("LOADING IS FALSE");
var ret = {};
if (this.selection.count_selected_rows() < 1) {
//XN.get('Builder.LeftTree.model').
return;
}
- var model = this.get('/LeftProjectTree.model');
- //console.log('changed');
+ //console.log('changed');
var s = this.selection;
s.get_selected(ret);
var value = ''+ ret.model.get_value(ret.iter, 2).value.get_string();
xtype: Gtk.TreeStore,
pack : "set_model",
id : "model",
+ loading : false,
init : function() {
XObject.prototype.init.call(this);
this.el.set_column_types ( 3, [
},
loadProject : function(pr) {
print("LOAD PROJECT");
+ var model = this.get('/LeftProjectTree.model');
+ model.loading = true;
+
this.el.clear();
if (!pr) {
return;
}
-
+
this.get('/LeftProjectTree').project = pr;
+
this.load(pr.toTree());
+
this.get('/LeftProjectTree.view').el.expand_all();
+ model.loading = false;
+
},
load : function(tr,iter) {
// console.dump(tr);
- var view = this.get('/LeftProjectTree.view')
-
- view.loading = true;
+
+
console.log('Project tree load: ' + tr.length);
var cret = {};
//this.insert(citer,iter,0);
}
});
- view.loading = false;
+
},
getValue : function(iter, col) {
var gval = ''+ this.el.get_value(iter, col).value.get_string();