src/Builder4/MainWindow.bjs
authorAlan Knowles <alan@roojs.com>
Tue, 17 Mar 2015 13:28:27 +0000 (21:28 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 17 Mar 2015 13:28:27 +0000 (21:28 +0800)
src/Builder4/MainWindow.vala

src/Builder4/MainWindow.bjs
src/Builder4/MainWindow.vala

index 104565a..64ee38e 100644 (file)
       },
       {
        "id" : "statusbar",
+       "* init" : "{\n     Resources.singleton().updateProgress.connect((pos) => {\n        var cid = this.el.get_context_id(\"resources\");\n        this.el.remove_all(cid);\n        this.el.push(cid,\"Fetching Resource : %d\".print(pos));\n     });\n}\n",
        "xtype" : "Statusbar",
        "* pack" : "pack_end,false,true,0",
        "$ xns" : "Gtk"
index 4ea2bdd..b1286e6 100644 (file)
@@ -1997,6 +1997,16 @@ public class Xcls_MainWindow : Object
             // my vars (dec)
 
             // set gobject values
+
+            // init method 
+
+            {
+                 Resources.singleton().updateProgress.connect((pos) => {
+                    var cid = this.el.get_context_id("resources");
+                    this.el.remove_all(cid);
+                    this.el.push(cid,"Fetching Resource : %d".print(pos));
+                 });
+            }
         }
 
         // user defined functions