fix a tb for contacts that have EXTVAL in vcard
This commit is contained in:
parent
554a9142b1
commit
c3012b4ec6
|
@ -45,6 +45,8 @@ def get_avatar_pixbuf_encoded_mime(photo):
|
||||||
if not isinstance(photo, dict):
|
if not isinstance(photo, dict):
|
||||||
return None, None, None
|
return None, None, None
|
||||||
img_decoded = None
|
img_decoded = None
|
||||||
|
avatar_encoded = None
|
||||||
|
avatar_mime_type = None
|
||||||
if photo.has_key('BINVAL') and photo.has_key('TYPE'):
|
if photo.has_key('BINVAL') and photo.has_key('TYPE'):
|
||||||
img_encoded = photo['BINVAL']
|
img_encoded = photo['BINVAL']
|
||||||
avatar_encoded = img_encoded
|
avatar_encoded = img_encoded
|
||||||
|
@ -61,8 +63,10 @@ def get_avatar_pixbuf_encoded_mime(photo):
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
if img_decoded:
|
if img_decoded:
|
||||||
return gtkgui_helpers.get_pixbuf_from_data(img_decoded), avatar_encoded, avatar_mime_type
|
pixbuf = gtkgui_helpers.get_pixbuf_from_data(img_decoded)
|
||||||
return None, None, None
|
else:
|
||||||
|
pixbuf = None
|
||||||
|
return pixbuf, avatar_encoded, avatar_mime_type
|
||||||
|
|
||||||
class VcardWindow:
|
class VcardWindow:
|
||||||
'''Class for contact's information window'''
|
'''Class for contact's information window'''
|
||||||
|
|
Loading…
Reference in New Issue