diff --git a/roster_tweaks/config_dialog.ui b/roster_tweaks/config_dialog.ui index ea82765..53cd5b6 100644 --- a/roster_tweaks/config_dialog.ui +++ b/roster_tweaks/config_dialog.ui @@ -51,6 +51,20 @@ 2 + + + Always show contacts status substrings + True + True + False + True + + + + False + 3 + + diff --git a/roster_tweaks/roster_tweaks.py b/roster_tweaks/roster_tweaks.py index 794bf7a..5746947 100644 --- a/roster_tweaks/roster_tweaks.py +++ b/roster_tweaks/roster_tweaks.py @@ -27,11 +27,31 @@ class RosterTweaksPlugin(GajimPlugin): self.config_default_values = {'hide_status_combo': (False, ''), 'use_ctr_m': (False, ''), 'menu_visible': (True, ''), - 'quick_status': (False, '')} + 'quick_status': (False, ''), + 'contact_status_subs': (False, ''),} self.events_handlers = {'our-show': (ged.GUI2, self.our_show), 'pep-received': (ged.GUI2, self.pep_received)} + self.gui_extension_points = { + 'roster_draw_contact': (self.roster_draw_contact, + self.disconnect_roster_draw_contact),} self.roster = gajim.interface.roster + def roster_draw_contact(self, roster,jid, account, contact): + if not self.active: + return + if not self.config['contact_status_subs']: + return + child_iters = roster._get_contact_iter(jid, account, contact, + roster.model) + if not child_iters: + return + name = roster.model[child_iters[0]][1] + if '\n