Correctly convert avatar images in roster, too
This commit is contained in:
parent
88d4826693
commit
3148ab7e4e
|
@ -419,8 +419,8 @@ class GCTooltip(BaseTooltip):
|
||||||
file_ = helpers.get_avatar_path(os.path.join(gajim.AVATAR_PATH,
|
file_ = helpers.get_avatar_path(os.path.join(gajim.AVATAR_PATH,
|
||||||
puny_room, puny_name))
|
puny_room, puny_name))
|
||||||
if file_:
|
if file_:
|
||||||
self.avatar_image.set_from_file(file_)
|
with open(file_, 'rb') as file_data:
|
||||||
pix = self.avatar_image.get_pixbuf()
|
pix = gtkgui_helpers.get_pixbuf_from_data(file_data.read())
|
||||||
pix = gtkgui_helpers.get_scaled_pixbuf(pix, 'tooltip')
|
pix = gtkgui_helpers.get_scaled_pixbuf(pix, 'tooltip')
|
||||||
self.avatar_image.set_from_pixbuf(pix)
|
self.avatar_image.set_from_pixbuf(pix)
|
||||||
else:
|
else:
|
||||||
|
@ -485,8 +485,8 @@ class RosterTooltip(NotificationAreaTooltip):
|
||||||
file_ = helpers.get_avatar_path(os.path.join(gajim.AVATAR_PATH,
|
file_ = helpers.get_avatar_path(os.path.join(gajim.AVATAR_PATH,
|
||||||
puny_jid))
|
puny_jid))
|
||||||
if file_:
|
if file_:
|
||||||
self.avatar_image.set_from_file(file_)
|
with open(file_, 'rb') as file_data:
|
||||||
pix = self.avatar_image.get_pixbuf()
|
pix = gtkgui_helpers.get_pixbuf_from_data(file_data.read())
|
||||||
pix = gtkgui_helpers.get_scaled_pixbuf(pix, 'tooltip')
|
pix = gtkgui_helpers.get_scaled_pixbuf(pix, 'tooltip')
|
||||||
self.avatar_image.set_from_pixbuf(pix)
|
self.avatar_image.set_from_pixbuf(pix)
|
||||||
table_size = 4
|
table_size = 4
|
||||||
|
|
Loading…
Reference in New Issue