MCPcopy Index your code
hub / github.com/pyfa-org/Pyfa / fileImportDialog

Method fileImportDialog

gui/mainFrame.py:835–856  ·  view source on GitHub ↗

Handles importing single/multiple EVE XML / EFT cfg fit files

(self, event)

Source from the content-addressed store, hash-verified

833 sCharacter.backupSkills(filePath, saveFmt, self.getActiveFit(), self.closeWaitDialog)
834
835 def fileImportDialog(self, event):
836 """Handles importing single/multiple EVE XML / EFT cfg fit files"""
837 with wx.FileDialog(
838 self,
839 _t("Open One Or More Fitting Files"),
840 wildcard=("|".join([
841 _t("EVE XML fitting files") + " (*.xml)|*.xml",
842 _t("EFT text fitting files") + " (*.cfg)|*.cfg",
843 _t("All Files") + "|*"
844 ])),
845 style=wx.FD_OPEN | wx.FD_FILE_MUST_EXIST | wx.FD_MULTIPLE
846 ) as dlg:
847 if dlg.ShowModal() == wx.ID_OK:
848 # set some arbitrary spacing to create width in window
849 progress = ProgressHelper(message=" " * 100, callback=self._openAfterImport)
850 call = (Port.importFitsThreaded, [dlg.GetPaths(), progress], {})
851 self.handleProgress(
852 title=_t("Importing fits"),
853 style=wx.PD_CAN_ABORT | wx.PD_SMOOTH | wx.PD_APP_MODAL | wx.PD_AUTO_HIDE,
854 call=call,
855 progress=progress,
856 errMsgLbl=_t("Import Error"))
857
858 def backupToXml(self, event):
859 """ Back up all fits to EVE XML file """

Callers

nothing calls this directly

Calls 3

handleProgressMethod · 0.95
ProgressHelperClass · 0.90
_tFunction · 0.50

Tested by

no test coverage detected