Changed how the application name is passed around

This commit is contained in:
Veronica K. B. Olsen
2020-07-31 16:41:46 +02:00
parent 02f85bd5d7
commit fc017cd8da
7 changed files with 46 additions and 49 deletions
+12 -14
View File
@@ -368,23 +368,21 @@ class NWProject():
if fileVersion == "1.0":
msgBox = QMessageBox()
msgRes = msgBox.question(self.theParent, "Old Project Version", (
"The project file and data is created by a %s version lower than 0.7. "
"Do you want to upgrade the project to the most recent format?<br><br>"
"Note that after the upgrade, you cannot open the project with an older "
"version of %s any more, so make sure you have a recent backup."
) % (
nw.__appname__, nw.__appname__
"The project file and data is created by a novelWriter version "
"lower than 0.7. Do you want to upgrade the project to the "
"most recent format?<br><br>Note that after the upgrade, you "
"cannot open the project with an older version of novelWriter "
"any more, so make sure you have a recent backup."
))
if msgRes != QMessageBox.Yes:
return False
elif fileVersion != "1.1" and fileVersion != "1.2":
self.makeAlert((
"Unknown or unsupported {nw:s} project file format. "
"The project cannot be opened by this version of {nw:s}. "
"The file was saved with {nw:s} version {vers:s}."
"Unknown or unsupported novelWriter project file format. "
"The project cannot be opened by this version of novelWriter. "
"The file was saved with novelWriter version {vers:s}."
).format(
nw = nw.__appname__,
vers = appVersion,
), nwAlert.ERROR)
return False
@@ -395,11 +393,11 @@ class NWProject():
if int(hexVersion, 16) > int(nw.__hexversion__, 16) and self.mainConf.showGUI:
msgBox = QMessageBox()
msgRes = msgBox.question(self.theParent, "Version Conflict", (
"This project was saved by a newer version of %s, version %s. This is version %s. "
"If you continue to open the project, some attributes and settings may not be "
"preserved. Continue opening the project?"
"This project was saved by a newer version of novelWriter, version %s. "
"This is version %s. If you continue to open the project, some attributes "
"and settings may not be preserved. Continue opening the project?"
) % (
nw.__appname__, appVersion, nw.__version__
appVersion, nw.__version__
))
if msgRes != QMessageBox.Yes:
return False