X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Builder3%2FMain.js;h=c098538e2795cf76e2847919a7dc6bbe381b007a;hb=119290bc3234e9ece1c64dbd72ca486d9633b5b7;hp=7c7f7183ce29e33a1547f7870cbfdb1ab91c4957;hpb=32fe8830e0fb7a105b7ec8d999df42503a5ed87d;p=app.Builder.js diff --git a/Builder3/Main.js b/Builder3/Main.js index 7c7f7183c..c098538e2 100644 --- a/Builder3/Main.js +++ b/Builder3/Main.js @@ -1,6 +1,46 @@ +Gtk = imports.gi.Gtk; +Gdk = imports.gi.Gdk; + Window = imports.Builder3.Window.Window; - -Window.el.show(); -print("RAN SHOW?"); -Seed.exit(); \ No newline at end of file +JSON.xstringify = function (o) { + var seen = []; + return JSON.stringify(o, function(_, value) { + if (typeof value === 'object' && value !== null) { + if (seen.indexOf(value) !== -1) return null; + else seen.push(value); + } + return value; + }, 4); +} + +/* +atoms = { + "STRING" : Gdk.atom_intern("STRING") + }; +targetList = new Gtk.TargetList(); +targetList.add( atoms["STRING"], 0, 0); + + + +Gtk.rc_parse_string( + "style \"gtkcombobox-style\" {\n" + + " GtkComboBox::appears-as-list = 1\n" + + "}\n"+ + "class \"GtkComboBox\" style \"gtkcombobox-style\"\n"); + +*/ +Window.el.show_all(); + + +// this ties two elements together... +// it used to hapen in the init() code for the element, it should be moved to a 'global init for a whole module' +var pm = imports.ProjectManager.ProjectManager; + +var combomodel = Window.get('/LeftProjectTree.combomodel'); +pm.on('changed', function() { + print("caught changed hook on project manager - reloading data"); + combomodel.loadData(pm.projects); + +}); + \ No newline at end of file