diff options
author | mathieui <mathieui@mathieui.net> | 2013-03-11 23:06:52 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2013-03-11 23:06:52 +0100 |
commit | cec1151ecb577a270b9e1f0ae5eaa238d3269ae8 (patch) | |
tree | dad224100ca67d09301d6d2fc3d64b958b7acc54 /src/windows.py | |
parent | d2d04162146e6df454d67a4e48ee6655af1d6c0a (diff) | |
download | poezio-cec1151ecb577a270b9e1f0ae5eaa238d3269ae8.tar.gz poezio-cec1151ecb577a270b9e1f0ae5eaa238d3269ae8.tar.bz2 poezio-cec1151ecb577a270b9e1f0ae5eaa238d3269ae8.tar.xz poezio-cec1151ecb577a270b9e1f0ae5eaa238d3269ae8.zip |
Fix #1839 (User mood/activity)
- Added as always new theming variables:
CHAR_ROSTER_MOOD, CHAR_ROSTER_ACTIVITY (a SNOWMAN!)
COLOR_ROSTER_MOOD, COLOR_ROSTER_ACTIVITY
- Added two new notification types in Theme.INFO_COLORS (mood/activity)
- Added new configuration options:
display_mood/activity/tune_notifications (those can be set for a
specific JID)
enable_user_tune/nick/activity/mood
- Added /activity and /mood commands, with completions
- Moved the old /activity to /last_activity
- Details are show in the ContactInfoWin if there is room, or with "i"
on a contact in the roster.
Diffstat (limited to 'src/windows.py')
-rw-r--r-- | src/windows.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/windows.py b/src/windows.py index 78b3c5e5..c4927a6d 100644 --- a/src/windows.py +++ b/src/windows.py @@ -1938,6 +1938,10 @@ class RosterWin(Win): added += len(get_theme().CHAR_ROSTER_ERROR) if contact.tune: added += len(get_theme().CHAR_ROSTER_TUNE) + if contact.mood: + added += len(get_theme().CHAR_ROSTER_MOOD) + if contact.activity: + added += len(get_theme().CHAR_ROSTER_ACTIVITY) if config.getl('show_roster_jids', 'true') == 'false' and contact.name: display_name = '%s' % contact.name @@ -1958,7 +1962,10 @@ class RosterWin(Win): self.addstr(get_theme().CHAR_ROSTER_ERROR, to_curses_attr(get_theme().COLOR_ROSTER_ERROR)) if contact.tune: self.addstr(get_theme().CHAR_ROSTER_TUNE, to_curses_attr(get_theme().COLOR_ROSTER_TUNE)) - + if contact.activity: + self.addstr(get_theme().CHAR_ROSTER_ACTIVITY, to_curses_attr(get_theme().COLOR_ROSTER_ACTIVITY)) + if contact.mood: + self.addstr(get_theme().CHAR_ROSTER_MOOD, to_curses_attr(get_theme().COLOR_ROSTER_MOOD)) self.finish_line() def draw_resource_line(self, y, resource, colored): @@ -2028,6 +2035,14 @@ class ContactInfoWin(Win): self.addstr(i, 0, 'Current Tune: %s' % common.format_tune_string(contact.tune), to_curses_attr(get_theme().COLOR_NORMAL_TEXT)) i += 1 + if contact.mood: + self.addstr(i, 0, 'Mood: %s' % contact.mood, to_curses_attr(get_theme().COLOR_NORMAL_TEXT)) + i += 1 + + if contact.activity: + self.addstr(i, 0, 'Activity: %s' % contact.activity, to_curses_attr(get_theme().COLOR_NORMAL_TEXT)) + i += 1 + def draw_group_info(self, group): """ draw the group information |