From d797b1fd65ba73c48e1933cc8042db0cc548094a Mon Sep 17 00:00:00 2001 From: mathieui Date: Tue, 12 Mar 2013 16:12:47 +0100 Subject: Implement user gaming (xep-0196) - configuration options - theming options - /gaming --- src/windows.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/windows.py') 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): -- cgit v1.2.3