changeset a9da25032fe0 in /home/hg/repos/gajim
author: tmolitor thilo@eightysoft.de branches: details:http://hg.gajim.org/gajim?cmd=changeset;node=a9da25032fe0 description: Correctly convert avatar images in roster, too
diffstat:
src/tooltips.py | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
diffs (25 lines):
diff -r 8c4df591f2d5 -r a9da25032fe0 src/tooltips.py --- a/src/tooltips.py Wed Apr 06 23:38:30 2016 +0200 +++ b/src/tooltips.py Thu Apr 07 03:40:34 2016 +0200 @@ -419,8 +419,8 @@ file_ = helpers.get_avatar_path(os.path.join(gajim.AVATAR_PATH, puny_room, puny_name)) if file_: - self.avatar_image.set_from_file(file_) - pix = self.avatar_image.get_pixbuf() + with open(file_, 'rb') as file_data: + pix = gtkgui_helpers.get_pixbuf_from_data(file_data.read()) pix = gtkgui_helpers.get_scaled_pixbuf(pix, 'tooltip') self.avatar_image.set_from_pixbuf(pix) else: @@ -485,8 +485,8 @@ file_ = helpers.get_avatar_path(os.path.join(gajim.AVATAR_PATH, puny_jid)) if file_: - self.avatar_image.set_from_file(file_) - pix = self.avatar_image.get_pixbuf() + with open(file_, 'rb') as file_data: + pix = gtkgui_helpers.get_pixbuf_from_data(file_data.read()) pix = gtkgui_helpers.get_scaled_pixbuf(pix, 'tooltip') self.avatar_image.set_from_pixbuf(pix) table_size = 4