Skip to content
Snippets Groups Projects
Commit 9427fdae authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

don't compute bw avatar if no avatar. Fixes #1839

parent a003eca5
No related branches found
No related tags found
No related merge requests found
......@@ -1076,12 +1076,12 @@ def save_avatar_files(self, jid, photo_decoded, puny_nick = None):
if pixbuf:
path_to_normal_file = path_to_file + '_notif_size_colored.png'
pixbuf.save(path_to_normal_file, 'png')
# Generate and save the resized, black and white avatar
bwbuf = gtkgui_helpers.get_scaled_pixbuf(
gtkgui_helpers.make_pixbuf_grayscale(pixbuf), 'notification')
if bwbuf:
path_to_bw_file = path_to_file + '_notif_size_bw.png'
bwbuf.save(path_to_bw_file, 'png')
# Generate and save the resized, black and white avatar
bwbuf = gtkgui_helpers.get_scaled_pixbuf(
gtkgui_helpers.make_pixbuf_grayscale(pixbuf), 'notification')
if bwbuf:
path_to_bw_file = path_to_file + '_notif_size_bw.png'
bwbuf.save(path_to_bw_file, 'png')
def add_event(self, account, jid, typ, args):
'''add an event to the awaiting_events var'''
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment