summaryrefslogtreecommitdiff
path: root/src/tabs/conversationtab.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2014-10-12 22:34:41 +0200
committermathieui <mathieui@mathieui.net>2014-10-12 22:34:41 +0200
commit6c62f624024e954217b7217a691469484ffb70d2 (patch)
tree36b2f43e8d4667b2694844c61dfebb0460f6b8d2 /src/tabs/conversationtab.py
parent577d6ea87bf7b5c96fbf307dbf921e1b5f594cbe (diff)
downloadpoezio-6c62f624024e954217b7217a691469484ffb70d2.tar.gz
poezio-6c62f624024e954217b7217a691469484ffb70d2.tar.bz2
poezio-6c62f624024e954217b7217a691469484ffb70d2.tar.xz
poezio-6c62f624024e954217b7217a691469484ffb70d2.zip
Color the JID in locking/unlocking messages
Diffstat (limited to 'src/tabs/conversationtab.py')
-rw-r--r--src/tabs/conversationtab.py28
1 files changed, 17 insertions, 11 deletions
diff --git a/src/tabs/conversationtab.py b/src/tabs/conversationtab.py
index e6324182..94cfd305 100644
--- a/src/tabs/conversationtab.py
+++ b/src/tabs/conversationtab.py
@@ -385,11 +385,15 @@ class DynamicConversationTab(ConversationTab):
assert(resource)
if resource != self.locked_resource:
self.locked_resource = resource
-
- message = _('\x19%s}Conversation locked to %s/%s.') % (
- dump_tuple(get_theme().COLOR_INFORMATION_TEXT),
- self.name,
- resource)
+ info = '\x19%s}' % dump_tuple(get_theme().COLOR_INFORMATION_TEXT)
+ jid_c = '\x19%s}' % dump_tuple(get_theme().COLOR_MUC_JID)
+
+ message = _('%(info)sConversation locked to '
+ '%(jid_c)s%(jid)s/%(resource)s%(info)s.') % {
+ 'info': info,
+ 'jid_c': jid_c,
+ 'jid': self.name,
+ 'resource': resource}
self.add_message(message, typ=0)
self.check_features()
@@ -405,16 +409,18 @@ class DynamicConversationTab(ConversationTab):
self.remote_wants_chatstates = None
if self.locked_resource != None:
self.locked_resource = None
+ info = '\x19%s}' % dump_tuple(get_theme().COLOR_INFORMATION_TEXT)
+ jid_c = '\x19%s}' % dump_tuple(get_theme().COLOR_MUC_JID)
if from_:
- message = _('\x19%s}Conversation unlocked '
- '(received activity from %s).') % (
- dump_tuple(get_theme().COLOR_INFORMATION_TEXT),
- from_)
+ message = _('%(info)sConversation unlocked (received activity'
+ ' from %(jid_c)s%(jid)s%(info)s).') % {
+ 'info': info,
+ 'jid_c': jid_c,
+ 'jid': from_}
self.add_message(message, typ=0)
else:
- message = _('\x19%s}Conversation unlocked.') % (
- dump_tuple(get_theme().COLOR_INFORMATION_TEXT))
+ message = _('%sConversation unlocked.') % info
self.add_message(message, typ=0)
def get_dest_jid(self):