* Fix a TB with unknown moods
* Add the 'thoughtful' mood in the Gajim namespace (trying to get it in the XEP!)
This commit is contained in:
parent
ec82268bdf
commit
6dfa9c7e35
|
@ -9,7 +9,11 @@ MOODS = ['afraid', 'amazed', 'angry', 'annoyed', 'anxious', 'aroused',
|
|||
'intoxicated', 'invincible', 'jealous', 'lonely', 'mean', 'moody',
|
||||
'nervous', 'neutral', 'offended', 'playful', 'proud', 'relieved',
|
||||
'remorseful', 'restless', 'sad', 'sarcastic', 'serious', 'shocked',
|
||||
'shy', 'sick', 'sleepy', 'stressed', 'surprised', 'thirsty', 'worried']
|
||||
'shy', 'sick', 'sleepy', 'stressed', 'surprised', 'thirsty',
|
||||
'thoughtful', 'worried']
|
||||
|
||||
# These moods are only available in the Gajim namespace
|
||||
GAJIM_MOODS = ['thoughtful']
|
||||
|
||||
ACTIVITIES = {
|
||||
'doing_chores': {'category': _('Doing Chores'),
|
||||
|
@ -371,7 +375,8 @@ def user_send_mood(account, mood, message = ''):
|
|||
return
|
||||
item = xmpp.Node('mood', {'xmlns': xmpp.NS_MOOD})
|
||||
if mood != '':
|
||||
item.addChild(mood)
|
||||
item.addChild(mood, namespace = 'http://gajim.org/moods' \
|
||||
if mood in GAJIM_MOODS else None)
|
||||
if message != '':
|
||||
i = item.addChild('text')
|
||||
i.addData(message)
|
||||
|
|
|
@ -1240,7 +1240,7 @@ class RosterWindow:
|
|||
pixbuf = gtkgui_helpers.load_mood_icon(
|
||||
contact.mood['mood']).get_pixbuf()
|
||||
elif contact.mood.has_key('mood'):
|
||||
pixbuf = gtkgui_helpers.load_mood_image(
|
||||
pixbuf = gtkgui_helpers.load_mood_icon(
|
||||
'unknown').get_pixbuf()
|
||||
else:
|
||||
pixbuf = None
|
||||
|
|
Loading…
Reference in New Issue