Wire up import & export menu events

This commit is contained in:
cncfanatics
2010-10-12 22:39:23 +02:00
parent 0486aec0fa
commit bbc020c9bf
2 changed files with 114 additions and 0 deletions

View File

@@ -30,6 +30,7 @@ from wx.lib.wordwrap import wordwrap
from gui.characterEditor import CharacterEditor
from gui.characterSelection import CharacterSelection
from gui.patternEditor import DmgPatternEditorDlg
from gui.importExport import ImportDialog, ExportDialog
import aboutData
import gui.fittingView as fv
from wx._core import PyDeadObjectError
@@ -138,6 +139,16 @@ class MainFrame(wx.Frame):
dlg.ShowModal()
dlg.Destroy()
def showImportDialog(self, event):
dlg=ImportDialog(self)
dlg.ShowModal()
dlg.Destroy()
def showExportDialog(self, event):
dlg=ExportDialog(self)
dlg.ShowModal()
dlg.Destroy()
def registerMenu(self):
# Quit
self.Bind(wx.EVT_MENU, self.ExitApp, id=wx.ID_EXIT)
@@ -149,6 +160,10 @@ class MainFrame(wx.Frame):
self.Bind(wx.EVT_MENU, self.showCharacterEditor, id=self.GetMenuBar().characterEditorId)
# Damage pattern editor
self.Bind(wx.EVT_MENU, self.showDamagePatternEditor, id=self.GetMenuBar().damagePatternEditorId)
# Import dialog
self.Bind(wx.EVT_MENU, self.showImportDialog, id=wx.ID_OPEN)
# Export dialog
self.Bind(wx.EVT_MENU, self.showExportDialog, id=wx.ID_SAVEAS)
def toggleShipBrowser(self, event):
self.GetToolBar().toggleShipBrowser(event)