we can now disable the use of transports iconsets

This commit is contained in:
Yann Leboulanger 2005-05-25 17:13:50 +00:00
parent 9952c4dc64
commit e871c22772
4 changed files with 31 additions and 1 deletions

View File

@ -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' ],

View File

@ -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)

View File

@ -3142,6 +3142,27 @@
<property name="fill">True</property>
</packing>
</child>
<child>
<widget class="GtkCheckButton" id="transports_iconsets_checkbutton">
<property name="visible">True</property>
<property name="tooltip" translatable="yes">If checked, Gajim will show contacts from other protocols with icons specific to this transport.</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Use _transports iconsets</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
<property name="active">False</property>
<property name="inconsistent">False</property>
<property name="draw_indicator">True</property>
<signal name="toggled" handler="on_transports_iconsets_checkbutton_toggled" last_modification_time="Wed, 25 May 2005 17:03:55 GMT"/>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>

View File

@ -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]