comparison frontends/src/quick_frontend/constants.py @ 1327:89dc29afe01c frontends_multi_profiles

frontends: merge sat_frontends.constants to sat_frontends.quick_frontend.constants
author souliane <souliane@mailoo.org>
date Sun, 22 Feb 2015 14:13:42 +0100
parents 6c7d89843f1b
children f8bd40509a2d
comparison
equal deleted inserted replaced
1326:88e40f31b17e 1327:89dc29afe01c
15 # GNU Affero General Public License for more details. 15 # GNU Affero General Public License for more details.
16 16
17 # You should have received a copy of the GNU Affero General Public License 17 # You should have received a copy of the GNU Affero General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. 18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 19
20 from sat_frontends import constants 20 from sat.core import constants
21 from sat.core.i18n import _, D_
22 from collections import OrderedDict # only available from python 2.7
21 23
22 24
23 class Const(constants.Const): 25 class Const(constants.Const):
24 26
25 #Contact list 27 PRESENCE = OrderedDict([("", _("Online")),
28 ("chat", _("Free for chat")),
29 ("away", _("Away from keyboard")),
30 ("dnd", _("Do not disturb")),
31 ("xa", _("Extended away"))])
32
33 # from plugin_misc_text_syntaxes
34 SYNTAX_XHTML = "XHTML"
35 SYNTAX_CURRENT = "@CURRENT@"
36 SYNTAX_TEXT = "text"
37
38 # XMLUI
39 SAT_FORM_PREFIX = "SAT_FORM_"
40 SAT_PARAM_SEPARATOR = "_XMLUI_PARAM_" # used to have unique elements names
41 XMLUI_STATUS_VALIDATED = "validated"
42 XMLUI_STATUS_CANCELLED = constants.Const.XMLUI_DATA_CANCELLED
43
44 # MUC
45 ALL_OCCUPANTS = 1
46 MUC_USER_STATES = {
47 "active": u'✔',
48 "inactive": u'☄',
49 "gone": u'✈',
50 "composing": u'✎',
51 "paused": u"⦷"
52 }
53
54 # Roster
26 CONTACT_GROUPS = 'groups' 55 CONTACT_GROUPS = 'groups'
27 CONTACT_RESOURCES = 'resources' 56 CONTACT_RESOURCES = 'resources'
28 CONTACT_MAIN_RESOURCE = 'main_resource' 57 CONTACT_MAIN_RESOURCE = 'main_resource'
29 CONTACT_SPECIAL = 'special' 58 CONTACT_SPECIAL = 'special'
30 CONTACT_SPECIAL_GROUP = 'group' # group chat special entity 59 CONTACT_SPECIAL_GROUP = 'group' # group chat special entity
31 CONTACT_SPECIAL_ALLOWED = (CONTACT_SPECIAL_GROUP,) # set of allowed values for special flag 60 CONTACT_SPECIAL_ALLOWED = (CONTACT_SPECIAL_GROUP,) # set of allowed values for special flag
32 CONTACT_DATA_FORBIDDEN = {CONTACT_GROUPS, CONTACT_RESOURCES, CONTACT_MAIN_RESOURCE} # set of forbidden names for contact data 61 CONTACT_DATA_FORBIDDEN = {CONTACT_GROUPS, CONTACT_RESOURCES, CONTACT_MAIN_RESOURCE} # set of forbidden names for contact data
62
63 # Chats
64 CHAT_ONE2ONE = 'one2one'
65 CHAT_GROUP = 'group'
66
67 # Widgets management
68 # FIXME: should be in quick_frontend.constant, but Libervia doesn't inherit from it
69 WIDGET_NEW = 'NEW'
70 WIDGET_KEEP = 'KEEP'
71 WIDGET_RAISE = 'RAISE'
72 WIDGET_RECREATE = 'RECREATE'
33 73
34 LISTENERS = {'avatar'} 74 LISTENERS = {'avatar'}