Builder4/GtkView.bjs
authorAlan Knowles <alan@roojs.com>
Fri, 19 Sep 2014 10:09:17 +0000 (18:09 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 19 Sep 2014 10:09:17 +0000 (18:09 +0800)
Builder4/GtkView.vala

Builder4/GtkView.bjs
Builder4/GtkView.vala

index 375951e..2083aea 100644 (file)
@@ -8,9 +8,9 @@
     "items" : [
         {
             "| void createThumb" : "() {\n    \n    \n    if (this.file == null) {\n        return;\n    }\n    var filename = this.file.getIconFileName(false);\n    \n    var  win = this.el.get_parent_window();\n    var width = win.get_width();\n    var height = win.get_height();\n\n    Gdk.Pixbuf screenshot = Gdk.pixbuf_get_from_window(win, 0, 0, width, height); // this.el.position?\n\n    screenshot.save(filename,\"png\");\n    return;\n    \n    \n    \n    \n    \n     \n    \n    // should we hold until it's printed...\n    \n      \n\n    \n    \n\n\n    \n     \n}\n",
+            "| void loadFile" : "(JsRender.JsRender file) \n{\n    \n \n        this.file = null;\n        \n        if (file.tree == null) {\n            return;\n        }\n        this.file = file;\n        if (this.lastObj != null) {\n            this.container.el.remove(this.lastObj);\n        }\n \n\tvar x = new JsRender.NodeToGtk(file.tree);\n        var obj = x.munge() as Gtk.Widget;\n        this.lastObj = null;\n\tif (obj == null) {\n        \treturn;\n\t}\n\tthis.lastObj = obj;\n        \n        this.container.el.add(obj);\n        obj.show_all();\n}\ns",
             "xtype" : "VPaned",
             "$ xns" : "Gtk",
-            "| return_type XXXX" : "(JsRender.JsRender file) \n{\n    \n \n        this.file = null;\n        \n        if (file.tree == null) {\n            return;\n        }\n        this.file = file;\n        if (this.lastObj != null) {\n            this.container.el.remove(this.lastObj);\n        }\n \n\tvar x = new JsRender.NodeToGtk(file.tree);\n        var obj = x.munge() as Gtk.Widget;\n        this.lastObj = null;\n\tif (obj == null) {\n        \treturn;\n\t}\n\tthis.lastObj = obj;\n        \n        this.container.el.add(obj);\n        obj.show_all();\n}\ns",
             "items" : [
                 {
                     "id" : "GtkView",
index 42f07ed..bb0ade9 100644 (file)
@@ -65,7 +65,7 @@ public class GtkView : Object
         
          
     }
-    public return_type XXXX (JsRender.JsRender file) 
+    public void loadFile (JsRender.JsRender file) 
     {