Drop using formatting a few places where it isn't necessary
This commit is contained in:
+6
-7
@@ -55,14 +55,14 @@ class GuiAbout(QDialog):
|
|||||||
self.innerBox = QHBoxLayout()
|
self.innerBox = QHBoxLayout()
|
||||||
self.innerBox.setSpacing(self.mainConf.pxInt(16))
|
self.innerBox.setSpacing(self.mainConf.pxInt(16))
|
||||||
|
|
||||||
self.setWindowTitle("About %s" % self.mainConf.appName)
|
self.setWindowTitle("About novelWriter")
|
||||||
self.setMinimumWidth(self.mainConf.pxInt(650))
|
self.setMinimumWidth(self.mainConf.pxInt(650))
|
||||||
self.setMinimumHeight(self.mainConf.pxInt(600))
|
self.setMinimumHeight(self.mainConf.pxInt(600))
|
||||||
|
|
||||||
nPx = self.mainConf.pxInt(96)
|
nPx = self.mainConf.pxInt(96)
|
||||||
self.nwIcon = QLabel()
|
self.nwIcon = QLabel()
|
||||||
self.nwIcon.setPixmap(self.theParent.theTheme.getPixmap("novelwriter", (nPx, nPx)))
|
self.nwIcon.setPixmap(self.theParent.theTheme.getPixmap("novelwriter", (nPx, nPx)))
|
||||||
self.lblName = QLabel("<b>%s</b>" % self.mainConf.appName)
|
self.lblName = QLabel("<b>novelWriter</b>")
|
||||||
self.lblVers = QLabel("v%s" % nw.__version__)
|
self.lblVers = QLabel("v%s" % nw.__version__)
|
||||||
self.lblDate = QLabel(datetime.strptime(nw.__date__, "%Y-%m-%d").strftime("%x"))
|
self.lblDate = QLabel(datetime.strptime(nw.__date__, "%Y-%m-%d").strftime("%x"))
|
||||||
|
|
||||||
@@ -115,17 +115,17 @@ class GuiAbout(QDialog):
|
|||||||
"""
|
"""
|
||||||
listPrefix = " • "
|
listPrefix = " • "
|
||||||
aboutMsg = (
|
aboutMsg = (
|
||||||
"<h2>About {name:s}</h2>"
|
"<h2>About novelWriter</h2>"
|
||||||
"<p>{copyright:s}.</p>"
|
"<p>{copyright:s}.</p>"
|
||||||
"<p>Website: <a href='{website:s}'>{domain:s}</a></p>"
|
"<p>Website: <a href='{website:s}'>{domain:s}</a></p>"
|
||||||
"<p>{name:s} is a markdown-like text editor designed for "
|
"<p>novelWriter is a markdown-like text editor designed for "
|
||||||
"organising and writing novels. It is written in Python 3 with a "
|
"organising and writing novels. It is written in Python 3 with a "
|
||||||
"Qt5 GUI, using PyQt5.</p>"
|
"Qt5 GUI, using PyQt5.</p>"
|
||||||
"<p>{name:s} is free software: you can redistribute it and/or "
|
"<p>novelWriter is free software: you can redistribute it and/or "
|
||||||
"modify it under the terms of the GNU General Public License as "
|
"modify it under the terms of the GNU General Public License as "
|
||||||
"published by the Free Software Foundation, either version 3 of "
|
"published by the Free Software Foundation, either version 3 of "
|
||||||
"the License, or (at your option) any later version.</p>"
|
"the License, or (at your option) any later version.</p>"
|
||||||
"<p>{name:s} is distributed in the hope that it will be useful, "
|
"<p>novelWriter is distributed in the hope that it will be useful, "
|
||||||
"but WITHOUT ANY WARRANTY; without even the implied warranty of "
|
"but WITHOUT ANY WARRANTY; without even the implied warranty of "
|
||||||
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</p>"
|
"MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</p>"
|
||||||
"<p>See the License tab for the full text, or visit the GNU website "
|
"<p>See the License tab for the full text, or visit the GNU website "
|
||||||
@@ -134,7 +134,6 @@ class GuiAbout(QDialog):
|
|||||||
"<h3>Credits</h3>"
|
"<h3>Credits</h3>"
|
||||||
"<p>{credits:s}</p>"
|
"<p>{credits:s}</p>"
|
||||||
).format(
|
).format(
|
||||||
name = self.mainConf.appName,
|
|
||||||
copyright = nw.__copyright__,
|
copyright = nw.__copyright__,
|
||||||
website = nw.__url__,
|
website = nw.__url__,
|
||||||
domain = nw.__domain__,
|
domain = nw.__domain__,
|
||||||
|
|||||||
+4
-4
@@ -391,11 +391,11 @@ class GuiBuildNovel(QDialog):
|
|||||||
self.savePDF.triggered.connect(lambda: self._saveDocument(self.FMT_PDF))
|
self.savePDF.triggered.connect(lambda: self._saveDocument(self.FMT_PDF))
|
||||||
self.saveMenu.addAction(self.savePDF)
|
self.saveMenu.addAction(self.savePDF)
|
||||||
|
|
||||||
self.saveHTM = QAction("%s HTML (.htm)" % self.mainConf.appName, self)
|
self.saveHTM = QAction("novelWriter HTML (.htm)", self)
|
||||||
self.saveHTM.triggered.connect(lambda: self._saveDocument(self.FMT_HTM))
|
self.saveHTM.triggered.connect(lambda: self._saveDocument(self.FMT_HTM))
|
||||||
self.saveMenu.addAction(self.saveHTM)
|
self.saveMenu.addAction(self.saveHTM)
|
||||||
|
|
||||||
self.saveNWD = QAction("%s Markdown (.nwd)" % self.mainConf.appName, self)
|
self.saveNWD = QAction("novelWriter Markdown (.nwd)", self)
|
||||||
self.saveNWD.triggered.connect(lambda: self._saveDocument(self.FMT_NWD))
|
self.saveNWD.triggered.connect(lambda: self._saveDocument(self.FMT_NWD))
|
||||||
self.saveMenu.addAction(self.saveNWD)
|
self.saveMenu.addAction(self.saveNWD)
|
||||||
|
|
||||||
@@ -408,11 +408,11 @@ class GuiBuildNovel(QDialog):
|
|||||||
self.saveTXT.triggered.connect(lambda: self._saveDocument(self.FMT_TXT))
|
self.saveTXT.triggered.connect(lambda: self._saveDocument(self.FMT_TXT))
|
||||||
self.saveMenu.addAction(self.saveTXT)
|
self.saveMenu.addAction(self.saveTXT)
|
||||||
|
|
||||||
self.saveJsonH = QAction("JSON + %s HTML (.json)" % self.mainConf.appName, self)
|
self.saveJsonH = QAction("JSON + novelWriter HTML (.json)", self)
|
||||||
self.saveJsonH.triggered.connect(lambda: self._saveDocument(self.FMT_JSON_H))
|
self.saveJsonH.triggered.connect(lambda: self._saveDocument(self.FMT_JSON_H))
|
||||||
self.saveMenu.addAction(self.saveJsonH)
|
self.saveMenu.addAction(self.saveJsonH)
|
||||||
|
|
||||||
self.saveJsonM = QAction("JSON + %s Markdown (.json)" % self.mainConf.appName, self)
|
self.saveJsonM = QAction("JSON + novelWriters Markdown (.json)", self)
|
||||||
self.saveJsonM.triggered.connect(lambda: self._saveDocument(self.FMT_JSON_M))
|
self.saveJsonM.triggered.connect(lambda: self._saveDocument(self.FMT_JSON_M))
|
||||||
self.saveMenu.addAction(self.saveJsonM)
|
self.saveMenu.addAction(self.saveJsonM)
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -274,7 +274,7 @@ class GuiMainMenu(QMenuBar):
|
|||||||
|
|
||||||
# Project > Exit
|
# Project > Exit
|
||||||
self.aExitNW = QAction("Exit", self)
|
self.aExitNW = QAction("Exit", self)
|
||||||
self.aExitNW.setStatusTip("Exit %s" % self.mainConf.appName)
|
self.aExitNW.setStatusTip("Exit novelWriter")
|
||||||
self.aExitNW.setShortcut("Ctrl+Q")
|
self.aExitNW.setShortcut("Ctrl+Q")
|
||||||
self.aExitNW.setMenuRole(QAction.QuitRole)
|
self.aExitNW.setMenuRole(QAction.QuitRole)
|
||||||
self.aExitNW.triggered.connect(lambda: self.theParent.closeMain())
|
self.aExitNW.triggered.connect(lambda: self.theParent.closeMain())
|
||||||
@@ -857,8 +857,8 @@ class GuiMainMenu(QMenuBar):
|
|||||||
self.helpMenu = self.addMenu("&Help")
|
self.helpMenu = self.addMenu("&Help")
|
||||||
|
|
||||||
# Help > About
|
# Help > About
|
||||||
self.aAboutNW = QAction("About %s" % self.mainConf.appName, self)
|
self.aAboutNW = QAction("About novelWriter", self)
|
||||||
self.aAboutNW.setStatusTip("About %s" % self.mainConf.appName)
|
self.aAboutNW.setStatusTip("About novelWriter")
|
||||||
self.aAboutNW.setMenuRole(QAction.AboutRole)
|
self.aAboutNW.setMenuRole(QAction.AboutRole)
|
||||||
self.aAboutNW.triggered.connect(lambda: self.theParent.showAboutNWDialog())
|
self.aAboutNW.triggered.connect(lambda: self.theParent.showAboutNWDialog())
|
||||||
self.helpMenu.addAction(self.aAboutNW)
|
self.helpMenu.addAction(self.aAboutNW)
|
||||||
|
|||||||
@@ -383,11 +383,15 @@ class GuiWritingStats(QDialog):
|
|||||||
# Report to user
|
# Report to user
|
||||||
if wSuccess:
|
if wSuccess:
|
||||||
self.theParent.makeAlert(
|
self.theParent.makeAlert(
|
||||||
f"{textFmt} file successfully written to:<br>{savePath}", nwAlert.INFO
|
"%s file successfully written to:<br>%s" % (
|
||||||
|
textFmt, savePath
|
||||||
|
), nwAlert.INFO
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
self.theParent.makeAlert(
|
self.theParent.makeAlert(
|
||||||
f"Failed to write {textFmt} file.<br>{errMsg}", nwAlert.ERROR
|
"Failed to write %s file.<br>%s" % (
|
||||||
|
textFmt, errMsg
|
||||||
|
), nwAlert.ERROR
|
||||||
)
|
)
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|||||||
Reference in New Issue
Block a user