diff --git a/src/common/connection.py b/src/common/connection.py index 8293531f8856ec37101db6d99ad72817257a8e0e..f773096876e32d93ce213eb2a10e2147e4e756e9 100644 --- a/src/common/connection.py +++ b/src/common/connection.py @@ -1566,6 +1566,9 @@ class Connection: if self.connection: self.connection.send(p) self.dispatch('STATUS', show) + + def get_status(self): + return STATUS_LIST[self.connected] def send_motd(self, jid, subject = '', msg = ''): if not self.connection: diff --git a/src/gajim.py b/src/gajim.py index 9398adc10c6658d010b8ed17ac39045494689799..5072cf11204efc7025c7a0f32647760d898eda9c 100755 --- a/src/gajim.py +++ b/src/gajim.py @@ -294,6 +294,9 @@ class Interface: if gajim.contacts[account].has_key(ji): #Update existing iter self.roster.draw_contact(ji, account) + elif jid == gajim.get_jid_from_account(account): + #It's another of our resources. We don't need to see that! + return elif gajim.contacts[account].has_key(ji): #It isn't an agent self.roster.chg_contact_status(user1, array[1], array[2], account) @@ -344,7 +347,7 @@ class Interface: if self.remote and self.remote.is_enabled(): self.remote.raise_signal('ContactAbsence', (account, array)) # stop non active file transfers - + elif self.windows[account]['gc'].has_key(ji): # ji is then room_jid #it is a groupchat presence #FIXME: upgrade the chat instances (for pm) diff --git a/src/roster_window.py b/src/roster_window.py index 4765806a1d01548f3c58ed2ced643f7fa7b2e4ea..fbfd3d2505393ef9868b23b48be84332be90c56c 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -670,6 +670,18 @@ class RosterWindow: self.tooltip.id = row self.tooltip.timeout = gobject.timeout_add(500, self.show_tooltip, gajim.contacts[account][jid]) + if model[iter][C_TYPE] == 'account': + account = model[iter][C_NAME].decode('utf-8') + jid = gajim.get_jid_from_account(account) + self_contact = Contact(jid=jid, name=account, show = gajim.connections[account].get_status(), status=gajim.connections[account].status, resource=gajim.config.get_per('accounts', gajim.connections[account].name, 'resource'), keyID = gajim.config.get_per('accounts', gajim.connections[account].name, 'keyid')) + contacts = [self_contact] + if gajim.contacts[account].has_key(jid): + for contact in gajim.contacts[account][jid]: + contacts = [contact] + if self.tooltip.timeout == 0 or self.tooltip.id != props[0]: + self.tooltip.id = row + self.tooltip.timeout = gobject.timeout_add(500, + self.show_tooltip, contacts) def on_agent_logging(self, widget, jid, state, account): '''When an agent is requested to log in or off'''