comparison frontends/src/quick_frontend/constants.py @ 1367:f71a0fc26886

merged branch frontends_multi_profiles
author Goffi <goffi@goffi.org>
date Wed, 18 Mar 2015 10:52:28 +0100
parents fa77e40eb17b
children 3dae6964c071
comparison
equal deleted inserted replaced
1295:1e3b1f9ad6e2 1367:f71a0fc26886
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 _
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 PRIVATE_PREFIX = "@private@" 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
55 CONTACT_GROUPS = 'groups'
56 CONTACT_RESOURCES = 'resources'
57 CONTACT_MAIN_RESOURCE = 'main_resource'
58 CONTACT_SPECIAL = 'special'
59 CONTACT_SPECIAL_GROUP = 'group' # group chat special entity
60 CONTACT_SPECIAL_ALLOWED = (CONTACT_SPECIAL_GROUP,) # set of allowed values for special flag
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'
73
74 LISTENERS = {'avatar', 'nick', 'presence', 'profilePlugged', 'disconnect', 'gotMenus', 'menu'}