Improved the alert to user interface, and added an enum class for severity flags.

This commit is contained in:
Veronica K. B. Olsen
2019-05-12 20:34:52 +02:00
parent 9d180bf101
commit e2895ce4f7
7 changed files with 48 additions and 22 deletions
+6 -2
View File
@@ -2,6 +2,8 @@
"""novelWriter Test Dummy GUI Classes
"""
from nw.enum import nwAlert
class DummyMain():
def __init__(self):
@@ -9,10 +11,12 @@ class DummyMain():
return
def makeAlert(self, theMessage, theLevel):
if theLevel == 1:
if theLevel == nwAlert.WARN:
lvlMsg = "WARNING: "
elif theLevel == 2:
elif theLevel == nwAlert.ERROR:
lvlMsg = "ERROR: "
elif theLevel == nwAlert.BUG:
lvlMsg = "BUG: "
else:
lvlMsg = ""
if isinstance(theMessage, list):