Builder4/MainWindow.bjs
authorAlan Knowles <alan@akbkhome.com>
Thu, 10 Jul 2014 15:06:34 +0000 (23:06 +0800)
committerAlan Knowles <alan@akbkhome.com>
Thu, 10 Jul 2014 15:06:34 +0000 (23:06 +0800)
Builder4/MainWindow.js
Builder4/MainWindow.vala

Builder4/MainWindow.bjs
Builder4/MainWindow.js
Builder4/MainWindow.vala

index b9924b4..a597578 100644 (file)
@@ -28,7 +28,7 @@
             "xtype": "Window",
             "|init": " this.state = \"files\";\n\t  \n    //this.el.show_all();\n    \n    ",
             "|type": "Gtk.WindowType.TOPLEVEL",
-            "|void:hideProjectEdit": " () {\n    // return to editing state..\n       \n     \n     \n    //this.rooview.el.hide();\n     //this.edit_project.el.show();\n        _this.projecteditview.el.save_easing_state();\n    var el = _this.rooview.el;\n    el.save_easing_state();\n\n    \n    el.set_scale(1.0f,1.0f);\n       _this.projecteditview.el.set_scale(1.0f,0.0f);\n    _this.state = \"edit\";\n\n \n    //_this.clutterfiles.loadProject(_this.project);\n\n    el.restore_easing_state();\n      _this.projecteditview.el.restore_easing_state();  \n  \n}\n",
+            "|void:hideProjectEdit": " () {\n    // return to editing state..\n       \n      _this.projectbutton.el.show();\n     _this.projecteditbutton.el.show();\n     \n     \n    //this.rooview.el.hide();\n     //this.edit_project.el.show();\n        _this.projecteditview.el.save_easing_state();\n    var el = _this.rooview.el;\n    el.save_easing_state();\n\n    \n    el.set_scale(1.0f,1.0f);\n       _this.projecteditview.el.set_scale(1.0f,0.0f);\n    _this.state = \"edit\";\n\n \n    //_this.clutterfiles.loadProject(_this.project);\n\n    el.restore_easing_state();\n      _this.projecteditview.el.restore_easing_state();  \n  \n}\n",
             "|void:hideViewEditing": "  ( )   {\n    \n     this.window_rooview.createThumb();\n     \n     this.editpane.el.hide();\n    //this.rooview.el.hide();\n     this.left_projects.el.show();\n    \n    var el = _this.rooview.el;\n    el.save_easing_state();\n      el.set_easing_duration(1000);\n    // show project / file view..\n    //_this.mainpane.lastWidth = _this.leftpane.el.get_position();\n    //_this.mainpane.el.set_position(0);\n    // rotate y 180..\n    el.set_rotation_angle(Clutter.RotateAxis.Y_AXIS, 360.0f);\n    el.set_scale(0.0f,0.0f);\n   \n        _this.state = \"files\";\n\n    _this.left_projects.selectProject(_this.project);\n    //_this.clutterfiles.loadProject(_this.project);\n\n    el.restore_easing_state();\n        \n    print(\"show view browsing\");\n}",
             "|void:initChildren": " () {\n    // this needs putting in a better place..\n    \n    print(\"init children\");\n    this.left_tree =new Xcls_WindowLeftTree();\n    this.left_tree.ref();\n    this.tree.el.pack_start(this.left_tree.el,true, true,0);\n\n\n    this.left_props =new Xcls_LeftProps();\n    this.left_props.ref();\n    this.props.el.pack_start(this.left_props.el,true, true,0);\n\n\n    // left projects..\n     this.left_projects = new Xcls_WindowLeftProjects();\n     this.left_projects.ref();\n    this.leftpane.el.pack_start(this.left_projects.el,true, true,0);\n   \n    this.left_projects.project_selected.connect((proj) => {\n        proj.scanDirs();\n        _this.clutterfiles.loadProject(proj);\n    \n    });\n    \n   \n    // project edit..\n    this.projectsettings  =new Xcls_ProjectSettings();\n    this.projectsettings.ref();  /// really?\n    ((Gtk.Container)(this.projecteditview.el.get_widget())).add(this.projectsettings.el);\n    //this.projectsettings.el.show_all();\n\n    var stage = _this.projecteditview.el.get_stage();\n    stage.set_background_color(  Clutter.Color.from_string(\"#000\"));\n    \n     this.projectsettings.buttonPressed.connect((btn) => {\n        if (btn == \"save\") {\n             _this.window_rooview.view.renderJS(true);\n        }\n        if (btn == \"apply\") {\n            _this.window_rooview.view.renderJS(true);\n            return;\n        }\n        this.hideProjectEdit();\n         \n     });\n    \n    \n    \n    \n    \n    //  roo view\n    \n     this.window_rooview  =new Xcls_WindowRooView();\n    this.window_rooview.ref();\n    ((Gtk.Container)(this.rooview.el.get_widget())).add(this.window_rooview.el);\n    this.window_rooview.el.show_all();\n\n    stage = _this.rooview.el.get_stage();\n    stage.set_background_color(  Clutter.Color.from_string(\"#000\"));\n    \n   \n    \n    // clutter files\n    \n    \n    this.clutterfiles = new Xcls_ClutterFiles();\n    this.clutterfiles.ref();\n    stage.add_child(this.clutterfiles.el);\n    this.clutterfiles.el.show_all();\n\n\n    this.clutterfiles.open.connect((file) => { \n        _this.project = file.project;\n        _this.showViewEditing();\n        this.left_tree.model.loadFile(file);\n        \n        this.window_rooview.loadFile(file);\n        print(\"OPEN : \" + file.name);\n\n    });\n\n\n\n\n\n\n    //w.el.show_all();\n    var tl = new Clutter.Timeline(6000);\n    tl.set_repeat_count(-1);\n    tl.start();\n    tl.ref();\n\n    this.children_loaded = true;\n\n\n\n\n}\n",
             "|void:setTitle": " (string str) {\n    this.el.set_title(this.title + \" - \" + str);\n}\n",
index b0027e2..cf2d50e 100644 (file)
@@ -33,6 +33,8 @@ MainWindow=new XObject({
     'void:hideProjectEdit' : () {
         // return to editing state..
            
+          _this.projectbutton.el.show();
+         _this.projecteditbutton.el.show();
          
          
         //this.rooview.el.hide();
index 227c70c..7b3fde6 100644 (file)
@@ -95,6 +95,8 @@ public class Xcls_MainWindow : Object
     public void hideProjectEdit () {
             // return to editing state..
                
+              _this.projectbutton.el.show();
+             _this.projecteditbutton.el.show();
              
              
             //this.rooview.el.hide();