diff options
author | js <js-gajim@webkeks.org> | 2008-07-23 01:08:52 +0400 |
---|---|---|
committer | js <js-gajim@webkeks.org> | 2008-07-23 01:08:52 +0400 |
commit | c5e679a0783a586418001b22786c9a97a85221c5 (patch) | |
tree | 940ea391b5745b1aaaab2d6c4b5f9c217d00f2e1 /src/common | |
parent | 9ecf0e5fa96b32fdc5f5c439f7472f35c1009af7 (diff) |
Show mood in chat window.
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/config.py | 2 | ||||
-rw-r--r-- | src/common/configpaths.py | 4 | ||||
-rw-r--r-- | src/common/gajim.py | 1 | ||||
-rw-r--r-- | src/common/helpers.py | 6 | ||||
-rw-r--r-- | src/common/pep.py | 11 |
5 files changed, 22 insertions, 2 deletions
diff --git a/src/common/config.py b/src/common/config.py index a991046d6..7b5307a8c 100644 --- a/src/common/config.py +++ b/src/common/config.py @@ -51,6 +51,7 @@ opt_treat_incoming_messages = ['', 'chat', 'normal'] class Config: DEFAULT_ICONSET = 'dcraven' + DEFAULT_MOOD_ICONSET = 'default' if sys.platform == 'darwin': DEFAULT_OPENWITH = 'open' DEFAULT_BROWSER = 'open -a Safari' @@ -92,6 +93,7 @@ class Config: 'last_status_msg_offline': [ opt_str, '' ], 'trayicon': [ opt_bool, True, '', True ], 'iconset': [ opt_str, DEFAULT_ICONSET, '', True ], + 'mood_iconset': [ opt_str, DEFAULT_MOOD_ICONSET, '', True ], 'use_transports_iconsets': [ opt_bool, True, '', True ], 'inmsgcolor': [ opt_color, '#a34526', '', True ], 'outmsgcolor': [ opt_color, '#164e6f', '', True ], diff --git a/src/common/configpaths.py b/src/common/configpaths.py index 516d849ef..12215ce31 100644 --- a/src/common/configpaths.py +++ b/src/common/configpaths.py @@ -79,9 +79,9 @@ class ConfigPaths: # LOG is deprecated k = ( 'LOG', 'LOG_DB', 'VCARD', 'AVATAR', 'MY_EMOTS', - 'MY_ICONSETS', 'MY_CACERTS') + 'MY_ICONSETS', 'MY_MOOD_ICONSETS', 'MY_CACERTS') v = (u'logs', u'logs.db', u'vcards', u'avatars', u'emoticons', - u'iconsets', u'cacerts.pem') + u'iconsets', u'moods', u'cacerts.pem') if os.name == 'nt': v = map(lambda x: x.capitalize(), v) diff --git a/src/common/gajim.py b/src/common/gajim.py index bc9228f23..2bf00ceb8 100644 --- a/src/common/gajim.py +++ b/src/common/gajim.py @@ -81,6 +81,7 @@ VCARD_PATH = gajimpaths['VCARD'] AVATAR_PATH = gajimpaths['AVATAR'] MY_EMOTS_PATH = gajimpaths['MY_EMOTS'] MY_ICONSETS_PATH = gajimpaths['MY_ICONSETS'] +MY_MOOD_ICONSETS_PATH = gajimpaths['MY_MOOD_ICONSETS'] MY_CACERTS = gajimpaths['MY_CACERTS'] TMP = gajimpaths['TMP'] DATA_DIR = gajimpaths['DATA'] diff --git a/src/common/helpers.py b/src/common/helpers.py index 27ba1a093..26d54aa68 100644 --- a/src/common/helpers.py +++ b/src/common/helpers.py @@ -1179,6 +1179,12 @@ def get_iconset_path(iconset): elif os.path.isdir(os.path.join(gajim.MY_ICONSETS_PATH, iconset)): return os.path.join(gajim.MY_ICONSETS_PATH, iconset) +def get_mood_iconset_path(iconset): + if os.path.isdir(os.path.join(gajim.DATA_DIR, 'moods', iconset)): + return os.path.join(gajim.DATA_DIR, 'moods', iconset) + elif os.path.isdir(os.path.join(gajim.MY_MOOD_ICONSETS_PATH, iconset)): + return os.path.join(gajim.MY_MOOD_ICONSETS_PATH, iconset) + def get_transport_path(transport): if os.path.isdir(os.path.join(gajim.DATA_DIR, 'iconsets', 'transports', transport)): diff --git a/src/common/pep.py b/src/common/pep.py index c16d9a9ad..feb62e149 100644 --- a/src/common/pep.py +++ b/src/common/pep.py @@ -1,5 +1,16 @@ from common import gajim, xmpp +MOODS = ['None', 'afraid', 'amazed', 'angry', 'annoyed', 'anxious', 'aroused', + 'ashamed', 'bored', 'brave', 'calm', 'cold', 'confused', 'contented', + 'cranky', 'curious', 'depressed', 'disappointed', 'disgusted', + 'distracted', 'embarrassed', 'excited', 'flirtatious', 'frustrated', + 'grumpy', 'guilty', 'happy', 'hot', 'humbled', 'humiliated', 'hungry', + 'hurt', 'impressed', 'in_awe', 'in_love', 'indignant', 'interested', + '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'] + def user_mood(items, name, jid): has_child = False retract = False |