From e871c227723c19986759b6d8270a422bb7bece57 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Wed, 25 May 2005 17:13:50 +0000 Subject: [PATCH] we can now disable the use of transports iconsets --- src/common/config.py | 1 + src/config.py | 8 ++++++++ src/gtkgui.glade | 21 +++++++++++++++++++++ src/roster_window.py | 2 +- 4 files changed, 31 insertions(+), 1 deletion(-) diff --git a/src/common/config.py b/src/common/config.py index fe8940acd..807f58dbd 100644 --- a/src/common/config.py +++ b/src/common/config.py @@ -55,6 +55,7 @@ class Config: 'last_status_msg': [ opt_str, '' ], 'trayicon': [ opt_bool, True ], 'iconset': [ opt_str, 'sun' ], + 'use_transports_iconsets': [ opt_bool, True ], 'inmsgcolor': [ opt_color, '#ff0000' ], 'outmsgcolor': [ opt_color, '#0000ff' ], 'statusmsgcolor': [ opt_color, '#1eaa1e' ], diff --git a/src/config.py b/src/config.py index 803bf9022..5f64d4739 100644 --- a/src/config.py +++ b/src/config.py @@ -121,6 +121,10 @@ class Preferences_window: if gajim.config.get('iconset') == l[i]: self.iconset_combobox.set_active(i) + # Use transports iconsets + st = gajim.config.get('use_transports_iconsets') + self.xml.get_widget('transports_iconsets_checkbutton').set_active(st) + # Roster colors / font self.theme_default = { 'green': { @@ -425,6 +429,10 @@ class Preferences_window: self.plugin.roster.reload_jabber_state_images() self.plugin.save_config() + def on_transports_iconsets_checkbutton_toggled(self, widget): + self.on_checkbutton_toggled(widget, 'use_transports_iconsets') + self.plugin.roster.draw_roster() + def on_roster_widget_color_set(self, widget, text): color = widget.get_color() color_string = mk_color_string(color) diff --git a/src/gtkgui.glade b/src/gtkgui.glade index 4b9460ab5..776212c49 100644 --- a/src/gtkgui.glade +++ b/src/gtkgui.glade @@ -3142,6 +3142,27 @@ True + + + + True + If checked, Gajim will show contacts from other protocols with icons specific to this transport. + True + Use _transports iconsets + True + GTK_RELIEF_NORMAL + True + False + False + True + + + + 0 + True + True + + 0 diff --git a/src/roster_window.py b/src/roster_window.py index c19b6bc5e..4f1841c6a 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -181,7 +181,7 @@ class Roster_window: def get_appropriate_state_images(self, jid): '''check jid and return the appropriate state images dict''' - if not jid: + if not jid or not gajim.config.get('use_transports_iconsets'): return self.jabber_state_images host = jid.split('@')[-1]