Tooltip for account line in roster
This commit is contained in:
parent
50a179b301
commit
4c990ccb1e
3 changed files with 19 additions and 1 deletions
|
@ -1567,6 +1567,9 @@ class Connection:
|
||||||
self.connection.send(p)
|
self.connection.send(p)
|
||||||
self.dispatch('STATUS', show)
|
self.dispatch('STATUS', show)
|
||||||
|
|
||||||
|
def get_status(self):
|
||||||
|
return STATUS_LIST[self.connected]
|
||||||
|
|
||||||
def send_motd(self, jid, subject = '', msg = ''):
|
def send_motd(self, jid, subject = '', msg = ''):
|
||||||
if not self.connection:
|
if not self.connection:
|
||||||
return
|
return
|
||||||
|
|
|
@ -294,6 +294,9 @@ class Interface:
|
||||||
if gajim.contacts[account].has_key(ji):
|
if gajim.contacts[account].has_key(ji):
|
||||||
#Update existing iter
|
#Update existing iter
|
||||||
self.roster.draw_contact(ji, account)
|
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):
|
elif gajim.contacts[account].has_key(ji):
|
||||||
#It isn't an agent
|
#It isn't an agent
|
||||||
self.roster.chg_contact_status(user1, array[1], array[2], account)
|
self.roster.chg_contact_status(user1, array[1], array[2], account)
|
||||||
|
|
|
@ -670,6 +670,18 @@ class RosterWindow:
|
||||||
self.tooltip.id = row
|
self.tooltip.id = row
|
||||||
self.tooltip.timeout = gobject.timeout_add(500,
|
self.tooltip.timeout = gobject.timeout_add(500,
|
||||||
self.show_tooltip, gajim.contacts[account][jid])
|
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):
|
def on_agent_logging(self, widget, jid, state, account):
|
||||||
'''When an agent is requested to log in or off'''
|
'''When an agent is requested to log in or off'''
|
||||||
|
|
Loading…
Add table
Reference in a new issue