diff src/core/constants.py @ 1171:0abce7f17782

core: a new "info" type is used in newMessage for system messages (not comming from outside)
author Goffi <goffi@goffi.org>
date Fri, 05 Sep 2014 19:29:30 +0200
parents 3164b509bc99
children a090e5ee83c2
line wrap: on
line diff
--- a/src/core/constants.py	Fri Sep 05 11:16:38 2014 +0200
+++ b/src/core/constants.py	Fri Sep 05 19:29:30 2014 +0200
@@ -57,8 +57,8 @@
     STATIC_BLOG_PARAM_KEYWORDS = "Keywords"
     STATIC_BLOG_PARAM_DESCRIPTION = "Description"
 
+
     ## Menus ##
-
     MENU_GLOBAL = "GLOBAL"
     MENU_ROOM = "ROOM"
     MENU_SINGLE = "SINGLE"
@@ -66,6 +66,7 @@
     MENU_ROSTER_JID_CONTEXT = "ROSTER_JID_CONTEXT"
     MENU_ROSTER_GROUP_CONTEXT = "MENU_ROSTER_GROUP_CONTEXT"
 
+
     ## Profile and entities ##
     PROF_KEY_NONE = '@NONE@'
     PROF_KEY_DEFAULT = '@DEFAULT@'
@@ -74,6 +75,9 @@
     ENTITY_CAP_HASH = 'CAP_HASH'
 
 
+    ## Messages ##
+    MESS_TYPE_INFO = 'info'
+
     ## Configuration ##
     if BaseDirectory:  # skipped when xdg module is not available (should not happen in backend)
 
@@ -188,6 +192,7 @@
 
     @classmethod
     def bool(cls, value):
+        """retour str text value for bool, or bool value for str"""
         if isinstance(value, bool):
             return cls.BOOL_TRUE if value else cls.BOOL_FALSE
         return value.lower() == cls.BOOL_TRUE