X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Sample%2FWindow.js;h=66223918e5d0ce636d01b93ebf5a9895061cf470;hb=f927f87326fa8196765f0c524cb514a2152f66c3;hp=4474e9235a1a20a21c5b75d5972688496b356bb2;hpb=0b811ac427e3b5f3e3ae4747b13238ae42f8420b;p=app.Builder.js diff --git a/Sample/Window.js b/Sample/Window.js index 4474e9235..66223918e 100644 --- a/Sample/Window.js +++ b/Sample/Window.js @@ -8,13 +8,33 @@ GtkSource = imports.gi.GtkSource; WebKit = imports.gi.WebKit; Vte = imports.gi.Vte; GtkClutter = imports.gi.GtkClutter; +Gdl = imports.gi.Gdl; console = imports.console; XObject = imports.XObject.XObject; Window=new XObject({ xtype: Gtk.Window, - type : Gtk.WindowType.TOPLEVEL, - title : "Application Builder", + listeners : { + delete_event : function (self, event) { + return false; + }, + destroy : function (self) { + Gtk.main_quit(); + }, + show : function (self) { + print("WINDOW SHOWING - trying to hide"); + imports.Builder.Provider.ProjectManager.ProjectManager.loadConfig(); + this.get('/MidPropTree').hideWin(); + this.get('/RightPalete').hide(); + this.get('/BottomPane').el.hide(); + //this.get('/Editor').el.show_all(); + + } + }, border_width : 0, + default_height : 500, + default_width : 800, + id : "Window", + title : "Application Builder", init : function() { this.atoms = { "STRING" : Gdk.atom_intern("STRING") @@ -33,28 +53,10 @@ Window=new XObject({ }, - default_width : 800, - default_height : 500, - id : "Window", setTitle : function(str) { this.el.set_title(this.title + ' - ' + str); }, - listeners : { - delete_event : function (self, event) { - return false; - }, - destroy : function (self) { - Gtk.main_quit(); - }, - show : function (self) { - print("WINDOW SHOWING - trying to hide"); - imports.Builder.Provider.ProjectManager.ProjectManager.loadConfig(); - this.get('/MidPropTree').hideWin(); - this.get('/RightPalete').hide(); - this.get('/BottomPane').el.hide(); - - } - }, + type : Gtk.WindowType.TOPLEVEL, items : [ { xtype: Gtk.VBox, @@ -213,7 +215,7 @@ Window=new XObject({ activate : function (self, event) { var js = this.get('/LeftTree.model').toJS(); if (js && js[0]) { - this.get('/RightBrowser.view').renderJS(js[0]); + this.get('/RightBrowser.view').renderJS(js[0], true); } return false; } @@ -263,7 +265,7 @@ Window=new XObject({ html = html.replace('', project.runhtml + ''); - var jsstr = JSON.stringify(js[0], null, 4); + var jsstr = JSON.(js[0], null, 4); var runbuilder = '