diff sat/core/constants.py @ 2956:767e1ef6e1bd

core (constants): added generic constants for "info", "warning" and "error" levels
author Goffi <goffi@goffi.org>
date Sun, 26 May 2019 22:22:01 +0200
parents bb36cf6289c6
children 121c4a2a567c
line wrap: on
line diff
--- a/sat/core/constants.py	Sun May 26 22:22:00 2019 +0200
+++ b/sat/core/constants.py	Sun May 26 22:22:01 2019 +0200
@@ -285,6 +285,12 @@
     PS_ITEMS = "items"  # Can contain publish and retract items
     PS_EVENTS = (PS_ITEMS, PS_DELETE)
 
+    ## MESSAGE/NOTIFICATION LEVELS ##
+
+    LVL_INFO = "info"
+    LVL_WARNING = "warning"
+    LVL_ERROR = "error"
+
     ## XMLUI ##
     XMLUI_WINDOW = "window"
     XMLUI_POPUP = "popup"
@@ -300,9 +306,9 @@
     XMLUI_DATA_TYPE = "type"
     XMLUI_DATA_MESS = "message"
     XMLUI_DATA_LVL = "level"
-    XMLUI_DATA_LVL_INFO = "info"
-    XMLUI_DATA_LVL_WARNING = "warning"
-    XMLUI_DATA_LVL_ERROR = "error"
+    XMLUI_DATA_LVL_INFO = LVL_INFO
+    XMLUI_DATA_LVL_WARNING = LVL_WARNING
+    XMLUI_DATA_LVL_ERROR = LVL_ERROR
     XMLUI_DATA_LVL_DEFAULT = XMLUI_DATA_LVL_INFO
     XMLUI_DATA_LVLS = (XMLUI_DATA_LVL_INFO, XMLUI_DATA_LVL_WARNING, XMLUI_DATA_LVL_ERROR)
     XMLUI_DATA_BTNS_SET = "buttons_set"