From 38fea2a3890d027cda65dc9df78391a6990f6336 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Tue, 21 Nov 2006 22:38:18 +0000 Subject: [PATCH] add and ACE option to enable negative priority. fixes #617 --- src/common/config.py | 1 + src/config.py | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/common/config.py b/src/common/config.py index 12eaa9f2a..7f05f5264 100644 --- a/src/common/config.py +++ b/src/common/config.py @@ -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 = { diff --git a/src/config.py b/src/config.py index 2ab700f8b..c85e55a79 100644 --- a/src/config.py +++ b/src/config.py @@ -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)