Mercurial > libervia-backend
diff frontends/src/quick_frontend/quick_app.py @ 736:6246eb6d64a0
frontends: define the constants with classes and inheritance instance of using __builtin__
author | souliane <souliane@mailoo.org> |
---|---|
date | Sat, 23 Nov 2013 10:21:40 +0100 |
parents | 682933ca304c |
children | 378af36155c2 |
line wrap: on
line diff
--- a/frontends/src/quick_frontend/quick_app.py Sun Nov 24 11:22:20 2013 +0100 +++ b/frontends/src/quick_frontend/quick_app.py Sat Nov 23 10:21:40 2013 +0100 @@ -25,7 +25,7 @@ from sat_frontends.quick_frontend.quick_utils import escapePrivate, unescapePrivate from optparse import OptionParser -import sat_frontends.quick_frontend.constants +from sat_frontends.quick_frontend.constants import Const import gettext gettext.install('sat_frontend', unicode=True) @@ -283,7 +283,7 @@ self.chat_wins[win.bare].printMessage(from_jid, msg, profile, float(timestamp) if timestamp else '') def sendMessage(self, to_jid, message, subject='', mess_type="auto", extra={}, profile_key="@NONE@"): - if to_jid.startswith(const_PRIVATE_PREFIX): + if to_jid.startswith(Const.PRIVATE_PREFIX): to_jid = unescapePrivate(to_jid) mess_type = "chat" self.bridge.sendMessage(to_jid, message, subject, mess_type, extra, profile_key)