diff options
author | mathieui <mathieui@mathieui.net> | 2014-03-28 00:53:18 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2014-03-28 00:53:18 +0100 |
commit | f7294b29e4c3f1b0aa73b088baf7b19f8b334ca5 (patch) | |
tree | e2b0b0bacf22b1031a10f531411053d55abf2ee2 /src/tabs/conversationtab.py | |
parent | c2d9151f38ce50110e31eae0aa16777040b60362 (diff) | |
download | poezio-f7294b29e4c3f1b0aa73b088baf7b19f8b334ca5.tar.gz poezio-f7294b29e4c3f1b0aa73b088baf7b19f8b334ca5.tar.bz2 poezio-f7294b29e4c3f1b0aa73b088baf7b19f8b334ca5.tar.xz poezio-f7294b29e4c3f1b0aa73b088baf7b19f8b334ca5.zip |
Improve dynamic conversation tabs
Add color to the info messages
Unlock the tab when the locked resource goes offline
Diffstat (limited to 'src/tabs/conversationtab.py')
-rw-r--r-- | src/tabs/conversationtab.py | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/tabs/conversationtab.py b/src/tabs/conversationtab.py index 6c0bf2e0..82483046 100644 --- a/src/tabs/conversationtab.py +++ b/src/tabs/conversationtab.py @@ -387,7 +387,12 @@ class DynamicConversationTab(ConversationTab): assert(resource) if resource != self.locked_resource: self.locked_resource = resource - self.add_message(_('Conversation locked to %s/%s.') % (self.name, resource), typ=0) + + message = _('\x19%s}Conversation locked to %s/%s.') % ( + dump_tuple(get_theme().COLOR_INFORMATION_TEXT), + self.name, + resource) + self.add_message(message, typ=0) def unlock_command(self, arg=None): self.unlock() @@ -400,10 +405,17 @@ class DynamicConversationTab(ConversationTab): """ if self.locked_resource != None: self.locked_resource = None + if from_: - self.add_message(_('Conversation unlocked (received activity from %s).') % from_, typ=0) + message = _('\x19%s}Conversation unlocked ' + '(received activity from %s).') % ( + dump_tuple(get_theme().COLOR_INFORMATION_TEXT), + from_) + self.add_message(message, typ=0) else: - self.add_message(_('Conversation unlocked.'), typ=0) + message = _('\x19%s}Conversation unlocked.') % ( + dump_tuple(get_theme().COLOR_INFORMATION_TEXT)) + self.add_message(message, typ=0) def get_dest_jid(self): """ |