From c8059fd3faefc36ebf2ec8506468a600f7d6844c Mon Sep 17 00:00:00 2001 From: Alex Mauer Date: Tue, 13 Sep 2005 22:15:22 +0000 Subject: [PATCH] * Make tooltip behave if we're not yet connected when it appears, or if we're the only resource online. --- src/roster_window.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/roster_window.py b/src/roster_window.py index eb09a8c51..5fedf4d7a 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -673,7 +673,11 @@ class RosterWindow: account = model[iter][C_NAME].decode('utf-8') jid = gajim.get_jid_from_account(account) contacts = [] - for resource in gajim.connections[account].connection.getRoster().getResources(jid)+[gajim.config.get_per('accounts', gajim.connections[account].name, 'resource')]: + resources = [gajim.config.get_per('accounts', gajim.connections[account].name, 'resource')] + if gajim.connections[account].connection: + if gajim.connections[account].connection.getRoster().getItem(jid): + resources = resources + gajim.connections[account].connection.getRoster().getResources(jid) + for resource in resources: contact = Contact(jid=jid, name=account, show=gajim.connections[account].get_status(), status=gajim.connections[account].status, resource=resource, keyID = gajim.config.get_per('accounts', gajim.connections[account].name, 'keyid')) contacts.append(contact) if self.tooltip.timeout == 0 or self.tooltip.id != props[0]: