Builder4/ClutterFiles.bjs
authorAlan Knowles <alan@roojs.com>
Fri, 22 Aug 2014 07:58:13 +0000 (15:58 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 22 Aug 2014 07:58:13 +0000 (15:58 +0800)
Builder4/ClutterFiles.js
Builder4/ClutterFiles.vala

Builder4/ClutterFiles.bjs
Builder4/ClutterFiles.js
Builder4/ClutterFiles.vala

index 4c5d2b0..e1b141c 100644 (file)
@@ -17,7 +17,7 @@
             "|init": "this.fileitems = new Gee.ArrayList<Xcls_fileitem>();\n",
             "|reactive": "true",
             "|void:clearFiles": "() {\n    \n    this.filelayout.el.remove_all_children();\n    // we need to unref all the chidren that we loaded though...\n    \n}\n",
-            "|void:loadProject": "(Project.Project pr) {\n    // list all the files, and create new Xcls_fileitem for each one.\n    \n    // LEAK --- we should unref all the chilren...\n    this.filelayout.el.y = 0;\n    this.clearFiles();\n    \n    print(\"clutter files - load project: \" + pr.name +\"\\n\");\n    // should unref.. them hopefully.\n    this.fileitems = new Gee.ArrayList<Xcls_fileitem>();\n\n    \n\n    var fiter = pr.sortedFiles().list_iterator();\n    while (fiter.next()) {\n        var a = new Xcls_fileitem(this,fiter.get());\n        this.fileitems.add(a);\n\n//        a.ref();\n        print(\"add to clutter file view: \" + fiter.get_value().name + \"\\n\");\n        this.filelayout.el.add_child(a.el);\n    }\n    \n   \n    \n    this.el.show_all();\n}\n",
+            "|void:loadProject": "(Project.Project pr) {\n    // list all the files, and create new Xcls_fileitem for each one.\n    \n    // LEAK --- we should unref all the chilren...\n    this.filelayout.el.y = 0;\n    this.clearFiles();\n    \n    print(\"clutter files - load project: \" + pr.name +\"\\n\");\n    // should unref.. them hopefully.\n    this.fileitems = new Gee.ArrayList<Xcls_fileitem>();\n\n    \n\n    var fiter = pr.sortedFiles().list_iterator();\n    while (fiter.next()) {\n        var a = new Xcls_fileitem(this,fiter.get());\n        this.fileitems.add(a);\n\n//        a.ref();\n        print(\"add to clutter file view: \" + fiter.get().name + \"\\n\");\n        this.filelayout.el.add_child(a.el);\n    }\n    \n   \n    \n    this.el.show_all();\n}\n",
             "|void:set_size": "(float w, float h) \n{\n     if (this.el == null) {\n        print(\"object not ready yet?\");\n        return;\n    }\n   _this.filelayout_manager.el.max_column_width = w - 150;\n   this.el.set_size(this.el.get_stage().width-150,\n                        this.el.get_stage().height);\n            this.el.set_position(100,50);\n}\n",
             "|xns": "Clutter",
             "items": [
index fc33c6e..5bff59a 100644 (file)
@@ -80,7 +80,7 @@ ClutterFiles=new XObject({
             this.fileitems.add(a);
     
     //        a.ref();
-            print("add to clutter file view: " + fiter.get_value().name + "\n");
+            print("add to clutter file view: " + fiter.get().name + "\n");
             this.filelayout.el.add_child(a.el);
         }
         
index fd3ec82..cf20c2e 100644 (file)
@@ -120,7 +120,7 @@ public class Xcls_ClutterFiles : Object
                 this.fileitems.add(a);
         
         //        a.ref();
-                print("add to clutter file view: " + fiter.get_value().name + "\n");
+                print("add to clutter file view: " + fiter.get().name + "\n");
                 this.filelayout.el.add_child(a.el);
             }