Builder4/MainWindow.bjs
authorAlan Knowles <alan@roojs.com>
Tue, 23 Sep 2014 09:11:07 +0000 (17:11 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 23 Sep 2014 09:11:07 +0000 (17:11 +0800)
Builder4/MainWindow.vala

Builder4/MainWindow.bjs
Builder4/MainWindow.vala

index c124fb5..5e347c6 100644 (file)
                                                                     "items" : [
                                                                         {
                                                                             "listeners" : {
-                                                                                "clicked" : "  ( ) => {\n    switch (_this.state) {\n        case \"edit\":\n        \n            _this.hideViewEditing();\n            break;  \n        case \"files\":\n            // should only occur if there is an active file..\n            _this.showViewEditing();\n            break; \n            \n          case \"addprop\":\n            _this.hideAddProp();\n\n            break;\n        case \"addlistener\":\n            _this.hideAddListener();\n\n            break;\n             \n         case \"object\":\n            _this.hideObject();\n            break;    \n         \n         case \"codeedit\":\n            \n            _this.hideCodeEdit();  \n            break;\n            \n         case  \"projectedit\":\n         // save?\n            _this.hideProjectEdit();\n            break;\n            \n        default:\n            break;\n    }\n    return  ;    \n\n}"
+                                                                                "clicked" : "( ) => {\n  \n    var w = new Xcls_MainWindow();\n    w.ref();\n    w.el.show_all();\n    w.initChildren();\n    w.hideViewEditing();\n\n\n}"
                                                                             },
                                                                             "* pack" : false,
                                                                             "xtype" : "Button",
index ed81e1b..77d2008 100644 (file)
@@ -1634,43 +1634,13 @@ public class Xcls_MainWindow : Object
 
             // listeners 
             this.el.clicked.connect( ( ) => {
-                switch (_this.state) {
-                    case "edit":
-                    
-                        _this.hideViewEditing();
-                        break;  
-                    case "files":
-                        // should only occur if there is an active file..
-                        _this.showViewEditing();
-                        break; 
-                        
-                      case "addprop":
-                        _this.hideAddProp();
-            
-                        break;
-                    case "addlistener":
-                        _this.hideAddListener();
+              
+                var w = new Xcls_MainWindow();
+                w.ref();
+                w.el.show_all();
+                w.initChildren();
+                w.hideViewEditing();
             
-                        break;
-                         
-                     case "object":
-                        _this.hideObject();
-                        break;    
-                     
-                     case "codeedit":
-                        
-                        _this.hideCodeEdit();  
-                        break;
-                        
-                     case  "projectedit":
-                     // save?
-                        _this.hideProjectEdit();
-                        break;
-                        
-                    default:
-                        break;
-                }
-                return  ;    
             
             });
         }