Skip to content

Commit

Permalink
Updated the display and flow of the export dialog.
Browse files Browse the repository at this point in the history
  • Loading branch information
tsengwoody committed Aug 22, 2024
1 parent fbc1bf2 commit a7d989d
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions addon/globalPlugins/Access8Math/editor.py
Original file line number Diff line number Diff line change
@@ -365,27 +365,20 @@ def OnExport(self, event):
return

self.ad.raw2a8m()
with wx.FileDialog(
# Translators: The title of the Editor's Export file window
self, message=_("Export Access8Math document..."),
defaultDir=self.dirname, wildcard="Access8Math document (*.a8m)|*.a8m"
) as entryDialog:
if entryDialog.ShowModal() == wx.ID_OK:
dst = entryDialog.GetPath()
shutil.make_archive(dst, 'zip', self.ad.a8m_folder)
os.rename(dst + ".zip", dst)

self.ad.raw2review()

with wx.FileDialog(
# Translators: The title of the Editor's Export file window
self, message=_("Export HTML document file..."),
defaultDir=os.path.dirname(dst),
wildcard="zip files (*.zip)|*.zip"
self,
message=_("Export Access8Math document..."),
defaultDir=self.dirname,
style=wx.FD_SAVE,
) as entryDialog:
if entryDialog.ShowModal() == wx.ID_OK:
dst = entryDialog.GetPath()
shutil.make_archive(dst, 'zip', self.ad.a8m_folder)
os.rename(dst + ".zip", dst + ".a8m")
shutil.make_archive(dst, 'zip', self.ad.review_folder)
os.rename(dst + ".zip", dst)

def OnFont(self, event):
data = wx.FontData()

0 comments on commit a7d989d

Please sign in to comment.