Commit c4d4f10a authored by VIGNET Pierre's avatar VIGNET Pierre

Add icons to menus, add shortcuts

parent 6bb62649
......@@ -17,23 +17,35 @@
<child>
<widget class="GtkMenuItem" id="menuitem2">
<property name="visible">True</property>
<property name="label" translatable="yes">Model</property>
<property name="label" translatable="yes">File</property>
<property name="use_underline">True</property>
<child>
<widget class="GtkMenu" id="menu2">
<property name="visible">True</property>
<child>
<widget class="GtkMenuItem" id="New_model">
<widget class="GtkImageMenuItem" id="New_model">
<property name="visible">True</property>
<property name="label" translatable="yes">New</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="stock">gtk-new</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkMenuItem" id="menuitem4">
<widget class="GtkImageMenuItem" id="menuitem4">
<property name="visible">True</property>
<property name="label" translatable="yes">Import</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="stock">gtk-open</property>
</widget>
</child>
<child>
<widget class="GtkMenu" id="Import">
<property name="visible">True</property>
......@@ -70,10 +82,16 @@
</widget>
</child>
<child>
<widget class="GtkMenuItem" id="menuitem5">
<widget class="GtkImageMenuItem" id="menuitem5">
<property name="visible">True</property>
<property name="label" translatable="yes">Export</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image3">
<property name="visible">True</property>
<property name="stock">gtk-save-as</property>
</widget>
</child>
<child>
<widget class="GtkMenu" id="Export">
<property name="visible">True</property>
......@@ -174,17 +192,29 @@
<widget class="GtkMenu" id="menu8">
<property name="visible">True</property>
<child>
<widget class="GtkMenuItem" id="doc_menu">
<widget class="GtkImageMenuItem" id="doc_menu">
<property name="visible">True</property>
<property name="label" translatable="yes">Documentation</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image6">
<property name="visible">True</property>
<property name="stock">gtk-help</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkMenuItem" id="legend_menu">
<widget class="GtkImageMenuItem" id="legend_menu">
<property name="visible">True</property>
<property name="label" translatable="yes">Legend</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image7">
<property name="visible">True</property>
<property name="stock">gtk-about</property>
</widget>
</child>
</widget>
</child>
</widget>
......
......@@ -118,6 +118,7 @@ class Charter(object):
# menu bar
menu_bar = self.wtree.get_widget("menubar1")
menu_bar.set_size_request(0, 25)
menu_bar.modify_bg(gtk.STATE_NORMAL, color)
menu_bar = self.wtree.get_widget("menubar2")
......@@ -126,6 +127,7 @@ class Charter(object):
menu_item.connect("activate", self.show_doc)
menu_item = self.wtree.get_widget("legend_menu")
menu_item.connect("activate", self.show_legend)
menu_item = self.wtree.get_widget("New_model")
self.add_accelerator(menu_item, "<Control>n")
menu_item.connect("activate", self.new_charts)
......@@ -168,8 +170,15 @@ class Charter(object):
button.connect("clicked", self.on_static)
button = self.wtree.get_widget("Check_button")
button.set_label(button.get_label() + " (F8)")
self.add_accelerator(button, "F8")
button.connect("clicked", self.check)
button = self.wtree.get_widget("Simu_button")
button.set_label(button.get_label() + " (F9)")
self.add_accelerator(button, "F9")
button.connect("clicked", self.on_simulate)
# graph drawing controler buttons (not connected)
self.graph_notebook = self.wtree.get_widget("graph_notebook")
self.graph_notebook.connect("switch-page",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment