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

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

index cd0987e..5f84ef9 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/6\".print(pos));\n     });\n}\n",
+       "* init" : "{\n     Resources.singleton().updateProgress.connect((pos) => {\n        if (pos < 1) {\n            this.el.hide();\n            return;\n        }\n        this.el.show();\n        var cid = this.el.get_context_id(\"resources\");\n        this.el.remove_all(cid);\n        this.el.push(cid,\"Fetching Resource : %d/6\".print(pos));\n     });\n}\n",
        "xtype" : "Statusbar",
        "* pack" : "pack_end,false,true,0",
        "$ xns" : "Gtk"
index 056ece6..9353267 100644 (file)
@@ -2004,6 +2004,11 @@ public class Xcls_MainWindow : Object
 
             {
                  Resources.singleton().updateProgress.connect((pos) => {
+                    if (pos < 1) {
+                        this.el.hide();
+                        return;
+                    }
+                    this.el.show();
                     var cid = this.el.get_context_id("resources");
                     this.el.remove_all(cid);
                     this.el.push(cid,"Fetching Resource : %d/6".print(pos));