diff options
author | Florent Le Coz <louiz@louiz.org> | 2011-09-11 03:29:27 +0200 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2011-09-11 03:29:27 +0200 |
commit | e84cbf6ba5b748881ea3f99471a39a8f1fde772a (patch) | |
tree | 070dd8f06ca24e75a4d15ef99433a1f94cb7774b /src | |
parent | 555b915669a7127302d2b992930f1721a8d0867c (diff) | |
download | poezio-e84cbf6ba5b748881ea3f99471a39a8f1fde772a.tar.gz poezio-e84cbf6ba5b748881ea3f99471a39a8f1fde772a.tar.bz2 poezio-e84cbf6ba5b748881ea3f99471a39a8f1fde772a.tar.xz poezio-e84cbf6ba5b748881ea3f99471a39a8f1fde772a.zip |
Make the roster tab shine when someone added you in her roster
Diffstat (limited to 'src')
-rw-r--r-- | src/core.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/core.py b/src/core.py index e25be58f..340cdf8a 100644 --- a/src/core.py +++ b/src/core.py @@ -656,7 +656,7 @@ class Core(object): roster.add_contact(contact, jid) roster.edit_groups_of_contact(contact, []) contact.set_ask('asked') - self.tabs[0].set_color_state(theme.COLOR_TAB_HIGHLIGHT) + self.get_tab_by_number(0).set_color_state(theme.COLOR_TAB_HIGHLIGHT) self.information('%s wants to subscribe to your presence'%jid, 'Roster') if isinstance(self.current_tab(), tabs.RosterInfoTab): self.refresh_window() @@ -758,6 +758,12 @@ class Core(object): return tab return None + def get_tab_by_number(self, number): + for tab in self.tabs: + if tab.nb == number: + return tab + return None + def get_room_by_name(self, name): """ returns the room that has this name |