src/Palete/Palete.vala
[app.Builder.js] / src / Palete / ValaSource.vala
index df3caea..1f5cc67 100644 (file)
@@ -197,6 +197,7 @@ namespace Palete {
                         
                }
                
 
                
                
@@ -252,7 +253,9 @@ namespace Palete {
                * Used to compile a non builder file..
                */
                 
-               public bool checkPlainFileSpawn(  JsRender.JsRender file, string contents )
+                
+               public bool checkPlainFileSpawn( JsRender.JsRender file, string contents )
                {
                        // race condition..
                        if (this.compiler != null) { 
@@ -289,6 +292,10 @@ namespace Palete {
                        DataOutputStream dostream = new DataOutputStream (ostream);
                        dostream.put_string (contents);
                        
+                       var target = pr.firstBuildModule();
+                       if (target.length < 1) {
+                               return false;
+                       }
                        
                        this.file = null;
                        this.line_offset = 0;
@@ -298,6 +305,7 @@ namespace Palete {
                        args += "--project";
                        args +=  file.project.fn;
                        args += "--target";
                        args += pr.firstBuildModule();
                        args += "--add-file";
                        args +=  tmpfile.get_path();
@@ -319,7 +327,7 @@ namespace Palete {
                        return true;
                         
                }
-               
+                
                
                public void spawnResult(int res, string output, string stderr)
                {
@@ -390,7 +398,7 @@ namespace Palete {
                                print("Missing output file: %s\n",exe);
                                return;
                        }
-                       string[] args = "/usr/bin/gnome-terminal -e /usr/bin/gdb -ex=r --args".split(" ");
+                       string[] args = "/usr/bin/gnome-terminal -x /usr/bin/gdb -ex=r --args".split(" ");
 
                        
                        // runs gnome-terminal, with gdb .. running the application..
@@ -408,7 +416,9 @@ namespace Palete {
                    
                    // should be home directory...
                    
-            var exec = new Spawn("/tmp", args);
+                   
+                   
+            var exec = new Spawn(GLib.Environment.get_home_dir() , args);
             exec.detach = true;
                    exec.run();