frontends: define the constants with classes and inheritance instance of using __builtin__

This commit is contained in:
souliane 2013-11-23 10:21:40 +01:00
commit f5dd3f2265

View file

@ -25,7 +25,7 @@ from sat.core.exceptions import BridgeExceptionNoService, BridgeInitError
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 @@ class QuickApp(object):
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)