Some reformatting of error messages, mostly regarding line breaks.
This commit is contained in:
+2
-2
@@ -113,7 +113,7 @@ class NWProject():
|
|||||||
CUSTOM, and always have parent handle set to None.
|
CUSTOM, and always have parent handle set to None.
|
||||||
"""
|
"""
|
||||||
if not self.projTree.checkRootUnique(rootClass):
|
if not self.projTree.checkRootUnique(rootClass):
|
||||||
self.makeAlert("Duplicate root item detected!", nwAlert.ERROR)
|
self.makeAlert("Duplicate root item detected.", nwAlert.ERROR)
|
||||||
return None
|
return None
|
||||||
newItem = NWItem(self)
|
newItem = NWItem(self)
|
||||||
newItem.setName(rootName)
|
newItem.setName(rootName)
|
||||||
@@ -995,7 +995,7 @@ class NWProject():
|
|||||||
# Report status
|
# Report status
|
||||||
if len(orphanFiles) > 0:
|
if len(orphanFiles) > 0:
|
||||||
self.makeAlert(
|
self.makeAlert(
|
||||||
"Found %d orphaned file(s) in project folder!" % len(orphanFiles),
|
"Found %d orphaned file(s) in project folder." % len(orphanFiles),
|
||||||
nwAlert.WARN
|
nwAlert.WARN
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -362,7 +362,9 @@ class GuiProjectEditStatus(QWidget):
|
|||||||
self.listBox.takeItem(iRow)
|
self.listBox.takeItem(iRow)
|
||||||
self.colChanged = True
|
self.colChanged = True
|
||||||
else:
|
else:
|
||||||
self.theParent.makeAlert("Cannot delete status item that is in use.",nwAlert.ERROR)
|
self.theParent.makeAlert(
|
||||||
|
"Cannot delete status item that is in use.", nwAlert.ERROR
|
||||||
|
)
|
||||||
return
|
return
|
||||||
|
|
||||||
def _saveItem(self):
|
def _saveItem(self):
|
||||||
|
|||||||
@@ -396,7 +396,7 @@ class GuiDocTree(QTreeWidget):
|
|||||||
trItemP.takeChild(tIndex)
|
trItemP.takeChild(tIndex)
|
||||||
del self.theProject.projTree[tHandle]
|
del self.theProject.projTree[tHandle]
|
||||||
else:
|
else:
|
||||||
self.makeAlert(["Cannot delete folder.","It is not empty."], nwAlert.ERROR)
|
self.makeAlert("Cannot delete folder. It is not empty.", nwAlert.ERROR)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
elif nwItemS.itemType == nwItemType.ROOT:
|
elif nwItemS.itemType == nwItemType.ROOT:
|
||||||
@@ -407,7 +407,7 @@ class GuiDocTree(QTreeWidget):
|
|||||||
self.theParent.mainMenu.setAvailableRoot()
|
self.theParent.mainMenu.setAvailableRoot()
|
||||||
self.theProject.setProjectChanged(True)
|
self.theProject.setProjectChanged(True)
|
||||||
else:
|
else:
|
||||||
self.makeAlert(["Cannot delete root folder.","It is not empty."], nwAlert.ERROR)
|
self.makeAlert("Cannot delete root folder. It is not empty.", nwAlert.ERROR)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|||||||
+3
-1
@@ -249,7 +249,9 @@ class GuiIcons:
|
|||||||
try:
|
try:
|
||||||
confParser.read_file(open(themeConf, mode="r", encoding="utf8"))
|
confParser.read_file(open(themeConf, mode="r", encoding="utf8"))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.theParent.makeAlert(["Could not load theme config file.",str(e)],nwAlert.ERROR)
|
self.theParent.makeAlert(
|
||||||
|
["Could not load theme config file.",str(e)], nwAlert.ERROR
|
||||||
|
)
|
||||||
continue
|
continue
|
||||||
themeName = ""
|
themeName = ""
|
||||||
if confParser.has_section("Main"):
|
if confParser.has_section("Main"):
|
||||||
|
|||||||
+6
-2
@@ -284,7 +284,9 @@ class GuiTheme:
|
|||||||
try:
|
try:
|
||||||
confParser.read_file(open(themeConf, mode="r", encoding="utf8"))
|
confParser.read_file(open(themeConf, mode="r", encoding="utf8"))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.theParent.makeAlert(["Could not load theme config file.",str(e)],nwAlert.ERROR)
|
self.theParent.makeAlert(
|
||||||
|
["Could not load theme config file.",str(e)], nwAlert.ERROR
|
||||||
|
)
|
||||||
continue
|
continue
|
||||||
themeName = ""
|
themeName = ""
|
||||||
if confParser.has_section("Main"):
|
if confParser.has_section("Main"):
|
||||||
@@ -314,7 +316,9 @@ class GuiTheme:
|
|||||||
try:
|
try:
|
||||||
confParser.read_file(open(syntaxPath, mode="r", encoding="utf8"))
|
confParser.read_file(open(syntaxPath, mode="r", encoding="utf8"))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.theParent.makeAlert(["Could not load syntax file.",str(e)],nwAlert.ERROR)
|
self.theParent.makeAlert(
|
||||||
|
["Could not load syntax file.",str(e)], nwAlert.ERROR
|
||||||
|
)
|
||||||
return []
|
return []
|
||||||
syntaxName = ""
|
syntaxName = ""
|
||||||
if confParser.has_section("Main"):
|
if confParser.has_section("Main"):
|
||||||
|
|||||||
+2
-2
@@ -553,7 +553,7 @@ class GuiMain(QMainWindow):
|
|||||||
|
|
||||||
if self.docEditor.theHandle is None:
|
if self.docEditor.theHandle is None:
|
||||||
self.makeAlert(
|
self.makeAlert(
|
||||||
["Please open a document to import the text file into."],
|
"Please open a document to import the text file into.",
|
||||||
nwAlert.ERROR
|
nwAlert.ERROR
|
||||||
)
|
)
|
||||||
return False
|
return False
|
||||||
@@ -782,7 +782,7 @@ class GuiMain(QMainWindow):
|
|||||||
0 = info, 1 = warning, and 2 = error.
|
0 = info, 1 = warning, and 2 = error.
|
||||||
"""
|
"""
|
||||||
if isinstance(theMessage, list):
|
if isinstance(theMessage, list):
|
||||||
popMsg = " ".join(theMessage)
|
popMsg = "<br>".join(theMessage)
|
||||||
logMsg = theMessage
|
logMsg = theMessage
|
||||||
else:
|
else:
|
||||||
popMsg = theMessage
|
popMsg = theMessage
|
||||||
|
|||||||
Reference in New Issue
Block a user