Skip to content

Commit a7d989d

Browse files
committed
Updated the display and flow of the export dialog.
1 parent fbc1bf2 commit a7d989d

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

addon/globalPlugins/Access8Math/editor.py

+7-14
Original file line numberDiff line numberDiff line change
@@ -365,27 +365,20 @@ def OnExport(self, event):
365365
return
366366

367367
self.ad.raw2a8m()
368-
with wx.FileDialog(
369-
# Translators: The title of the Editor's Export file window
370-
self, message=_("Export Access8Math document..."),
371-
defaultDir=self.dirname, wildcard="Access8Math document (*.a8m)|*.a8m"
372-
) as entryDialog:
373-
if entryDialog.ShowModal() == wx.ID_OK:
374-
dst = entryDialog.GetPath()
375-
shutil.make_archive(dst, 'zip', self.ad.a8m_folder)
376-
os.rename(dst + ".zip", dst)
377-
378368
self.ad.raw2review()
369+
379370
with wx.FileDialog(
380371
# Translators: The title of the Editor's Export file window
381-
self, message=_("Export HTML document file..."),
382-
defaultDir=os.path.dirname(dst),
383-
wildcard="zip files (*.zip)|*.zip"
372+
self,
373+
message=_("Export Access8Math document..."),
374+
defaultDir=self.dirname,
375+
style=wx.FD_SAVE,
384376
) as entryDialog:
385377
if entryDialog.ShowModal() == wx.ID_OK:
386378
dst = entryDialog.GetPath()
379+
shutil.make_archive(dst, 'zip', self.ad.a8m_folder)
380+
os.rename(dst + ".zip", dst + ".a8m")
387381
shutil.make_archive(dst, 'zip', self.ad.review_folder)
388-
os.rename(dst + ".zip", dst)
389382

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

0 commit comments

Comments
 (0)