From 8a2526833ec5be7f4b4cd25c4edfd1b086cab02e Mon Sep 17 00:00:00 2001 From: Denis Fomin Date: Wed, 22 Aug 2012 23:52:13 +0400 Subject: RosterTweaksPlugin. Added ability align the height of contacts in roster.(always show contact status) --- roster_tweaks/config_dialog.ui | 14 ++++++++++++++ roster_tweaks/roster_tweaks.py | 29 ++++++++++++++++++++++++++++- 2 files changed, 42 insertions(+), 1 deletion(-) (limited to 'roster_tweaks') 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