Check if the icon exists
This commit is contained in:
parent
f5173c33d0
commit
7ecf98ba95
@ -278,15 +278,15 @@ class Chat(activity.Activity):
|
|||||||
|
|
||||||
def _insert_buddy(self, buf, nick):
|
def _insert_buddy(self, buf, nick):
|
||||||
buddy = self._group.get_buddy(nick)
|
buddy = self._group.get_buddy(nick)
|
||||||
print buddy.get_nick_name()
|
|
||||||
|
|
||||||
pbl = gtk.gdk.PixbufLoader()
|
if buddy.get_icon():
|
||||||
pbl.write(buddy.get_icon())
|
pbl = gtk.gdk.PixbufLoader()
|
||||||
pbl.close()
|
pbl.write(buddy.get_icon())
|
||||||
pbuf = pbl.get_pixbuf()
|
pbl.close()
|
||||||
|
pbuf = pbl.get_pixbuf()
|
||||||
|
|
||||||
aniter = buf.get_end_iter()
|
aniter = buf.get_end_iter()
|
||||||
buf.insert_pixbuf(aniter, pbuf)
|
buf.insert_pixbuf(aniter, pbuf)
|
||||||
|
|
||||||
aniter = buf.get_end_iter()
|
aniter = buf.get_end_iter()
|
||||||
buf.insert(aniter, nick + ": ")
|
buf.insert(aniter, nick + ": ")
|
||||||
|
Loading…
Reference in New Issue
Block a user