src/JsRender/NodeToVala.vala
authorAlan Knowles <alan@roojs.com>
Tue, 19 May 2015 04:45:25 +0000 (12:45 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 19 May 2015 04:45:25 +0000 (12:45 +0800)
src/JsRender/NodeToVala.vala

index ce34285..757e09c 100644 (file)
@@ -180,7 +180,7 @@ public class JsRender.NodeToVala : Object {
        public void addLine(string str)
        {
                this.cur_line++;
-               this.ret += str;
+               this.ret += str + "\n";
        }
        
        
@@ -204,11 +204,13 @@ public class JsRender.NodeToVala : Object {
                           
                        // class header..
                        // class xxx {   WrappedGtk  el; }
-                       this.ret += inpad + "public class " + this.xcls + " : Object \n" + this.inpad + "{\n";
-                       this.ret +=  this.pad + "public " + this.cls + " el;\n";
+                       this.addLine(inpad + "public class " + this.xcls + " : Object \n" + this.inpad + "{");
+                       
+                       this.addLine(this.pad + "public " + this.cls + " el;");
 
                          
-                       this.ret += this.pad + "private " + this.top.xcls + "  _this;\n\n";
+                       this.addLine(this.pad + "private " + this.top.xcls + "  _this;)";
+                       this.addLine("");