new way to create emoticons.py file. fixes #3696
This commit is contained in:
parent
6e84de1fbe
commit
d17b5b7bad
4 changed files with 136 additions and 255 deletions
|
@ -1,76 +1,50 @@
|
||||||
# coding=utf-8
|
# coding=utf-8
|
||||||
emoticons = {
|
emoticons = {
|
||||||
':-[': 'bat.gif',
|
'smile.png': [':)', ':-)'],
|
||||||
':[': 'bat.gif',
|
'coolglasses.png': ['B-)', '(H)'],
|
||||||
'(ci)': 'cigarette.gif',
|
'wink.gif': [';)', ';-)'],
|
||||||
'(^)': 'cake.gif',
|
'biggrin.png': [':D', ':-D', ':>', ':->', 'xD'],
|
||||||
":'(": 'cry.gif',
|
'unhappy.png': [':(', ':-('],
|
||||||
';(': 'cry.gif',
|
'cry.gif': [":'(", ';-(', ';(', ";'-("],
|
||||||
':^)': 'dontknow.gif',
|
'frowning.png': [':/', ':-/', ':S', ':-S'],
|
||||||
'8-)': 'eyeroll.gif',
|
'blush.png': [':$', ':-$'],
|
||||||
'(li)': 'lightning.gif',
|
'angry.png': [':@', ':-@'],
|
||||||
'<:o)': 'party.gif',
|
'bat.gif': [':[', ':-['],
|
||||||
'|-)': 'sleepy.gif',
|
'kiss.png': [':*', ':-*', '(K)'],
|
||||||
'*-)': 'think.gif',
|
'stare.png': [':|', ':-|'],
|
||||||
';)': 'wink.gif',
|
'devil.png': ['>:)', '>:-)', '(6)'],
|
||||||
';-)': 'wink.gif',
|
'tongue.png': [':P', ':-P'],
|
||||||
# now static (only those that don't have animated)
|
'oh.png': [':O', ':-O'],
|
||||||
':-)': 'smile.png',
|
'heart.png': ['<3', '(L)'],
|
||||||
'(@)': 'pussy.png',
|
'pussy.png': ['(@)'],
|
||||||
'8)': 'coolglasses.png',
|
'cuffs.png': ['(%)'],
|
||||||
':(': 'unhappy.png',
|
'moon.png': ['(S)'],
|
||||||
':)': 'smile.png',
|
'lamp.png': ['(I)'],
|
||||||
':/': 'frowning.png',
|
'music.png': ['(8)'],
|
||||||
':-/': 'frowning.png',
|
'beer.png': ['(B)'],
|
||||||
'(})': 'hugleft.png',
|
'brflower.png': ['(W)'],
|
||||||
':$': 'blush.png',
|
'boy.png': ['(Z)'],
|
||||||
'(Y)': 'thumbup.png',
|
'girl.png': ['(X)'],
|
||||||
':-@': 'angry.png',
|
'mail.png': ['(E)'],
|
||||||
':-D': 'biggrin.png',
|
'thumbdown.png': ['(N)'],
|
||||||
'(U)': 'brheart.png',
|
'photo.png': ['(P)'],
|
||||||
'(F)': 'flower.png',
|
'thumbup.png': ['(Y)'],
|
||||||
':>': 'biggrin.png',
|
'hugleft.png': ['(})'],
|
||||||
'(T)': 'phone.png',
|
'brheart.png': ['(U)'],
|
||||||
':-S': 'frowning.png',
|
'flower.png': ['(F)'],
|
||||||
':-P': 'tongue.png',
|
'drink.png': ['(D)'],
|
||||||
'(H)': 'coolglasses.png',
|
'phone.png': ['(T)'],
|
||||||
'(D)': 'drink.png',
|
'coffee.png': ['(C)'],
|
||||||
':-O': 'oh.png',
|
'hugright.png': ['({)'],
|
||||||
'(C)': 'coffee.png',
|
'star.png': ['(*)'],
|
||||||
'({)': 'hugright.png',
|
'rainbow.png': ['(R)'],
|
||||||
'(*)': 'star.png',
|
'cigarette.gif': ['(ci)'],
|
||||||
'B-)': 'coolglasses.png',
|
'cake.gif': ['(^)'],
|
||||||
'(Z)': 'boy.png',
|
'dontknow.gif': [':^)'],
|
||||||
'(X)': 'girl.png',
|
'eyeroll.gif': ['8-)'],
|
||||||
'(E)': 'mail.png',
|
'lightning.gif': ['(li)'],
|
||||||
'(N)': 'thumbdown.png',
|
'party.gif': ['<:o)'],
|
||||||
'(P)': 'photo.png',
|
'sleepy.gif': ['|-)'],
|
||||||
'(K)': 'kiss.png',
|
'think.gif': ['*-)'],
|
||||||
':-*': 'kiss.png',
|
|
||||||
':*': 'kiss.png',
|
|
||||||
'(R)': 'rainbow.png',
|
|
||||||
':-|': 'stare.png',
|
|
||||||
'(6)': 'devil.png',
|
|
||||||
'>:)': 'devil.png',
|
|
||||||
'>:-)': 'devil.png',
|
|
||||||
'(L)': 'heart.png',
|
|
||||||
'<3': 'heart.png',
|
|
||||||
'(W)': 'brflower.png',
|
|
||||||
':|': 'stare.png',
|
|
||||||
':O': 'oh.png',
|
|
||||||
':S': 'frowning.png',
|
|
||||||
':-(': 'unhappy.png',
|
|
||||||
'8-)': 'coolglasses.png',
|
|
||||||
'(B)': 'beer.png',
|
|
||||||
':D': 'biggrin.png',
|
|
||||||
'(8)': 'music.png',
|
|
||||||
':@': 'angry.png',
|
|
||||||
'B)': 'coolglasses.png',
|
|
||||||
':-$': 'blush.png',
|
|
||||||
':->': 'biggrin.png',
|
|
||||||
'(I)': 'lamp.png',
|
|
||||||
':P': 'tongue.png',
|
|
||||||
'(%)': 'cuffs.png',
|
|
||||||
'(S)': 'moon.png',
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,89 +1,42 @@
|
||||||
# coding=utf-8
|
# coding=utf-8
|
||||||
emoticons = {
|
emoticons = {
|
||||||
':-)': 'smile.png',
|
'smile.png': [':)', ':-)'],
|
||||||
':)': 'smile.png',
|
'coolglasses.png': ['8-)', 'B-)', '(H)'],
|
||||||
#
|
'wink.png': [';)', ';-)'],
|
||||||
'B-)': 'coolglasses.png',
|
'biggrin.png': [':D', ':-D', ':>', ':->', 'xD'],
|
||||||
'8-)': 'coolglasses.png',
|
'unhappy.png': [':(', ':-('],
|
||||||
#
|
'cry.png': [":'(", ';-(', ';(', ";'-("],
|
||||||
';-)': 'wink.png',
|
'frowning.png': [':/', ':-/', ':S', ':-S'],
|
||||||
';)': 'wink.png',
|
'blush.png': [':$', ':-$'],
|
||||||
#
|
'angry.png': [':@', ':-@'],
|
||||||
':-D': 'biggrin.png',
|
'bat.png': [':[', ':-['],
|
||||||
':->': 'biggrin.png',
|
'kiss.png': [':*', ':-*', '(K)'],
|
||||||
':D': 'biggrin.png',
|
'stare.png': [':|', ':-|'],
|
||||||
':>': 'biggrin.png',
|
'devil.png': ['>:)', '>:-)', '(6)'],
|
||||||
'xD': 'biggrin.png',
|
'tongue.png': [':P', ':-P'],
|
||||||
#
|
'oh.png': [':O', ':-O'],
|
||||||
':-(': 'unhappy.png',
|
'heart.png': ['<3', '(L)'],
|
||||||
':(': 'unhappy.png',
|
'lion.png': [':3', '>:3'],
|
||||||
#
|
'pussy.png': ['(@)'],
|
||||||
":'(": 'cry.png',
|
'cuffs.png': ['(%)'],
|
||||||
';-(': 'cry.png',
|
'moon.png': ['(S)'],
|
||||||
';(': 'cry.png',
|
'lamp.png': ['(I)'],
|
||||||
";'-(": 'cry.png',
|
'music.png': ['(8)'],
|
||||||
#
|
'beer.png': ['(B)'],
|
||||||
':-/': 'frowning.png',
|
'brflower.png': ['(W)'],
|
||||||
':/': 'frowning.png',
|
'boy.png': ['(Z)'],
|
||||||
':-S': 'frowning.png',
|
'girl.png': ['(X)'],
|
||||||
':S': 'frowning.png',
|
'mail.png': ['(E)'],
|
||||||
#
|
'thumbdown.png': ['(N)'],
|
||||||
':-$': 'blush.png',
|
'photo.png': ['(P)'],
|
||||||
':$': 'blush.png',
|
'thumbup.png': ['(Y)'],
|
||||||
#
|
'hugleft.png': ['(})'],
|
||||||
':-@': 'angry.png',
|
'brheart.png': ['(U)'],
|
||||||
':@': 'angry.png',
|
'flower.png': ['(F)'],
|
||||||
#
|
'drink.png': ['(D)'],
|
||||||
':-[': 'bat.png',
|
'phone.png': ['(T)'],
|
||||||
#
|
'coffee.png': ['(C)'],
|
||||||
':-*': 'kiss.png',
|
'hugright.png': ['({)'],
|
||||||
':*': 'kiss.png',
|
'star.png': ['(*)'],
|
||||||
#
|
'rainbow.png': ['(R)'],
|
||||||
':-|': 'stare.png',
|
|
||||||
':|': 'stare.png',
|
|
||||||
#
|
|
||||||
'>:-)': 'devil.png',
|
|
||||||
'>:)': 'devil.png',
|
|
||||||
#
|
|
||||||
':-P': 'tongue.png',
|
|
||||||
':P': 'tongue.png',
|
|
||||||
#
|
|
||||||
':-O': 'oh.png',
|
|
||||||
':O': 'oh.png',
|
|
||||||
#
|
|
||||||
'<3': 'heart.png',
|
|
||||||
#
|
|
||||||
':-[': 'bat.png',
|
|
||||||
':[': 'bat.png',
|
|
||||||
#
|
|
||||||
'>:3': 'lion.png',
|
|
||||||
':3': 'lion.png',
|
|
||||||
#
|
|
||||||
#MSN ones
|
|
||||||
'(@)': 'pussy.png',
|
|
||||||
'(%)': 'cuffs.png',
|
|
||||||
'(S)': 'moon.png',
|
|
||||||
'(I)': 'lamp.png',
|
|
||||||
'(8)': 'music.png',
|
|
||||||
'(B)': 'beer.png',
|
|
||||||
'(L)': 'heart.png',
|
|
||||||
'(6)': 'devil.png',
|
|
||||||
'(W)': 'brflower.png',
|
|
||||||
'(Z)': 'boy.png',
|
|
||||||
'(X)': 'girl.png',
|
|
||||||
'(E)': 'mail.png',
|
|
||||||
'(N)': 'thumbdown.png',
|
|
||||||
'(P)': 'photo.png',
|
|
||||||
'(K)': 'kiss.png',
|
|
||||||
'(Y)': 'thumbup.png',
|
|
||||||
'(})': 'hugleft.png',
|
|
||||||
'(U)': 'brheart.png',
|
|
||||||
'(F)': 'flower.png',
|
|
||||||
'(H)': 'coolglasses.png',
|
|
||||||
'(D)': 'drink.png',
|
|
||||||
'(T)': 'phone.png',
|
|
||||||
'(C)': 'coffee.png',
|
|
||||||
'({)': 'hugright.png',
|
|
||||||
'(*)': 'star.png',
|
|
||||||
'(R)': 'rainbow.png',
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,89 +1,42 @@
|
||||||
# coding=utf-8
|
# coding=utf-8
|
||||||
emoticons = {
|
emoticons = {
|
||||||
':-)': 'smile.png',
|
'smile.png': [':)', ':-)'],
|
||||||
':)': 'smile.png',
|
'coolglasses.png': ['8-)', 'B-)', '(H)'],
|
||||||
#
|
'wink.png': [';)', ';-)'],
|
||||||
'B-)': 'coolglasses.png',
|
'biggrin.png': [':D', ':-D', ':>', ':->', 'xD'],
|
||||||
'8-)': 'coolglasses.png',
|
'unhappy.png': [':(', ':-('],
|
||||||
#
|
'cry.png': [":'(", ';-(', ';(', ";'-("],
|
||||||
';-)': 'wink.png',
|
'frowning.png': [':/', ':-/', ':S', ':-S'],
|
||||||
';)': 'wink.png',
|
'blush.png': [':$', ':-$'],
|
||||||
#
|
'angry.png': [':@', ':-@'],
|
||||||
':-D': 'biggrin.png',
|
'bat.png': [':[', ':-['],
|
||||||
':->': 'biggrin.png',
|
'kiss.png': [':*', ':-*', '(K)'],
|
||||||
':D': 'biggrin.png',
|
'stare.png': [':|', ':-|'],
|
||||||
':>': 'biggrin.png',
|
'devil.png': ['>:)', '>:-)', '(6)'],
|
||||||
'xD': 'biggrin.png',
|
'tongue.png': [':P', ':-P'],
|
||||||
#
|
'oh.png': [':O', ':-O'],
|
||||||
':-(': 'unhappy.png',
|
'heart.png': ['<3', '(L)'],
|
||||||
':(': 'unhappy.png',
|
'lion.png': [':3', '>:3'],
|
||||||
#
|
'pussy.png': ['(@)'],
|
||||||
":'(": 'cry.png',
|
'cuffs.png': ['(%)'],
|
||||||
';-(': 'cry.png',
|
'moon.png': ['(S)'],
|
||||||
';(': 'cry.png',
|
'lamp.png': ['(I)'],
|
||||||
";'-(": 'cry.png',
|
'music.png': ['(8)'],
|
||||||
#
|
'beer.png': ['(B)'],
|
||||||
':-/': 'frowning.png',
|
'brflower.png': ['(W)'],
|
||||||
':/': 'frowning.png',
|
'boy.png': ['(Z)'],
|
||||||
':-S': 'frowning.png',
|
'girl.png': ['(X)'],
|
||||||
':S': 'frowning.png',
|
'mail.png': ['(E)'],
|
||||||
#
|
'thumbdown.png': ['(N)'],
|
||||||
':-$': 'blush.png',
|
'photo.png': ['(P)'],
|
||||||
':$': 'blush.png',
|
'thumbup.png': ['(Y)'],
|
||||||
#
|
'hugleft.png': ['(})'],
|
||||||
':-@': 'angry.png',
|
'brheart.png': ['(U)'],
|
||||||
':@': 'angry.png',
|
'flower.png': ['(F)'],
|
||||||
#
|
'drink.png': ['(D)'],
|
||||||
':-[': 'bat.png',
|
'phone.png': ['(T)'],
|
||||||
#
|
'coffee.png': ['(C)'],
|
||||||
':-*': 'kiss.png',
|
'hugright.png': ['({)'],
|
||||||
':*': 'kiss.png',
|
'star.png': ['(*)'],
|
||||||
#
|
'rainbow.png': ['(R)'],
|
||||||
':-|': 'stare.png',
|
|
||||||
':|': 'stare.png',
|
|
||||||
#
|
|
||||||
'>:-)': 'devil.png',
|
|
||||||
'>:)': 'devil.png',
|
|
||||||
#
|
|
||||||
':-P': 'tongue.png',
|
|
||||||
':P': 'tongue.png',
|
|
||||||
#
|
|
||||||
':-O': 'oh.png',
|
|
||||||
':O': 'oh.png',
|
|
||||||
#
|
|
||||||
'<3': 'heart.png',
|
|
||||||
#
|
|
||||||
':-[': 'bat.png',
|
|
||||||
':[': 'bat.png',
|
|
||||||
#
|
|
||||||
'>:3': 'lion.png',
|
|
||||||
':3': 'lion.png',
|
|
||||||
#
|
|
||||||
#MSN ones
|
|
||||||
'(@)': 'pussy.png',
|
|
||||||
'(%)': 'cuffs.png',
|
|
||||||
'(S)': 'moon.png',
|
|
||||||
'(I)': 'lamp.png',
|
|
||||||
'(8)': 'music.png',
|
|
||||||
'(B)': 'beer.png',
|
|
||||||
'(L)': 'heart.png',
|
|
||||||
'(6)': 'devil.png',
|
|
||||||
'(W)': 'brflower.png',
|
|
||||||
'(Z)': 'boy.png',
|
|
||||||
'(X)': 'girl.png',
|
|
||||||
'(E)': 'mail.png',
|
|
||||||
'(N)': 'thumbdown.png',
|
|
||||||
'(P)': 'photo.png',
|
|
||||||
'(K)': 'kiss.png',
|
|
||||||
'(Y)': 'thumbup.png',
|
|
||||||
'(})': 'hugleft.png',
|
|
||||||
'(U)': 'brheart.png',
|
|
||||||
'(F)': 'flower.png',
|
|
||||||
'(H)': 'coolglasses.png',
|
|
||||||
'(D)': 'drink.png',
|
|
||||||
'(T)': 'phone.png',
|
|
||||||
'(C)': 'coffee.png',
|
|
||||||
'({)': 'hugright.png',
|
|
||||||
'(*)': 'star.png',
|
|
||||||
'(R)': 'rainbow.png',
|
|
||||||
}
|
}
|
||||||
|
|
23
src/gajim.py
23
src/gajim.py
|
@ -2562,19 +2562,20 @@ class Interface:
|
||||||
# we need to reload else that doesn't work when changing emoticon set
|
# we need to reload else that doesn't work when changing emoticon set
|
||||||
reload(emoticons)
|
reload(emoticons)
|
||||||
emots = emoticons.emoticons
|
emots = emoticons.emoticons
|
||||||
for emot in emots:
|
for emot_filename in emots:
|
||||||
emot_file = os.path.join(path, emots[emot])
|
emot_file = os.path.join(path, emot_filename)
|
||||||
emot = emot.decode('utf-8')
|
|
||||||
if not self.image_is_ok(emot_file):
|
if not self.image_is_ok(emot_file):
|
||||||
continue
|
continue
|
||||||
# This avoids duplicated emoticons with the same image eg. :) and :-)
|
for emot in emots[emot_filename]:
|
||||||
if not emot_file in self.emoticons.values():
|
emot = emot.decode('utf-8')
|
||||||
if emot_file.endswith('.gif'):
|
# This avoids duplicated emoticons with the same image eg. :) and :-)
|
||||||
pix = gtk.gdk.PixbufAnimation(emot_file)
|
if not emot_file in self.emoticons.values():
|
||||||
else:
|
if emot_file.endswith('.gif'):
|
||||||
pix = gtk.gdk.pixbuf_new_from_file(emot_file)
|
pix = gtk.gdk.PixbufAnimation(emot_file)
|
||||||
self.emoticons_images.append((emot, pix))
|
else:
|
||||||
self.emoticons[emot.upper()] = emot_file
|
pix = gtk.gdk.pixbuf_new_from_file(emot_file)
|
||||||
|
self.emoticons_images.append((emot, pix))
|
||||||
|
self.emoticons[emot.upper()] = emot_file
|
||||||
sys.path.remove(path)
|
sys.path.remove(path)
|
||||||
del emoticons
|
del emoticons
|
||||||
if self.emoticons_menu:
|
if self.emoticons_menu:
|
||||||
|
|
Loading…
Add table
Reference in a new issue