From 71f759107dcc76cf0d53aec2afd01d22f1c62f76 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Sat, 28 Feb 2015 22:42:16 +0800 Subject: [PATCH] src/Builder4/WindowState.vala --- src/Builder4/WindowState.vala | 138 +++++++++++++++++----------------- 1 file changed, 69 insertions(+), 69 deletions(-) diff --git a/src/Builder4/WindowState.vala b/src/Builder4/WindowState.vala index 61cb636b8..d9012261c 100644 --- a/src/Builder4/WindowState.vala +++ b/src/Builder4/WindowState.vala @@ -674,75 +674,6 @@ public class WindowState : Object } - // -- buttons show hide..... - - public void buttonsShowHide() - { - // basically hide everything, then show the relivant.. - - this.win.backbutton.el.hide(); - - this.win.projectbutton.el.hide(); // show file nav... - this.win.editfilebutton.el.hide(); - this.win.projecteditbutton.el.hide(); - - - this.win.objectshowbutton.el.hide(); // add objects - this.win.addpropbutton.el.hide(); - this.win.addlistenerbutton.el.hide(); - - - - this.win.addprojectbutton.el.hide(); - this.win.addfilebutton.el.hide(); - this.win.delprojectbutton.el.hide(); - this.win.new_window.el.hide(); - - - switch (this.state) { - - case State.PREVIEW: // this is the default state when working... - - this.win.projectbutton.el.show(); // show file nav... - this.win.editfilebutton.el.show(); - this.win.projecteditbutton.el.show(); - - - this.win.objectshowbutton.el.show(); // add objects - this.win.addpropbutton.el.show(); - this.win.addlistenerbutton.el.show(); - break; - - - case State.CODE: - case State.PROP: - case State.LISTENER: - case State.OBJECT: - - this.win.backbutton.el.show(); - this.win.objectshowbutton.el.show(); // add objects - this.win.addpropbutton.el.show(); - this.win.addlistenerbutton.el.show(); - break; - - case State.PROJECT: - // anything else? - this.win.backbutton.el.show(); - break; - - - case State.FILES: - this.win.backbutton.el.show(); - - this.win.addprojectbutton.el.show(); - this.win.addfilebutton.el.show(); - this.win.delprojectbutton.el.show(); - this.win.new_window.el.show(); - break; - } - - } - public int redraw_count = 0; public void resizeCanvas() // called by window resize .. delays redraw { @@ -843,6 +774,75 @@ public class WindowState : Object } } + // -- buttons show hide..... + + public void buttonsShowHide() + { + // basically hide everything, then show the relivant.. + + this.win.backbutton.el.hide(); + + this.win.projectbutton.el.hide(); // show file nav... + this.win.editfilebutton.el.hide(); + this.win.projecteditbutton.el.hide(); + + + this.win.objectshowbutton.el.hide(); // add objects + this.win.addpropbutton.el.hide(); + this.win.addlistenerbutton.el.hide(); + + + + this.win.addprojectbutton.el.hide(); + this.win.addfilebutton.el.hide(); + this.win.delprojectbutton.el.hide(); + this.win.new_window.el.hide(); + + + switch (this.state) { + + case State.PREVIEW: // this is the default state when working... + + this.win.projectbutton.el.show(); // show file nav... + this.win.editfilebutton.el.show(); + this.win.projecteditbutton.el.show(); + + + this.win.objectshowbutton.el.show(); // add objects + this.win.addpropbutton.el.show(); + this.win.addlistenerbutton.el.show(); + break; + + + case State.CODE: + case State.PROP: + case State.LISTENER: + case State.OBJECT: + + this.win.backbutton.el.show(); + this.win.objectshowbutton.el.show(); // add objects + this.win.addpropbutton.el.show(); + this.win.addlistenerbutton.el.show(); + break; + + case State.PROJECT: + // anything else? + this.win.backbutton.el.show(); + break; + + + case State.FILES: + this.win.backbutton.el.show(); + + this.win.addprojectbutton.el.show(); + this.win.addfilebutton.el.show(); + this.win.delprojectbutton.el.show(); + this.win.new_window.el.show(); + break; + } + + } + } -- 2.39.2