Mercurial > libervia-web
comparison libervia.py @ 433:bbdbee25123a
import constants.Const as C (according to the coding rules)
author | souliane <souliane@mailoo.org> |
---|---|
date | Thu, 01 May 2014 11:29:09 +0200 |
parents | b5b440e6ea16 |
children | d52f529a6d42 |
comparison
equal
deleted
inserted
replaced
432:8ecc5a7062e4 | 433:bbdbee25123a |
---|---|
35 from browser_side.html_tools import html_sanitize | 35 from browser_side.html_tools import html_sanitize |
36 from browser_side.notification import Notification | 36 from browser_side.notification import Notification |
37 | 37 |
38 from sat_frontends.tools.misc import InputHistory | 38 from sat_frontends.tools.misc import InputHistory |
39 from sat_frontends.tools.strings import getURLParams | 39 from sat_frontends.tools.strings import getURLParams |
40 from constants import Const | 40 from constants import Const as C |
41 from sat.core.i18n import _ | 41 from sat.core.i18n import _ |
42 | 42 |
43 | 43 |
44 MAX_MBLOG_CACHE = 500 # Max microblog entries kept in memories | 44 MAX_MBLOG_CACHE = 500 # Max microblog entries kept in memories |
45 | 45 |
186 self._register.call('registerParams', None) | 186 self._register.call('registerParams', None) |
187 self._register.call('isRegistered', self._isRegisteredCB) | 187 self._register.call('isRegistered', self._isRegisteredCB) |
188 self.initialised = False | 188 self.initialised = False |
189 self.init_cache = [] # used to cache events until initialisation is done | 189 self.init_cache = [] # used to cache events until initialisation is done |
190 # define here the parameters that have an incidende to UI refresh | 190 # define here the parameters that have an incidende to UI refresh |
191 self.params_ui = {"unibox": {"name": Const.ENABLE_UNIBOX_PARAM, | 191 self.params_ui = {"unibox": {"name": C.ENABLE_UNIBOX_PARAM, |
192 "category": Const.ENABLE_UNIBOX_KEY, | 192 "category": C.ENABLE_UNIBOX_KEY, |
193 "cast": lambda value: value == 'true', | 193 "cast": lambda value: value == 'true', |
194 "value": None | 194 "value": None |
195 } | 195 } |
196 } | 196 } |
197 | 197 |
801 @param from_jid_s: JID of the contact who sent his state, or '@ALL@' | 801 @param from_jid_s: JID of the contact who sent his state, or '@ALL@' |
802 @param state: new state (string) | 802 @param state: new state (string) |
803 """ | 803 """ |
804 if from_jid_s == '@ALL@': | 804 if from_jid_s == '@ALL@': |
805 target = '@ALL@' | 805 target = '@ALL@' |
806 nick = Const.ALL_OCCUPANTS | 806 nick = C.ALL_OCCUPANTS |
807 else: | 807 else: |
808 from_jid = JID(from_jid_s) | 808 from_jid = JID(from_jid_s) |
809 target = from_jid.bare | 809 target = from_jid.bare |
810 nick = from_jid.resource | 810 nick = from_jid.resource |
811 | 811 |