src/JsRender/Gtk.vala
authorAlan Knowles <alan@roojs.com>
Mon, 27 Apr 2015 09:54:14 +0000 (17:54 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 27 Apr 2015 09:54:14 +0000 (17:54 +0800)
src/JsRender/Gtk.vala

index 531c0ff..7c7a29d 100644 (file)
@@ -61,46 +61,46 @@ namespace JsRender {
         },
         */
 
-       public   override void   removeFiles() {
-               var js = GLib.Path.get_dirname(this.path) +"/" +  name + ".js";
-               if (FileUtils.test(js, FileTest.EXISTS)) {
-                       GLib.FileUtils.remove(js);
-               }
-               var vala = GLib.Path.get_dirname(this.path) +"/" + name + ".vala";
-               if (FileUtils.test(vala, FileTest.EXISTS)) {
-                       GLib.FileUtils.remove(vala);
+               public   override void   removeFiles() {
+                       var js = GLib.Path.get_dirname(this.path) +"/" +  name + ".js";
+                       if (FileUtils.test(js, FileTest.EXISTS)) {
+                               GLib.FileUtils.remove(js);
+                       }
+                       var vala = GLib.Path.get_dirname(this.path) +"/" + name + ".vala";
+                       if (FileUtils.test(vala, FileTest.EXISTS)) {
+                               GLib.FileUtils.remove(vala);
+                       }
                }
-       }
         
-         public   override void  loadItems() throws GLib.Error // : function(cb, sync) == original was async.
-        {
-          
-            print("load Items!");
-            if (this.tree != null) {
-                return;
-            }
-            
-            print("load: " + this.path);
+               public   override void  loadItems() throws GLib.Error // : function(cb, sync) == original was async.
+               {
+                 
+                       print("load Items!");
+                       if (this.tree != null) {
+                               return;
+                       }
+                       
+                       print("load: " + this.path);
 
 
-            var pa = new Json.Parser();
-            pa.load_from_file(this.path);
-            var node = pa.get_root();
-            
-            if (node.get_node_type () != Json.NodeType.OBJECT) {
-                       throw new Error.INVALID_FORMAT ("Unexpected element type %s", node.type_name ());
-               }
-            var obj = node.get_object ();
-            
-            this.name = obj.get_string_member("name");
-            this.parent = obj.get_string_member("parent");
-            this.title = obj.get_string_member("title");
-            
-            if (obj.has_member("build_module")) { // should check type really..
+                       var pa = new Json.Parser();
+                       pa.load_from_file(this.path);
+                       var node = pa.get_root();
+                       
+                       if (node.get_node_type () != Json.NodeType.OBJECT) {
+                               throw new Error.INVALID_FORMAT ("Unexpected element type %s", node.type_name ());
+                       }
+                       var obj = node.get_object ();
+                       
+                       this.name = obj.get_string_member("name");
+                       this.parent = obj.get_string_member("parent");
+                       this.title = obj.get_string_member("title");
+                       
+                       if (obj.has_member("build_module")) { // should check type really..
                                this.build_module = obj.get_string_member("build_module");
-            }
-             
-            // load items[0] ??? into tree...
+                       }
+                        
+                       // load items[0] ??? into tree...
                        var bjs_version_str = this.jsonHasOrEmpty(obj, "bjs-version");
                        bjs_version_str = bjs_version_str == "" ? "1" : bjs_version_str;
 
@@ -117,17 +117,10 @@ namespace JsRender {
 
                        }
                                
-            
-        }
-         
-         // convert xtype for munged output..
+                       
+               }
          
-         /*
-        mungeXtype : function(xtype, els)
-        {
-            els.push('xtype: '+ xtype);
-        },
-        */
+        
                
         public override string toSourcePreview()
         {