From c0e8557f52f2eacac1bba0ee0b994c477f15b6a6 Mon Sep 17 00:00:00 2001 From: Nikos Kouremenos Date: Wed, 18 May 2005 15:40:42 +0000 Subject: [PATCH] userfriendly status string used in tabbed_chat window too --- src/roster_window.py | 2 +- src/tabbed_chat_window.py | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/roster_window.py b/src/roster_window.py index 9a6cce435..66a3a04bd 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -1399,7 +1399,7 @@ class Roster_window: start = '* ' self.window.set_title(start + 'Gajim') - def get_uf_status(self, status, capitalize=True): + def get_uf_status(self, status): '''returns a userfriendly string for dnd/xa/chat and capitalize()s the rest''' if status == 'dnd': diff --git a/src/tabbed_chat_window.py b/src/tabbed_chat_window.py index 198840ac1..e8820da2f 100644 --- a/src/tabbed_chat_window.py +++ b/src/tabbed_chat_window.py @@ -170,8 +170,9 @@ class Tabbed_chat_window(chat.Chat): self.redraw_tab(user.jid) self.draw_widgets(user) - self.print_conversation(_('%s is %s (%s)') % (user.name, \ - user.show, user.status), user.jid, 'status') + uf_status = self.plugin.roster.get_uf_status(user.show) + self.print_conversation(_('%s is %s (%s)') % (user.name, + uf_status, user.status), user.jid, 'status') #print queued messages if self.plugin.queues[self.account].has_key(user.jid): @@ -179,10 +180,8 @@ class Tabbed_chat_window(chat.Chat): if gajim.config.get('print_time') == 'sometimes': self.print_time_timeout(user.jid) - self.print_time_timeout_id[user.jid] = gobject.timeout_add(300000, \ + self.print_time_timeout_id[user.jid] = gobject.timeout_add(300000, self.print_time_timeout, user.jid) - #FIXME: why show if already visible from glade? - #self.childs[user.jid].show_all() def on_message_textview_key_press_event(self, widget, event): """When a key is pressed: @@ -229,7 +228,6 @@ class Tabbed_chat_window(chat.Chat): message_buffer.set_text('', -1) self.print_conversation(message, jid, jid) return True - return False def on_contact_button_clicked(self, widget): jid = self.get_active_jid()