Skip to content
Snippets Groups Projects
Commit 39b0e896 authored by nkour's avatar nkour
Browse files

fixing what we return also do not check not loading. the point is to refuse on...

fixing what we return also do not check not loading. the point is to refuse on adding or else we allow bugs
parent 7e4f56f0
No related branches found
No related tags found
No related merge requests found
......@@ -663,14 +663,11 @@ def image_is_ok(self, image):
try:
img.set_from_file(image)
except:
return True
return False
if img.get_storage_type() == gtk.IMAGE_PIXBUF:
pix = img.get_pixbuf()
else:
return False
if pix.get_width() > 24 or pix.get_height() > 24:
#FIXME: inform the user why you don't accept it
return False
return True
def make_regexps(self):
......@@ -713,7 +710,7 @@ def make_regexps(self):
emoticons_pattern += emoticon_escaped + '|'# | means or in regexp
emot_and_basic_pattern = emoticons_pattern + basic_pattern
self.emot_and_basic_re = sre.compile(emot_and_basic_pattern,\
self.emot_and_basic_re = sre.compile(emot_and_basic_pattern,
sre.IGNORECASE)
# at least one character in 3 parts (before @, after @, after .)
......
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