vcard now works in gc
This commit is contained in:
parent
903a466f83
commit
b4ff6fd116
|
@ -582,9 +582,13 @@ class Interface:
|
|||
self.windows[account]['chats'][array['jid']].set_avatar(array)
|
||||
|
||||
def handle_event_os_info(self, account, array):
|
||||
win = None
|
||||
if self.windows[account]['infos'].has_key(array[0]):
|
||||
self.windows[account]['infos'][array[0]].set_os_info(array[1], \
|
||||
array[2], array[3])
|
||||
win = self.windows[account]['infos'][array[0]]
|
||||
elif self.windows[account]['infos'].has_key(array[0] + '/' + array[1]):
|
||||
win = self.windows[account]['infos'][array[0] + '/' + array[1]]
|
||||
if win:
|
||||
win.set_os_info(array[1], array[2], array[3])
|
||||
if self.remote and self.remote.is_enabled():
|
||||
self.remote.raise_signal('OsInfo', (account, array))
|
||||
|
||||
|
|
|
@ -708,8 +708,12 @@ class GroupchatWindow(chat.Chat):
|
|||
if self.plugin.windows[self.account]['infos'].has_key(jid):
|
||||
self.plugin.windows[self.account]['infos'][jid].window.present()
|
||||
else:
|
||||
# we copy contact because c.jid must contain the fakeJid for vcard
|
||||
c2 = Contact(jid = jid, name = c.name, groups = c.groups,
|
||||
show = c.show, status = c.status, sub = c.sub,
|
||||
resource = c.resource, role = c.role, affiliation = c.affiliation)
|
||||
self.plugin.windows[self.account]['infos'][jid] = \
|
||||
dialogs.VcardWindow(c, self.plugin, self.account, False)
|
||||
dialogs.VcardWindow(c2, self.plugin, self.account, False)
|
||||
|
||||
def on_add_to_roster(self, widget, jid):
|
||||
dialogs.AddNewContactWindow(self.plugin, self.account, jid)
|
||||
|
|
|
@ -232,7 +232,8 @@ class VcardWindow:
|
|||
client = ''
|
||||
os = ''
|
||||
while self.os_info.has_key(i):
|
||||
if self.os_info[i]['resource'] == resource:
|
||||
if not self.os_info[i]['resource'] or \
|
||||
self.os_info[i]['resource'] == resource:
|
||||
self.os_info[i]['client'] = client_info
|
||||
self.os_info[i]['os'] = os_info
|
||||
if i > 0:
|
||||
|
|
Loading…
Reference in New Issue