From 08f7460492b634de9f86e5b71efff83e1693340e Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Wed, 26 May 2010 14:04:51 +0800 Subject: [PATCH] Sample/Window.js --- Sample/Window.js | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/Sample/Window.js b/Sample/Window.js index 7bac00efb..c64234932 100644 --- a/Sample/Window.js +++ b/Sample/Window.js @@ -3101,22 +3101,19 @@ Window=new XObject({ label : "Run The Application", listeners : { "button_press_event":function (self, event) { - // call render on left tree - with special option!?! + // call render on left tree - with special option!?! - - - print("GET PROEJCT"); - var pr = this.get('/LeftProjectTree').getActiveProject(); + //print("GET PROEJCT"); + var pr = this.get('/LeftProjectTree').getActiveProject(); - var dir = ''; - for (var i in pr.paths) { - dir = i; - break; - } - var runner = GLib.path_get_dirname (__script_path__) + '/gtkrun.js'; - print ("RUN DIR:" + dir); - this.get('/BottomPane').el.show(); - this.get('/BottomPane').el.set_current_page(1); + var dir = ''; + for (var i in pr.paths) { + dir = i; + break; + } + var runner = GLib.path_get_dirname (__script_path__) + '/gtkrun.js'; + this.get('/Terminal').feed("RUN DIR:" + dir); + this.get('/Terminal').el.fork_command( null , [], [], GLib.path_get_dirname (__script_path__) , false,false,false); var cmd = "/usr/bin/seed " + runner + " " + dir + "\n"; @@ -3441,7 +3438,9 @@ Window=new XObject({ id : "Terminal", feed : function(str) { // we should make ourselves visable!!! + this.get('/BottomPane').el.show(); this.get('/BottomPane').el.set_current_page(1); + this.el.feed(str,str.length); } } -- 2.39.2