-Gtk = imports.gi.Gtk;
+ Gtk = imports.gi.Gtk;
Gdk = imports.gi.Gdk;
Pango = imports.gi.Pango;
GLib = imports.gi.GLib;
Gtk.main_quit();
},
show : function (self) {
-
- imports.ProjectManager.ProjectManager.loadConfig();
-
- print("HIDEWIN - calling MidPropTree hidewin")
- this.get('/MidPropTree').hideWin();
- this.get('/RightPalete').hide();
- this.get('/BottomPane').el.hide();
- //this.get('/Editor').el.show_all();
-
+
+ imports.ProjectManager.ProjectManager.loadConfig();
+
+ print("HIDEWIN - calling MidPropTree hidewin")
+ this.get('/MidPropTree').hideWin();
+ this.get('/RightPalete').hide();
+ this.get('/BottomPane').el.hide();
+ //this.get('/Editor').el.show_all();
+
}
},
border_width : 0,
events : [
Gdk.EventMask.BUTTON_MOTION_MASK
],
- init : function() {
- XObject.prototype.init.call(this);
- this.el.add_events (Gdk.EventMask.BUTTON_MOTION_MASK );
- },
+
listeners : {
activate : function (self) {
// this does not actually expand it..
}
return true;
- },
+ } /*,
enter_notify_event : function (self, event) {
return true;
this.el.expanded = !this.el.expanded;
return true;
}
+ */
},
id : "expander",
label : "Select Project or File",
var model = this.get('/LeftProjectTree.combomodel');
// print ("loading Projects?")
+ //print(JSON.stringify(pm.projects, null,4));Seed.quit();
//console.dump(pm.projects);
model.loadData(pm.projects);
xtype: Gtk.Notebook,
id : "notebook",
pack : "pack_start,true,true",
- init : function() {
- XObject.prototype.init.call(this);
- this.el.set_current_page(0);
-
- },
+ current_page : 0,
+
show_border : false,
show_tabs : false,
items : [
case 'Gtk':
return this.get('/RightGtkView');
}
+ return false;
},
- init : function() {
- XObject.prototype.init.call(this);
- this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC)
- },
+
renderView : function() {
var render = this.getRenderer();
var model = this.get('model');
var res = {};
this.get('/LeftTree.view').el.get_path_at_pos(ev.button.x,ev.button.y, res);
- if (!this.get('/LeftTreeMenu').el) { this.get('/LeftTreeMenu').init(); }
+ if (!this.get('/LeftTreeMenu').el) {
+ this.get('/LeftTreeMenu').init();
+ }
this.get('/LeftTreeMenu').el.set_screen(Gdk.Screen.get_default());
this.get('/LeftTreeMenu').el.show_all();
Gdk.drag_status(ctx, 0, time);
return true;
}
- print(JSON.stringify(tg,null,4));
+ // print(JSON.stringify(tg,null,4));
//console.dump(tg);
this.targetData = tg;
},
init : function() {
- XObject.prototype.init.call(this);
+ XObject.prototype.init.call(this);
var description = new Pango.FontDescription.c_new();
description.set_size(8000);
this.el.modify_font(description);
},
- init : function() {
- XObject.prototype.init.call(this);
- this.el.set_column_types ( 3, [
+ columns : [
GObject.TYPE_STRING, // title
GObject.TYPE_STRING, // tip
GObject.TYPE_STRING // source..
- ] );
- },
+ ] ,
+
+
+
listAllTypes : function() {
var s = this.get('/LeftTree.view').selection;
print ("LIST ALL TYPES: " + s.count_selected_rows() );
s.get_selected( oret);
var node = this.nodeToJS(oret.iter,false);
//console.dump(node);
- print(JSON.stringify(node, null,4));
+ //print(JSON.stringify(node, null,4));
// needs to drop first, otherwise the target_data
// treepath will be invalid.
xtype: Gtk.ListStore,
id : "combomodel",
pack : "set_model",
- init : function() {
- XObject.prototype.init.call(this);
- this.el.set_column_types ( 2, [
- GObject.TYPE_STRING, // real key
- GObject.TYPE_STRING // real type
-
-
- ] );
- // this.el.set_sort_column_id(1,Gtk.SortType.ASCENDING);
- var pm = imports.ProjectManager.ProjectManager;
- var _this = this;
- pm.on('changed', function() {
- print("caught changed hook on project manager - reloading data");
- _this.loadData(pm.projects);
+
+ columns : [
+ GObject.TYPE_STRING,
+ GObject.TYPE_STRING
+ ],
+
+
- });
- },
loadData : function(data) {
- var ov = this.get('/LeftProjectTree.combo').getValue();
+ //print("load data called");Seed.quit();
+ //print(data);Seed.quit();
+
+ var ov = this.get('/LeftProjectTree.combo').getValue();
this.el.clear();
var el = this.el;
var na = {};
- data.forEach(function(p) {
+
+
+ data.forEach(function(p) {
el.append(na);
//print(JSON.stringify(XObject.keys(na)));
xtype: Gtk.ScrolledWindow,
pack : "add",
shadow_type : Gtk.ShadowType.IN,
- init : function() {
- XObject.prototype.init.call(this);
- this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC );
- },
+
items : [
{
xtype: Gtk.TreeView,
xtype: Gtk.TreeStore,
pack : "set_model",
id : "model",
- loading : false,
- init : function() {
- XObject.prototype.init.call(this);
- this.el.set_column_types ( 3, [
+ loading : false,
+ columns : [
GObject.TYPE_STRING, // title
GObject.TYPE_STRING, // tip
GObject.TYPE_STRING // id..
- ] );
-
- },
+ ] ,
+
+
loadProject : function(pr) {
print("LOAD PROJECT");
var model = this.get('/LeftProjectTree.model');
editing : false,
id : "LeftPanel",
pack : "add",
- init : function() {
- XObject.prototype.init.call(this);
- this.el.set_policy (Gtk.PolicyType.AUTOMATIC, Gtk.PolicyType.AUTOMATIC);
- },
+
shadow_type : Gtk.ShadowType.IN,
items : [
{
this.el.set_value(ret.iter, 5, type + ' : ' + str);
// update the tree...
- print("new data: " + JSON.stringify(this.toJS() , null,4));
+ //print("new data: " + JSON.stringify(this.toJS() , null,4));
this.get('/LeftTree.model').setFromNode(false,this.toJS());
this.get('/LeftTree.model').changed(doRefresh);
}
},
- init : function() {
- XObject.prototype.init.call(this);
- this.el.set_column_types ( 6, [
+ columns : [
GObject.TYPE_STRING, // 0 real key
GObject.TYPE_STRING, // 1 real value
GObject.TYPE_STRING, // 2 visable key
GObject.TYPE_STRING, // 4 need to store type of!!!
GObject.TYPE_STRING // 5 tooltip
- ]);
- },
- load : function(ar) {
+ ],
+
+ load : function(ar) {
// might casue problesm..
// this.get('/Editor.RightEditor').save();
this.get('buttonbar').el.hide();
this.get('viewbox').el.show();
var ce = this.get('/Window.centereast').el;
- print(JSON.stringify(XObject.keys(ce) ,null,4));
+ //print(JSON.stringify(XObject.keys(ce) ,null,4));
ce.set_position(ce.get_allocated_width() - 150);
// this.get('model').expanded();