Remove some useless settings

This commit is contained in:
Philipp Hörist 2019-04-22 15:36:19 +02:00
parent b306a7e05f
commit 30997fa1e4
6 changed files with 8 additions and 40 deletions

View File

@ -319,7 +319,6 @@ class Config:
'autoconnect': [opt_bool, False, '', True],
'autoconnect_as': [opt_str, 'online', _('Status used to autoconnect as. Can be online, chat, away, xa, dnd, invisible. NOTE: this option is used only if restore_last_status is disabled'), True],
'restore_last_status': [opt_bool, False, _('If enabled, restore the last status that was used.')],
'autoreconnect': [opt_bool, True],
'autoauth': [opt_bool, False, _('If true, Contacts requesting authorization will be automatically accepted.')],
'active': [opt_bool, True, _('If False, this account will be disabled and will not appear in roster window.'), True],
'proxy': [opt_str, '', '', True],
@ -339,7 +338,6 @@ class Config:
'custom_host': [opt_str, '', '', True],
'sync_with_global_status': [opt_bool, False, ],
'no_log_for': [opt_str, '', _('Space separated list of JIDs for which you do not want to store logs. You can also add account name to log nothing for this account.')],
'sync_logs_with_server': [opt_bool, True, _('On startup, Gajim will download logs stored on server, provided the server supports XEP-0313')],
'allow_no_log_for': [opt_str, '', _('Space separated list of JIDs for which you accept to not log conversations if he does not want to.')],
'attached_gpg_keys': [opt_str, ''],
'keep_alives_enabled': [opt_bool, True, _('Whitespace sent after inactivity')],
@ -383,7 +381,6 @@ class Config:
'send_idle_time': [opt_bool, True],
'roster_version': [opt_str, ''],
'subscription_request_msg': [opt_str, '', _('Message that is sent to contacts you want to add')],
'enable_message_carbons': [opt_bool, True, _('If enabled and if server supports this feature, Gajim will receive messages sent and received by other resources.')],
'ft_send_local_ips': [opt_bool, True, _('If enabled, Gajim will send your local IPs so your contact can connect to your machine to transfer files.')],
'opened_chat_controls': [opt_str, '', _('Space separated list of JIDs for which chat window will be re-opened on next startup.')],
'recent_groupchats': [opt_str, ''],

View File

@ -586,10 +586,6 @@ class Connection(CommonConnection, ConnectionHandlers):
# Clear disconnect handlers
self.connection.disconnect_handlers = []
if reconnect:
reconnect = app.config.get_per(
'accounts', self.name, 'autoreconnect')
log.info('Disconnect %s, reconnect: %s', self.name, reconnect)
if reconnect:

View File

@ -16,7 +16,6 @@
import nbxmpp
from gajim.common import app
from gajim.common.modules.base import BaseModule
@ -33,14 +32,11 @@ class Carbons(BaseModule):
self.supported = True
self._log.info('Discovered carbons: %s', from_)
if app.config.get_per('accounts', self._account,
'enable_message_carbons'):
iq = nbxmpp.Iq('set')
iq.setTag('enable', namespace=nbxmpp.NS_CARBONS)
self._log.info('Activate')
self._con.connection.send(iq)
else:
self._log.warning('Carbons deactivated (user setting)')
iq = nbxmpp.Iq('set')
iq.setTag('enable', namespace=nbxmpp.NS_CARBONS)
self._log.info('Activate')
self._con.connection.send(iq)
def get_instance(*args, **kwargs):

View File

@ -753,29 +753,15 @@ class GeneralPage(GenericSettingPage):
Setting(SettingKind.SWITCH, _('Connect on startup'),
SettingType.ACCOUNT_CONFIG, 'autoconnect'),
Setting(SettingKind.SWITCH, _('Reconnect when connection is lost'),
SettingType.ACCOUNT_CONFIG, 'autoreconnect'),
Setting(SettingKind.SWITCH,
_('Save conversations for all contacts'),
SettingType.ACCOUNT_CONFIG, 'no_log_for',
desc=_('Store conversations on the harddrive')),
Setting(SettingKind.SWITCH, _('Server Message Archive'),
SettingType.ACCOUNT_CONFIG, 'sync_logs_with_server',
desc=_('Messages get stored on the server. '
'The archive is used to sync messages '
'between multiple devices. (XEP-0313)')),
Setting(SettingKind.SWITCH, _('Global Status'),
SettingType.ACCOUNT_CONFIG, 'sync_with_global_status',
desc=_('Synchronise the status of all accounts')),
Setting(SettingKind.SWITCH, _('Message Carbons'),
SettingType.ACCOUNT_CONFIG, 'enable_message_carbons',
desc=_('All your other online devices get copies '
'of sent and received messages. XEP-0280')),
Setting(SettingKind.SWITCH, _('Use file transfer proxies'),
SettingType.ACCOUNT_CONFIG, 'use_ft_proxies'),
]

View File

@ -160,11 +160,6 @@ class ServerInfoDialog(Gtk.Dialog):
Feature = namedtuple('Feature',
['name', 'available', 'tooltip', 'enabled'])
carbons_enabled = app.config.get_per('accounts', self.account,
'enable_message_carbons')
mam_enabled = app.config.get_per('accounts', self.account,
'sync_logs_with_server')
return [
Feature('XEP-0016: Privacy Lists',
con.get_module('PrivacyLists').supported, '', None),
@ -185,11 +180,10 @@ class ServerInfoDialog(Gtk.Dialog):
nbxmpp.NS_SECLABEL, None),
Feature('XEP-0280: Message Carbons',
con.get_module('Carbons').supported,
nbxmpp.NS_CARBONS, carbons_enabled),
nbxmpp.NS_CARBONS, None),
Feature('XEP-0313: Message Archive Management',
con.get_module('MAM').archiving_namespace,
con.get_module('MAM').archiving_namespace,
mam_enabled),
con.get_module('MAM').archiving_namespace, None),
Feature('XEP-0363: HTTP File Upload',
con.get_module('HTTPUpload').available,
con.get_module('HTTPUpload').httpupload_namespace, None),

View File

@ -935,8 +935,7 @@ class Interface:
# Else disable autoaway
app.sleeper_state[account] = 'off'
if obj.conn.get_module('MAM').available and app.config.get_per('accounts',
account, 'sync_logs_with_server'):
if obj.conn.get_module('MAM').available:
obj.conn.get_module('MAM').request_archive_on_signin()
invisible_show = app.SHOW_LIST.index('invisible')