src/Builder4/MainWindow.bjs
authorAlan Knowles <alan@roojs.com>
Sun, 17 May 2015 08:35:25 +0000 (16:35 +0800)
committerAlan Knowles <alan@roojs.com>
Sun, 17 May 2015 08:35:25 +0000 (16:35 +0800)
src/Builder4/MainWindow.vala

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

index ccd43df..810ad2d 100644 (file)
           },
           {
            "listeners" : {
-            "activate" : "() => {\n    _this.windowstate.vala_compile_errors.show(this.notices, this.el);\n}",
-            "button_press_event" : ""
+            "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}"
            },
            "bool always_show_image" : true,
            "id" : "statusbar_depricated",
            "xtype" : "ImageMenuItem",
            "# Json.Object notices" : "new Json.Object()",
            "$ xns" : "Gtk",
+           "string XXXX" : "",
            "items" : [
             {
              "utf8 icon_name" : "dialog-information",
index 995fc9e..996edb9 100644 (file)
@@ -2386,6 +2386,7 @@ public class Xcls_MainWindow : Object
 
             // my vars (def)
         public Json.Object notices;
+        public string XXXX;
 
         // ctor 
         public Xcls_statusbar_depricated(Xcls_MainWindow _owner )
@@ -2405,10 +2406,13 @@ public class Xcls_MainWindow : Object
             this.el.set_image (  child_0.el  );
 
             // listeners 
-            this.el.activate.connect( () => {
-                _this.windowstate.vala_compile_errors.show(this.notices, this.el);
+            this.el.button_press_event.connect( () => {
+                if (this.popup == null) {
+                    this.popup = new Xcls_ValaCompileErrors();
+                    this.popup.window = _this;
+                }
+                this.popup.show(this.notices, this.el);
             });
-            this.el.button_press_event.connect( );
         }
 
         // user defined functions