src/Builder4/MainWindow.bjs
authorAlan Knowles <alan@roojs.com>
Tue, 17 Mar 2015 14:15:54 +0000 (22:15 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 17 Mar 2015 14:15:54 +0000 (22:15 +0800)
src/Builder4/MainWindow.vala

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

index 87905d1..ed4c3b2 100644 (file)
                ]
               },
               {
-               "id" : "new_window",
+               "id" : "reload_resources",
                "* init" : "this.el.set_size(50,50);",
                "xtype" : "Actor",
                "* pack" : "add_child",
                "items" : [
                 {
                  "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
-                 "* pack" : "add_child",
                  "xtype" : "Actor",
+                 "* pack" : "add_child",
                  "$ xns" : "GtkClutter",
                  "items" : [
                   {
                    "listeners" : {
-                    "clicked" : "  ( ) => {\n        Xcls_MainWindow.singleton().no_windows++;\n        var w = new Xcls_MainWindow();\n        w.ref();\n\n        w.el.show_all();\n        w.initChildren();\n        w.windowstate.switchState(WindowState.State.FILES);\n}"
+                    "clicked" : " ( ) => {\n         Resources.singleton().fetchStart();\n}"
                    },
-                   "utf8 tooltip_text" : "Open New Window",
                    "* pack" : false,
                    "xtype" : "Button",
                    "width_request" : 50,
                    "$ xns" : "Gtk",
+                   "$ utf8 tooltip_text" : "\"Download latest resourse files\\nlike the object tree and object properties\"",
                    "height_request" : 50,
                    "items" : [
                     {
-                     "utf8 icon_name" : "window-new",
-                     "* pack" : "set_image",
                      "xtype" : "Image",
+                     "utf8 icon_name" : "go-bottom",
+                     "* pack" : "set_image",
                      "$ xns" : "Gtk"
                     }
                    ]
                ]
               },
               {
-               "id" : "reload_resources",
+               "id" : "new_window",
                "* init" : "this.el.set_size(50,50);",
                "xtype" : "Actor",
                "* pack" : "add_child",
                "items" : [
                 {
                  "* init" : "((Gtk.Container)(this.el.get_widget())).add ( child_0.el);",
-                 "xtype" : "Actor",
                  "* pack" : "add_child",
+                 "xtype" : "Actor",
                  "$ xns" : "GtkClutter",
                  "items" : [
                   {
                    "listeners" : {
-                    "clicked" : " ( ) => {\n         Resources.singleton().fetchStart();\n}"
+                    "clicked" : "  ( ) => {\n        Xcls_MainWindow.singleton().no_windows++;\n        var w = new Xcls_MainWindow();\n        w.ref();\n\n        w.el.show_all();\n        w.initChildren();\n        w.windowstate.switchState(WindowState.State.FILES);\n}"
                    },
+                   "utf8 tooltip_text" : "Open New Window",
                    "* pack" : false,
                    "xtype" : "Button",
                    "width_request" : 50,
                    "$ xns" : "Gtk",
-                   "$ utf8 tooltip_text" : "\"Download latest resourse files\\nlike the object tree and object properties\"",
                    "height_request" : 50,
                    "items" : [
                     {
-                     "xtype" : "Image",
-                     "utf8 icon_name" : "go-bottom",
+                     "utf8 icon_name" : "window-new",
                      "* pack" : "set_image",
+                     "xtype" : "Image",
                      "$ xns" : "Gtk"
                     }
                    ]
index 6aad0d8..c54a529 100644 (file)
@@ -35,8 +35,8 @@ public class Xcls_MainWindow : Object
     public Xcls_addprojectbutton addprojectbutton;
     public Xcls_addfilebutton addfilebutton;
     public Xcls_delprojectbutton delprojectbutton;
-    public Xcls_new_window new_window;
     public Xcls_reload_resources reload_resources;
+    public Xcls_new_window new_window;
     public Xcls_statusbar statusbar;
 
         // my vars (def)
@@ -622,10 +622,10 @@ public class Xcls_MainWindow : Object
             var child_10 = new Xcls_delprojectbutton( _this );
             child_10.ref();
             this.el.add_child (  child_10.el  );
-            var child_11 = new Xcls_new_window( _this );
+            var child_11 = new Xcls_reload_resources( _this );
             child_11.ref();
             this.el.add_child (  child_11.el  );
-            var child_12 = new Xcls_reload_resources( _this );
+            var child_12 = new Xcls_new_window( _this );
             child_12.ref();
             this.el.add_child (  child_12.el  );
 
@@ -1869,7 +1869,7 @@ public class Xcls_MainWindow : Object
 
         // user defined functions 
     }
-    public class Xcls_new_window : Object 
+    public class Xcls_reload_resources : Object 
     {
         public Clutter.Actor el;
         private Xcls_MainWindow  _this;
@@ -1878,10 +1878,10 @@ public class Xcls_MainWindow : Object
             // my vars (def)
 
         // ctor 
-        public Xcls_new_window(Xcls_MainWindow _owner )
+        public Xcls_reload_resources(Xcls_MainWindow _owner )
         {
             _this = _owner;
-            _this.new_window = this;
+            _this.reload_resources = this;
             this.el = new Clutter.Actor();
 
             // my vars (dec)
@@ -1944,20 +1944,14 @@ public class Xcls_MainWindow : Object
             // set gobject values
             this.el.width_request = 50;
             this.el.height_request = 50;
-            this.el.tooltip_text = "Open New Window";
+            this.el.tooltip_text = "Download latest resourse files\nlike the object tree and object properties";
             var child_0 = new Xcls_Image60( _this );
             child_0.ref();
             this.el.set_image (  child_0.el  );
 
             // listeners 
             this.el.clicked.connect( ( ) => {
-                    Xcls_MainWindow.singleton().no_windows++;
-                    var w = new Xcls_MainWindow();
-                    w.ref();
-            
-                    w.el.show_all();
-                    w.initChildren();
-                    w.windowstate.switchState(WindowState.State.FILES);
+                     Resources.singleton().fetchStart();
             });
         }
 
@@ -1980,12 +1974,12 @@ public class Xcls_MainWindow : Object
             // my vars (dec)
 
             // set gobject values
-            this.el.icon_name = "window-new";
+            this.el.icon_name = "go-bottom";
         }
 
         // user defined functions 
     }
-    public class Xcls_reload_resources : Object 
+    public class Xcls_new_window : Object 
     {
         public Clutter.Actor el;
         private Xcls_MainWindow  _this;
@@ -1994,10 +1988,10 @@ public class Xcls_MainWindow : Object
             // my vars (def)
 
         // ctor 
-        public Xcls_reload_resources(Xcls_MainWindow _owner )
+        public Xcls_new_window(Xcls_MainWindow _owner )
         {
             _this = _owner;
-            _this.reload_resources = this;
+            _this.new_window = this;
             this.el = new Clutter.Actor();
 
             // my vars (dec)
@@ -2060,14 +2054,20 @@ public class Xcls_MainWindow : Object
             // set gobject values
             this.el.width_request = 50;
             this.el.height_request = 50;
-            this.el.tooltip_text = "Download latest resourse files\nlike the object tree and object properties";
+            this.el.tooltip_text = "Open New Window";
             var child_0 = new Xcls_Image64( _this );
             child_0.ref();
             this.el.set_image (  child_0.el  );
 
             // listeners 
             this.el.clicked.connect( ( ) => {
-                     Resources.singleton().fetchStart();
+                    Xcls_MainWindow.singleton().no_windows++;
+                    var w = new Xcls_MainWindow();
+                    w.ref();
+            
+                    w.el.show_all();
+                    w.initChildren();
+                    w.windowstate.switchState(WindowState.State.FILES);
             });
         }
 
@@ -2090,7 +2090,7 @@ public class Xcls_MainWindow : Object
             // my vars (dec)
 
             // set gobject values
-            this.el.icon_name = "go-bottom";
+            this.el.icon_name = "window-new";
         }
 
         // user defined functions