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

This commit is contained in:
Veronica K. B. Olsen committed 2019-05-12 20:34:52 +02:00
1 parent 9d180bf101
commit e2895ce4f7
7 files changed
+48 -22

No files matched your search

+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):