From 82dacc3dd1e6774235fcff27f7081cdff26f259f Mon Sep 17 00:00:00 2001 From: einarr Date: Thu, 6 Dec 2007 00:20:42 +0000 Subject: [PATCH] Added menu items to toggle visibility of workflow, navigator and infopane. --- fluents/fluents.glade | 40 ++++++++++++++++++++++++++++++++++++++-- fluents/fluents.py | 22 ++++++++++++++++++++++ 2 files changed, 60 insertions(+), 2 deletions(-) diff --git a/fluents/fluents.glade b/fluents/fluents.glade index e193026..2865c7c 100644 --- a/fluents/fluents.glade +++ b/fluents/fluents.glade @@ -109,10 +109,46 @@ + + + True + _Navigator + True + True + + + + + + + True + _Workflow + True + True + + + + + + + True + _Information + True + True + + + + + + + True + + + True - Large View + One plot True @@ -122,7 +158,7 @@ True - Small View + All plots True diff --git a/fluents/fluents.py b/fluents/fluents.py index a4b0a7e..4ab1a27 100644 --- a/fluents/fluents.py +++ b/fluents/fluents.py @@ -194,6 +194,10 @@ class FluentApp: 'on_right1_activate' : (self.on_right), 'on_up1_activate' : (self.on_up), 'on_down1_activate' : (self.on_down), + + 'on_navigator1_activate' : (self.on_show_navigator), + 'on_workflow1_activate' : (self.on_show_workflow), + 'on_information1_activate' : (self.on_show_infopane), } self.widget_tree.signal_autoconnect(signals) @@ -346,6 +350,24 @@ class FluentApp: def on_view_changed(self, widget, vf): self._update_toolbar(vf.get_view()) + def on_show_navigator(self, item): + if item.get_active(): + self['data_vbox'].show() + else: + self['data_vbox'].hide() + + def on_show_workflow(self, item): + if item.get_active(): + self['workflow_vbox'].show() + else: + self['workflow_vbox'].hide() + + def on_show_infopane(self, item): + if item.get_active(): + self['bottom_notebook'].show() + else: + self['bottom_notebook'].hide() + def on_left(self, item): self.main_view.move_focus_left()