This commit is contained in:
Nikos Kouremenos 2005-11-15 19:56:49 +00:00
parent 71271279d0
commit 1ed82a95d6
1 changed files with 5 additions and 3 deletions

View File

@ -234,6 +234,7 @@ class RosterWindow:
def draw_contact(self, jid, account, selected = False, focus = False): def draw_contact(self, jid, account, selected = False, focus = False):
'''draw the correct state image, name and avatar''' '''draw the correct state image, name and avatar'''
# focus is about if the roster window has toplevel-focus or not
model = self.tree.get_model() model = self.tree.get_model()
iters = self.get_contact_iter(jid, account) iters = self.get_contact_iter(jid, account)
if len(iters) == 0: if len(iters) == 0:
@ -279,7 +280,7 @@ class RosterWindow:
def join_gc_room(self, account, room_jid, nick, password): def join_gc_room(self, account, room_jid, nick, password):
if room_jid in gajim.interface.instances[account]['gc'] and \ if room_jid in gajim.interface.instances[account]['gc'] and \
gajim.gc_connected[account][room_jid]: gajim.gc_connected[account][room_jid]:
dialogs.ErrorDialog(_('You are already in room %s') %room_jid dialogs.ErrorDialog(_('You are already in room %s') % room_jid
).get_response() ).get_response()
return return
invisible_show = gajim.SHOW_LIST.index('invisible') invisible_show = gajim.SHOW_LIST.index('invisible')
@ -636,7 +637,7 @@ class RosterWindow:
# when we draw the roster, we avoid having the same contact # when we draw the roster, we avoid having the same contact
# more than once (f.e. we avoid showing it twice when 2 resources) # more than once (f.e. we avoid showing it twice when 2 resources)
gajim.contacts[account][ji] = [contact1] gajim.contacts[account][ji] = [contact1]
for g in array[jid]['groups'] : for g in array[jid]['groups']:
if g in gajim.groups[account].keys(): if g in gajim.groups[account].keys():
continue continue
@ -2465,9 +2466,10 @@ _('If "%s" accepts this request you will know his or her status.') %jid)
return return
contact = model[selected_iter] contact = model[selected_iter]
self._last_selected_contact = (contact[C_JID], contact[C_ACCOUNT]) self._last_selected_contact = (contact[C_JID], contact[C_ACCOUNT])
# FIXME: we first set last selected contact and then test if contact??
if contact[C_TYPE] != 'contact': if contact[C_TYPE] != 'contact':
return return
self.draw_contact(contact[C_JID], contact[C_ACCOUNT], selected=True) self.draw_contact(contact[C_JID], contact[C_ACCOUNT], selected = True)
def __init__(self): def __init__(self):
self.xml = gtk.glade.XML(GTKGUI_GLADE, 'roster_window', APP) self.xml = gtk.glade.XML(GTKGUI_GLADE, 'roster_window', APP)