16 kb as max for avatar. to follow: auto resize bigger images

This commit is contained in:
Nikos Kouremenos 2006-01-20 13:58:52 +00:00
parent 61d7523030
commit c4ea6556bb
1 changed files with 2 additions and 2 deletions

View File

@ -202,10 +202,10 @@ class VcardWindow:
f = dialog.get_filename() f = dialog.get_filename()
f = gtkgui_helpers.decode_filechooser_file_paths((f,))[0] f = gtkgui_helpers.decode_filechooser_file_paths((f,))[0]
filesize = os.path.getsize(f) # in bytes filesize = os.path.getsize(f) # in bytes
if filesize > 32768: # 32 kb if filesize > 16384: # 16 kb
dialogs.ErrorDialog(_('The filesize of image "%s" is too large')\ dialogs.ErrorDialog(_('The filesize of image "%s" is too large')\
% os.path.basename(f), % os.path.basename(f),
_('The file must not be more than 32 kilobytes.')).get_response() _('The file must not be more than 16 kilobytes.')).get_response()
continue continue
if self.image_is_ok(f): if self.image_is_ok(f):
done = True done = True