src/Builder4/MainWindow.bjs
authorAlan Knowles <alan@roojs.com>
Tue, 2 Jun 2015 11:47:26 +0000 (19:47 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 2 Jun 2015 11:47:26 +0000 (19:47 +0800)
src/Builder4/MainWindow.vala

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

index 7a6c445..bad7d34 100644 (file)
          "xtype" : "MenuBar",
          "$ xns" : "Gtk",
          "items" : [
+          {
+           "listeners" : {
+            "button_press_event" : "() => {\n    if (this.popup == null) {\n        this.popup = new Xcls_ValaCompileErrors();\n        this.popup.window = _this;\n    }\n   \n    \n    this.popup.show(this.notices, this.el);\n    return true;\n}"
+           },
+           "bool always_show_image" : true,
+           "id" : "statusbar_errors",
+           "| void setNotices" : "(Json.Object nots, int qty) {\n    this.el.show();\n    this.el.label = qty.to_string() + \" Errors\";\n    this.notices = nots;\n\n}\n",
+           "Xcls_ValaCompileErrors popup" : "",
+           "string label" : "Errors",
+           "* pack" : "add",
+           "xtype" : "ImageMenuItem",
+           "# Json.Object notices" : "new Json.Object() ",
+           "$ xns" : "Gtk",
+           "items" : [
+            {
+             "utf8 icon_name" : "dialog-error",
+             "* pack" : "set_image",
+             "xtype" : "Image",
+             "$ xns" : "Gtk"
+            }
+           ]
+          },
           {
            "* pack" : "add",
            "xtype" : "MenuItem",
index e261336..71bd60d 100644 (file)
@@ -39,6 +39,7 @@ public class Xcls_MainWindow : Object
     public Xcls_delprojectbutton delprojectbutton;
     public Xcls_statusbar statusbar;
     public Xcls_statusbar_errors statusbar_errors;
+    public Xcls_statusbar_errors statusbar_errors;
     public Xcls_statusbar_warnings statusbar_warnings;
     public Xcls_statusbar_depricated statusbar_depricated;
     public Xcls_statusbar_run statusbar_run;
@@ -2337,26 +2338,101 @@ public class Xcls_MainWindow : Object
             // my vars (dec)
 
             // set gobject values
-            var child_0 = new Xcls_MenuItem71( _this );
+            var child_0 = new Xcls_statusbar_errors( _this );
             child_0.ref();
             this.el.add (  child_0.el  );
-            var child_1 = new Xcls_statusbar_errors( _this );
+            var child_1 = new Xcls_MenuItem73( _this );
             child_1.ref();
             this.el.add (  child_1.el  );
-            var child_2 = new Xcls_statusbar_warnings( _this );
+            var child_2 = new Xcls_statusbar_errors( _this );
             child_2.ref();
             this.el.add (  child_2.el  );
-            var child_3 = new Xcls_statusbar_depricated( _this );
+            var child_3 = new Xcls_statusbar_warnings( _this );
             child_3.ref();
             this.el.add (  child_3.el  );
-            var child_4 = new Xcls_statusbar_run( _this );
+            var child_4 = new Xcls_statusbar_depricated( _this );
             child_4.ref();
             this.el.add (  child_4.el  );
+            var child_5 = new Xcls_statusbar_run( _this );
+            child_5.ref();
+            this.el.add (  child_5.el  );
         }
 
         // user defined functions
     }
-    public class Xcls_MenuItem71 : Object
+    public class Xcls_statusbar_errors : Object
+    {
+        public Gtk.ImageMenuItem el;
+        private Xcls_MainWindow  _this;
+
+
+            // my vars (def)
+        public Xcls_ValaCompileErrors popup;
+        public Json.Object notices;
+
+        // ctor
+        public Xcls_statusbar_errors(Xcls_MainWindow _owner )
+        {
+            _this = _owner;
+            _this.statusbar_errors = this;
+            this.el = new Gtk.ImageMenuItem();
+
+            // my vars (dec)
+            this.notices = new Json.Object() ;
+
+            // set gobject values
+            this.el.always_show_image = true;
+            this.el.label = "Errors";
+            var child_0 = new Xcls_Image72( _this );
+            child_0.ref();
+            this.el.set_image (  child_0.el  );
+
+            //listeners
+            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);
+                return true;
+            });
+        }
+
+        // user defined functions
+        public void setNotices (Json.Object nots, int qty) {
+            this.el.show();
+            this.el.label = qty.to_string() + " Errors";
+            this.notices = nots;
+        
+        }
+    }
+    public class Xcls_Image72 : Object
+    {
+        public Gtk.Image el;
+        private Xcls_MainWindow  _this;
+
+
+            // my vars (def)
+
+        // ctor
+        public Xcls_Image72(Xcls_MainWindow _owner )
+        {
+            _this = _owner;
+            this.el = new Gtk.Image();
+
+            // my vars (dec)
+
+            // set gobject values
+            this.el.icon_name = "dialog-error";
+        }
+
+        // user defined functions
+    }
+
+
+    public class Xcls_MenuItem73 : Object
     {
         public Gtk.MenuItem el;
         private Xcls_MainWindow  _this;
@@ -2365,7 +2441,7 @@ public class Xcls_MainWindow : Object
             // my vars (def)
 
         // ctor
-        public Xcls_MenuItem71(Xcls_MainWindow _owner )
+        public Xcls_MenuItem73(Xcls_MainWindow _owner )
         {
             _this = _owner;
             this.el = new Gtk.MenuItem();
@@ -2402,7 +2478,7 @@ public class Xcls_MainWindow : Object
             // set gobject values
             this.el.always_show_image = true;
             this.el.label = "Errors";
-            var child_0 = new Xcls_Image73( _this );
+            var child_0 = new Xcls_Image75( _this );
             child_0.ref();
             this.el.set_image (  child_0.el  );
 
@@ -2427,7 +2503,7 @@ public class Xcls_MainWindow : Object
         
         }
     }
-    public class Xcls_Image73 : Object
+    public class Xcls_Image75 : Object
     {
         public Gtk.Image el;
         private Xcls_MainWindow  _this;
@@ -2436,7 +2512,7 @@ public class Xcls_MainWindow : Object
             // my vars (def)
 
         // ctor
-        public Xcls_Image73(Xcls_MainWindow _owner )
+        public Xcls_Image75(Xcls_MainWindow _owner )
         {
             _this = _owner;
             this.el = new Gtk.Image();
@@ -2474,7 +2550,7 @@ public class Xcls_MainWindow : Object
             // set gobject values
             this.el.always_show_image = true;
             this.el.label = "Warnings";
-            var child_0 = new Xcls_Image75( _this );
+            var child_0 = new Xcls_Image77( _this );
             child_0.ref();
             this.el.set_image (  child_0.el  );
 
@@ -2498,7 +2574,7 @@ public class Xcls_MainWindow : Object
         
         }
     }
-    public class Xcls_Image75 : Object
+    public class Xcls_Image77 : Object
     {
         public Gtk.Image el;
         private Xcls_MainWindow  _this;
@@ -2507,7 +2583,7 @@ public class Xcls_MainWindow : Object
             // my vars (def)
 
         // ctor
-        public Xcls_Image75(Xcls_MainWindow _owner )
+        public Xcls_Image77(Xcls_MainWindow _owner )
         {
             _this = _owner;
             this.el = new Gtk.Image();
@@ -2545,7 +2621,7 @@ public class Xcls_MainWindow : Object
             // set gobject values
             this.el.always_show_image = true;
             this.el.label = "Depricated";
-            var child_0 = new Xcls_Image77( _this );
+            var child_0 = new Xcls_Image79( _this );
             child_0.ref();
             this.el.set_image (  child_0.el  );
 
@@ -2570,7 +2646,7 @@ public class Xcls_MainWindow : Object
         
         }
     }
-    public class Xcls_Image77 : Object
+    public class Xcls_Image79 : Object
     {
         public Gtk.Image el;
         private Xcls_MainWindow  _this;
@@ -2579,7 +2655,7 @@ public class Xcls_MainWindow : Object
             // my vars (def)
 
         // ctor
-        public Xcls_Image77(Xcls_MainWindow _owner )
+        public Xcls_Image79(Xcls_MainWindow _owner )
         {
             _this = _owner;
             this.el = new Gtk.Image();
@@ -2615,7 +2691,7 @@ public class Xcls_MainWindow : Object
             // set gobject values
             this.el.always_show_image = true;
             this.el.label = "Run";
-            var child_0 = new Xcls_Image79( _this );
+            var child_0 = new Xcls_Image81( _this );
             child_0.ref();
             this.el.set_image (  child_0.el  );
 
@@ -2634,7 +2710,7 @@ public class Xcls_MainWindow : Object
 
         // user defined functions
     }
-    public class Xcls_Image79 : Object
+    public class Xcls_Image81 : Object
     {
         public Gtk.Image el;
         private Xcls_MainWindow  _this;
@@ -2643,7 +2719,7 @@ public class Xcls_MainWindow : Object
             // my vars (def)
 
         // ctor
-        public Xcls_Image79(Xcls_MainWindow _owner )
+        public Xcls_Image81(Xcls_MainWindow _owner )
         {
             _this = _owner;
             this.el = new Gtk.Image();