Remove translations of standard buttons and switch to native file dialogs

This commit is contained in:
Veronica K. B. Olsen
2021-02-19 16:38:56 +01:00
parent f74d575d6a
commit d315f37c88
14 changed files with 8 additions and 62 deletions
+1 -4
View File
@@ -259,7 +259,6 @@ class GuiWritingStats(QDialog):
self.buttonBox.rejected.connect(self._doClose)
self.btnClose = self.buttonBox.addButton(QDialogButtonBox.Close)
self.buttonBox.button(QDialogButtonBox.Close).setText(self.tr("Close"))
self.btnClose.setAutoDefault(False)
self.btnSave = self.buttonBox.addButton(self.tr("Save As"), QDialogButtonBox.ActionRole)
@@ -369,10 +368,8 @@ class GuiWritingStats(QDialog):
fileName = "sessionStats.%s" % fileExt
savePath = os.path.join(saveDir, fileName)
dlgOpt = QFileDialog.Options()
dlgOpt |= QFileDialog.DontUseNativeDialog
savePath, _ = QFileDialog.getSaveFileName(
self, self.tr("Save Data As"), savePath, options=dlgOpt
self, self.tr("Save Data As"), savePath
)
if not savePath:
return False