src/Builder4/MainWindow.bjs
authorAlan Knowles <alan@roojs.com>
Fri, 27 Feb 2015 01:02:30 +0000 (09:02 +0800)
committerAlan Knowles <alan@roojs.com>
Fri, 27 Feb 2015 01:02:30 +0000 (09:02 +0800)
src/Builder4/MainWindow.vala

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

index 25cd179..5b5459e 100644 (file)
                  "items" : [
                   {
                    "listeners" : {
-                    "clicked" : "  ( ) => {\n    switch (_this.state) {\n        case \"edit\":\n            _this.showProjectEdit();\n            break;  \n        case \"files\":\n            // _this.showViewEditing();\n            break; \n        case \"projectedit\":\n            _this.hideProjectEdit();\n            break;\n            \n            \n              \n        case \"addprop\":\n            _this.hideAddProp();\n            _this.showProjectEdit();\n            break;\n        case \"addlistener\":\n            _this.hideAddListener();\n            _this.showProjectEdit();\n            break;\n             \n         case \"object\":\n            _this.hideObject();\n            _this.showProjectEdit();    \n            break;\n        default:\n            break;\n    }\n    return  ;    \n\n\n}"
+                    "clicked" : "  ( ) => {\n     this.windowstate.switchState(WindowState.State.PROJECT);\n   \n\n\n}"
                    },
                    "* pack" : false,
                    "xtype" : "Button",
index 20dc264..65c346a 100644 (file)
@@ -1481,36 +1481,8 @@ public class Xcls_MainWindow : Object
 
             // listeners 
             this.el.clicked.connect( ( ) => {
-                switch (_this.state) {
-                    case "edit":
-                        _this.showProjectEdit();
-                        break;  
-                    case "files":
-                        // _this.showViewEditing();
-                        break; 
-                    case "projectedit":
-                        _this.hideProjectEdit();
-                        break;
-                        
-                        
-                          
-                    case "addprop":
-                        _this.hideAddProp();
-                        _this.showProjectEdit();
-                        break;
-                    case "addlistener":
-                        _this.hideAddListener();
-                        _this.showProjectEdit();
-                        break;
-                         
-                     case "object":
-                        _this.hideObject();
-                        _this.showProjectEdit();    
-                        break;
-                    default:
-                        break;
-                }
-                return  ;    
+                 this.windowstate.switchState(WindowState.State.PROJECT);
+               
             
             
             });