summaryrefslogtreecommitdiff
path: root/src/windows.py
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2013-03-12 16:12:47 +0100
committermathieui <mathieui@mathieui.net>2013-03-12 16:12:47 +0100
commitd797b1fd65ba73c48e1933cc8042db0cc548094a (patch)
treed53c18b406f18c236ccee7b72ab71d57d2d5b35c /src/windows.py
parentcec1151ecb577a270b9e1f0ae5eaa238d3269ae8 (diff)
downloadpoezio-d797b1fd65ba73c48e1933cc8042db0cc548094a.tar.gz
poezio-d797b1fd65ba73c48e1933cc8042db0cc548094a.tar.bz2
poezio-d797b1fd65ba73c48e1933cc8042db0cc548094a.tar.xz
poezio-d797b1fd65ba73c48e1933cc8042db0cc548094a.zip
Implement user gaming (xep-0196)
- configuration options - theming options - /gaming
Diffstat (limited to 'src/windows.py')
-rw-r--r--src/windows.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/windows.py b/src/windows.py
index c4927a6d..0916cadb 100644
--- a/src/windows.py
+++ b/src/windows.py
@@ -1942,6 +1942,8 @@ class RosterWin(Win):
added += len(get_theme().CHAR_ROSTER_MOOD)
if contact.activity:
added += len(get_theme().CHAR_ROSTER_ACTIVITY)
+ if contact.gaming:
+ added += len(get_theme().CHAR_ROSTER_GAMING)
if config.getl('show_roster_jids', 'true') == 'false' and contact.name:
display_name = '%s' % contact.name
@@ -1966,6 +1968,8 @@ class RosterWin(Win):
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))
+ if contact.gaming:
+ self.addstr(get_theme().CHAR_ROSTER_GAMING, to_curses_attr(get_theme().COLOR_ROSTER_GAMING))
self.finish_line()
def draw_resource_line(self, y, resource, colored):
@@ -2033,14 +2037,22 @@ class ContactInfoWin(Win):
if contact.tune:
self.addstr(i, 0, 'Current Tune: %s' % common.format_tune_string(contact.tune), to_curses_attr(get_theme().COLOR_NORMAL_TEXT))
+ self.finish_line()
i += 1
if contact.mood:
self.addstr(i, 0, 'Mood: %s' % contact.mood, to_curses_attr(get_theme().COLOR_NORMAL_TEXT))
+ self.finish_line()
i += 1
if contact.activity:
self.addstr(i, 0, 'Activity: %s' % contact.activity, to_curses_attr(get_theme().COLOR_NORMAL_TEXT))
+ self.finish_line()
+ i += 1
+
+ if contact.gaming:
+ self.addstr(i, 0, 'Game: %s on %s' % (contact.gaming['name'], contact.gamin['server_address']), to_curses_attr(get_theme().COLOR_NORMAL_TEXT))
+ self.finish_line()
i += 1
def draw_group_info(self, group):