add and ACE option to enable negative priority. fixes #617

This commit is contained in:
Yann Leboulanger 2006-11-21 22:38:18 +00:00
parent e4a6d895ee
commit 38fea2a389
2 changed files with 6 additions and 2 deletions

View File

@ -219,6 +219,7 @@ class Config:
'gc_nicknames_colors': [ opt_str, '#a34526:#c000ff:#0012ff:#388a99:#38995d:#519938:#ff8a00:#94452d:#244b5a:#32645a', _('List of colors that will be used to color nicknames in group chats.'), True ],
'ctrl_tab_go_to_next_composing': [opt_bool, True, _('Ctrl-Tab go to next composing tab when none is unread.')],
'confirm_metacontacts': [ opt_str, '', _('Should we show the confirm metacontacts creation dialog or not? Empty string means we never show the dialog.')],
'enable_negative_priority': [ opt_bool, False, _('If True, you will be able to set a negative priority to your account in account modification window. BE CAREFULL, when you are logged in with a negative priority, you will NOT receive any message from your server.')],
}
__options_per_key = {

View File

@ -1220,8 +1220,11 @@ class AccountModificationWindow:
self.xml.get_widget('adjust_priority_with_status_checkbutton').set_active(
gajim.config.get_per('accounts', self.account,
'adjust_priority_with_status'))
self.xml.get_widget('priority_spinbutton').set_value(gajim.config.\
get_per('accounts', self.account, 'priority'))
spinbutton = self.xml.get_widget('priority_spinbutton')
if gajim.config.get('enable_negative_priority'):
spinbutton.set_range(-128, 127)
spinbutton.set_value(gajim.config.get_per('accounts', self.account,
'priority'))
usessl = gajim.config.get_per('accounts', self.account, 'usessl')
self.xml.get_widget('use_ssl_checkbutton').set_active(usessl)