VcardWindow now takes a new argument: is_fake, need to be true when we open a vcard for a fake jid
This commit is contained in:
parent
c62463da92
commit
f7c8ccea94
|
@ -1689,7 +1689,7 @@ class GroupchatControl(ChatControlBase):
|
||||||
gajim.interface.instances[self.account]['infos'][c2.jid].window.present()
|
gajim.interface.instances[self.account]['infos'][c2.jid].window.present()
|
||||||
else:
|
else:
|
||||||
gajim.interface.instances[self.account]['infos'][c2.jid] = \
|
gajim.interface.instances[self.account]['infos'][c2.jid] = \
|
||||||
vcard.VcardWindow(c2, self.account)
|
vcard.VcardWindow(c2, self.account, is_fake = True)
|
||||||
|
|
||||||
def on_history(self, widget, nick):
|
def on_history(self, widget, nick):
|
||||||
jid = gajim.construct_fjid(self.room_jid, nick)
|
jid = gajim.construct_fjid(self.room_jid, nick)
|
||||||
|
|
|
@ -61,7 +61,7 @@ def get_avatar_pixbuf_encoded_mime(photo):
|
||||||
class VcardWindow:
|
class VcardWindow:
|
||||||
'''Class for contact's information window'''
|
'''Class for contact's information window'''
|
||||||
|
|
||||||
def __init__(self, contact, account, vcard = False):
|
def __init__(self, contact, account, vcard = False, is_fake = False):
|
||||||
# the contact variable is the jid if vcard is true
|
# the contact variable is the jid if vcard is true
|
||||||
self.xml = gtk.glade.XML(GTKGUI_GLADE, 'vcard_information_window', APP)
|
self.xml = gtk.glade.XML(GTKGUI_GLADE, 'vcard_information_window', APP)
|
||||||
self.window = self.xml.get_widget('vcard_information_window')
|
self.window = self.xml.get_widget('vcard_information_window')
|
||||||
|
@ -79,6 +79,7 @@ class VcardWindow:
|
||||||
self.contact = contact # don't use it if vcard is true
|
self.contact = contact # don't use it if vcard is true
|
||||||
self.account = account
|
self.account = account
|
||||||
self.vcard = vcard
|
self.vcard = vcard
|
||||||
|
self.is_fake = is_fake
|
||||||
self.avatar_mime_type = None
|
self.avatar_mime_type = None
|
||||||
self.avatar_encoded = None
|
self.avatar_encoded = None
|
||||||
|
|
||||||
|
@ -368,10 +369,7 @@ class VcardWindow:
|
||||||
|
|
||||||
self.fill_status_label()
|
self.fill_status_label()
|
||||||
|
|
||||||
is_fake = False
|
gajim.connections[self.account].request_vcard(self.contact.jid, self.is_fake)
|
||||||
if gajim.contacts.is_pm_from_jid(self.account, self.contact.jid):
|
|
||||||
is_fake = True
|
|
||||||
gajim.connections[self.account].request_vcard(self.contact.jid, is_fake)
|
|
||||||
|
|
||||||
def add_to_vcard(self, vcard, entry, txt):
|
def add_to_vcard(self, vcard, entry, txt):
|
||||||
'''Add an information to the vCard dictionary'''
|
'''Add an information to the vCard dictionary'''
|
||||||
|
|
Loading…
Reference in New Issue