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
+2 -7
View File
@@ -70,8 +70,6 @@ class GuiPreferences(PagedDialog):
self.addTab(self.tabAuto, self.tr("Automation"))
self.buttonBox = QDialogButtonBox(QDialogButtonBox.Ok | QDialogButtonBox.Cancel)
self.buttonBox.button(QDialogButtonBox.Ok).setText(self.tr("OK"))
self.buttonBox.button(QDialogButtonBox.Cancel).setText(self.tr("Cancel"))
self.buttonBox.accepted.connect(self._doSave)
self.buttonBox.rejected.connect(self._doClose)
self.addControls(self.buttonBox)
@@ -440,11 +438,8 @@ class GuiPreferencesProjects(QWidget):
if not os.path.isdir(currDir):
currDir = ""
dlgOpt = QFileDialog.Options()
dlgOpt |= QFileDialog.ShowDirsOnly
dlgOpt |= QFileDialog.DontUseNativeDialog
newDir = QFileDialog.getExistingDirectory(
self, self.tr("Backup Directory"), currDir, options=dlgOpt
newDir = QFileDialog.getExistingDirectory(
self, self.tr("Backup Directory"), currDir, options=QFileDialog.ShowDirsOnly
)
if newDir:
self.backupPath = newDir