112 |
return menu_bar |
return menu_bar |
113 |
|
|
114 |
def build_menu(self, menudesc): |
def build_menu(self, menudesc): |
115 |
"""Build and return a wxMenu from a menudescription""" |
"""Return a wxMenu built from the menu description menudesc""" |
116 |
wxmenu = wxMenu() |
wxmenu = wxMenu() |
117 |
last = None |
last = None |
118 |
for item in menudesc.items: |
for item in menudesc.items: |
|
# here the items must all be Menu instances themselves |
|
119 |
if item is None: |
if item is None: |
120 |
# a separator. Only add one if the last item was not a |
# a separator. Only add one if the last item was not a |
121 |
# separator |
# separator |
583 |
_method_command("save_session_as", "Save Session &As", "SaveSessionAs") |
_method_command("save_session_as", "Save Session &As", "SaveSessionAs") |
584 |
_method_command("show_session_tree", "Show Session &Tree", "ShowSessionTree", |
_method_command("show_session_tree", "Show Session &Tree", "ShowSessionTree", |
585 |
sensitive = _has_tree_window_shown) |
sensitive = _has_tree_window_shown) |
586 |
_method_command("exit", "&Exit", "Exit") |
_method_command("exit", "E&xit", "Exit") |
587 |
|
|
588 |
# Help menu |
# Help menu |
589 |
_method_command("help_about", "&About", "About") |
_method_command("help_about", "&About", "About") |