60 |
menuBar.Append(menu, "&File"); |
menuBar.Append(menu, "&File"); |
61 |
for name in ["new_session", "open_session", None, |
for name in ["new_session", "open_session", None, |
62 |
"save_session", "save_session_as", None, |
"save_session", "save_session_as", None, |
63 |
|
"show_session_tree", None, |
64 |
"exit"]: |
"exit"]: |
65 |
self.add_menu_command(menu, name) |
self.add_menu_command(menu, name) |
66 |
|
|
263 |
def OpenSession(self): |
def OpenSession(self): |
264 |
self.save_modified_session() |
self.save_modified_session() |
265 |
dlg = wxFileDialog(self, "Select a session file", ".", "", |
dlg = wxFileDialog(self, "Select a session file", ".", "", |
266 |
"*.session", wxOPEN) |
"*.thuban", wxOPEN) |
267 |
if dlg.ShowModal() == wxID_OK: |
if dlg.ShowModal() == wxID_OK: |
268 |
main.app.OpenSession(dlg.GetPath()) |
main.app.OpenSession(dlg.GetPath()) |
269 |
dlg.Destroy() |
dlg.Destroy() |
275 |
|
|
276 |
def SaveSessionAs(self): |
def SaveSessionAs(self): |
277 |
dlg = wxFileDialog(self, "Enter a filename for session", ".", "", |
dlg = wxFileDialog(self, "Enter a filename for session", ".", "", |
278 |
"*.session", wxOPEN) |
"*.thuban", wxOPEN) |
279 |
if dlg.ShowModal() == wxID_OK: |
if dlg.ShowModal() == wxID_OK: |
280 |
main.app.session.SetFilename(dlg.GetPath()) |
main.app.session.SetFilename(dlg.GetPath()) |
281 |
main.app.SaveSession() |
main.app.SaveSession() |
512 |
_method_command("open_session", "&Open Session", "OpenSession") |
_method_command("open_session", "&Open Session", "OpenSession") |
513 |
_method_command("save_session", "&Save Session", "SaveSession") |
_method_command("save_session", "&Save Session", "SaveSession") |
514 |
_method_command("save_session_as", "Save Session &As", "SaveSessionAs") |
_method_command("save_session_as", "Save Session &As", "SaveSessionAs") |
515 |
|
_method_command("show_session_tree", "Show Session &Tree", "ShowSessionTree") |
516 |
_method_command("exit", "&Exit", "Exit") |
_method_command("exit", "&Exit", "Exit") |
517 |
|
|
518 |
# Help menu |
# Help menu |