userfriendly status string used in tabbed_chat window too

This commit is contained in:
Nikos Kouremenos 2005-05-18 15:40:42 +00:00
parent f92cdf02cb
commit c0e8557f52
2 changed files with 5 additions and 7 deletions

View File

@ -1399,7 +1399,7 @@ class Roster_window:
start = '* ' start = '* '
self.window.set_title(start + 'Gajim') 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 '''returns a userfriendly string for dnd/xa/chat
and capitalize()s the rest''' and capitalize()s the rest'''
if status == 'dnd': if status == 'dnd':

View File

@ -170,8 +170,9 @@ class Tabbed_chat_window(chat.Chat):
self.redraw_tab(user.jid) self.redraw_tab(user.jid)
self.draw_widgets(user) self.draw_widgets(user)
self.print_conversation(_('%s is %s (%s)') % (user.name, \ uf_status = self.plugin.roster.get_uf_status(user.show)
user.show, user.status), user.jid, 'status') self.print_conversation(_('%s is %s (%s)') % (user.name,
uf_status, user.status), user.jid, 'status')
#print queued messages #print queued messages
if self.plugin.queues[self.account].has_key(user.jid): 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': if gajim.config.get('print_time') == 'sometimes':
self.print_time_timeout(user.jid) 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) 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): def on_message_textview_key_press_event(self, widget, event):
"""When a key is pressed: """When a key is pressed:
@ -229,7 +228,6 @@ class Tabbed_chat_window(chat.Chat):
message_buffer.set_text('', -1) message_buffer.set_text('', -1)
self.print_conversation(message, jid, jid) self.print_conversation(message, jid, jid)
return True return True
return False
def on_contact_button_clicked(self, widget): def on_contact_button_clicked(self, widget):
jid = self.get_active_jid() jid = self.get_active_jid()