Fix get_icon_pixbuf()
This commit is contained in:
parent
f53c5326f2
commit
5887cb39bb
@ -94,9 +94,14 @@ class Buddy(gobject.GObject):
|
|||||||
|
|
||||||
def get_icon_pixbuf(self):
|
def get_icon_pixbuf(self):
|
||||||
icon = self._buddy.getIcon()
|
icon = self._buddy.getIcon()
|
||||||
if icon:
|
if icon and len(icon):
|
||||||
pbl = gtk.gdk.PixbufLoader()
|
pbl = gtk.gdk.PixbufLoader()
|
||||||
pbl.write(icon)
|
icon_data = ""
|
||||||
|
for item in icon:
|
||||||
|
if item < 0:
|
||||||
|
item = item + 128
|
||||||
|
icon_data = icon_data + chr(item)
|
||||||
|
pbl.write(icon_data)
|
||||||
pbl.close()
|
pbl.close()
|
||||||
return pbl.get_pixbuf()
|
return pbl.get_pixbuf()
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user