Remove translations of standard buttons and switch to native file dialogs
This commit is contained in:
+1
-22
@@ -550,11 +550,6 @@ class GuiMain(QMainWindow):
|
||||
logger.error("No project open")
|
||||
return False
|
||||
|
||||
# If the project is new, it may not have a path, so we need one
|
||||
if self.theProject.projPath is None:
|
||||
projPath = self.selectProjectPath()
|
||||
self.theProject.setProjectPath(projPath)
|
||||
|
||||
if self.theProject.projPath is None:
|
||||
return False
|
||||
|
||||
@@ -707,11 +702,8 @@ class GuiMain(QMainWindow):
|
||||
self.tr("novelWriter files ({0})").format("*.nwd"),
|
||||
self.tr("All files ({0})").format("*.*"),
|
||||
]
|
||||
dlgOpt = QFileDialog.Options()
|
||||
dlgOpt |= QFileDialog.DontUseNativeDialog
|
||||
loadFile, _ = QFileDialog.getOpenFileName(
|
||||
self, self.tr("Import File"), lastPath,
|
||||
options=dlgOpt, filter=";;".join(extFilter)
|
||||
self, self.tr("Import File"), lastPath, filter=";;".join(extFilter)
|
||||
)
|
||||
if not loadFile:
|
||||
return False
|
||||
@@ -931,19 +923,6 @@ class GuiMain(QMainWindow):
|
||||
# Main Dialogs
|
||||
##
|
||||
|
||||
def selectProjectPath(self):
|
||||
"""Select where to save project.
|
||||
"""
|
||||
dlgOpt = QFileDialog.Options()
|
||||
dlgOpt |= QFileDialog.ShowDirsOnly
|
||||
dlgOpt |= QFileDialog.DontUseNativeDialog
|
||||
projPath = QFileDialog.getExistingDirectory(
|
||||
self, self.tr("Save novelWriter Project"), "", options=dlgOpt
|
||||
)
|
||||
if projPath:
|
||||
return projPath
|
||||
return None
|
||||
|
||||
def showProjectLoadDialog(self):
|
||||
"""Opens the projects dialog for selecting either existing
|
||||
projects from a cache of recently opened projects, or provide a
|
||||
|
||||
Reference in New Issue
Block a user