Author: asterix
Date: 2006-04-28 22:55:45 +0200 (Fri, 28 Apr 2006)
New Revision: 6246
Modified:
trunk/src/groupchat_control.py
trunk/src/vcard.py
Log:
VcardWindow now takes a new argument: is_fake, need to be true when we open a vcard for a fake jid
Modified: trunk/src/groupchat_control.py
===================================================================
--- trunk/src/groupchat_control.py 2006-04-28 20:55:00 UTC (rev 6245)
+++ trunk/src/groupchat_control.py 2006-04-28 20:55:45 UTC (rev 6246)
@@ -1689,7 +1689,7 @@
gajim.interface.instances[self.account]['infos'][c2.jid].window.present()
else:
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):
jid = gajim.construct_fjid(self.room_jid, nick)
Modified: trunk/src/vcard.py
===================================================================
--- trunk/src/vcard.py 2006-04-28 20:55:00 UTC (rev 6245)
+++ trunk/src/vcard.py 2006-04-28 20:55:45 UTC (rev 6246)
@@ -61,7 +61,7 @@
class VcardWindow:
'''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
self.xml = gtk.glade.XML(GTKGUI_GLADE, 'vcard_information_window', APP)
self.window = self.xml.get_widget('vcard_information_window')
@@ -79,6 +79,7 @@
self.contact = contact # don't use it if vcard is true
self.account = account
self.vcard = vcard
+ self.is_fake = is_fake
self.avatar_mime_type = None
self.avatar_encoded = None
@@ -368,10 +369,7 @@
self.fill_status_label()
- is_fake = False
- 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)
+ gajim.connections[self.account].request_vcard(self.contact.jid, self.is_fake)
def add_to_vcard(self, vcard, entry, txt):
'''Add an information to the vCard dictionary'''