Added menu items to toggle visibility of workflow, navigator and infopane.

This commit is contained in:
Einar Ryeng 2007-12-06 00:20:42 +00:00
parent 27d935319c
commit 82dacc3dd1
2 changed files with 60 additions and 2 deletions

View File

@ -109,10 +109,46 @@
<child>
<widget class="GtkMenu" id="view1_menu">
<child>
<widget class="GtkCheckMenuItem" id="navigator1">
<property name="visible">True</property>
<property name="label" translatable="yes">_Navigator</property>
<property name="use_underline">True</property>
<property name="active">True</property>
<signal name="activate" handler="on_navigator1_activate" last_modification_time="Thu, 06 Dec 2007 00:03:35 GMT"/>
</widget>
</child>
<child>
<widget class="GtkCheckMenuItem" id="workflow1">
<property name="visible">True</property>
<property name="label" translatable="yes">_Workflow</property>
<property name="use_underline">True</property>
<property name="active">True</property>
<signal name="activate" handler="on_workflow1_activate" last_modification_time="Thu, 06 Dec 2007 00:03:35 GMT"/>
</widget>
</child>
<child>
<widget class="GtkCheckMenuItem" id="information1">
<property name="visible">True</property>
<property name="label" translatable="yes">_Information</property>
<property name="use_underline">True</property>
<property name="active">True</property>
<signal name="activate" handler="on_information1_activate" last_modification_time="Thu, 06 Dec 2007 00:03:35 GMT"/>
</widget>
</child>
<child>
<widget class="GtkSeparatorMenuItem" id="separator5">
<property name="visible">True</property>
</widget>
</child>
<child>
<widget class="GtkMenuItem" id="large_view1">
<property name="visible">True</property>
<property name="label" translatable="yes">Large View</property>
<property name="label" translatable="yes">One plot</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_large_view1_activate" last_modification_time="Fri, 26 May 2006 12:15:59 GMT"/>
<accelerator key="plus" modifiers="GDK_CONTROL_MASK" signal="activate"/>
@ -122,7 +158,7 @@
<child>
<widget class="GtkMenuItem" id="small_view1">
<property name="visible">True</property>
<property name="label" translatable="yes">Small View</property>
<property name="label" translatable="yes">All plots</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_small_view1_activate" last_modification_time="Fri, 26 May 2006 12:15:59 GMT"/>
<accelerator key="minus" modifiers="GDK_CONTROL_MASK" signal="activate"/>

View File

@ -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()