src/Builder4/MainWindow.bjs
authorAlan Knowles <alan@roojs.com>
Mon, 18 May 2015 09:01:28 +0000 (17:01 +0800)
committerAlan Knowles <alan@roojs.com>
Mon, 18 May 2015 09:01:28 +0000 (17:01 +0800)
src/Builder4/MainWindow.vala

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

index 1bd410e..0c76f23 100644 (file)
           },
           {
            "listeners" : {
-            "button_press_event" : "() => {\n    if (this.popup == null) {\n        this.popup = new Xcls_ValaCompileErrors();\n        this.popup.window = _this;\n    }\n    this.popup.show(this.notices, this.el);\n    return true;\n}"
+            "button_press_event" : "() => {\n    if (this.popup == null) {\n        this.popup = new Xcls_ValaCompileErrors();\n        this.popup.window = _this;\n    }\n    if (this.popup.active) {\n        this.popup.active = false;\n        this.popup.el.hide();\n        return true;\n    }\n    this.popup.show(this.notices, this.el);\n    return true;\n}"
            },
            "bool always_show_image" : true,
            "id" : "statusbar_depricated",
index 0f10d54..3e3ae62 100644 (file)
@@ -2424,6 +2424,11 @@ public class Xcls_MainWindow : Object
                     this.popup = new Xcls_ValaCompileErrors();
                     this.popup.window = _this;
                 }
+                if (this.popup.active) {
+                    this.popup.active = false;
+                    this.popup.el.hide();
+                    return true;
+                }
                 this.popup.show(this.notices, this.el);
                 return true;
             });