Philipp Hörist pushed to branch master at gajim / gajim
Commits: 30997fa1 by Philipp Hörist at 2019-04-22T13:36:28Z Remove some useless settings
- - - - -
6 changed files:
- gajim/common/config.py - gajim/common/connection.py - gajim/common/modules/carbons.py - gajim/gtk/accounts.py - gajim/gtk/server_info.py - gajim/gui_interface.py
Changes:
===================================== gajim/common/config.py ===================================== @@ -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, ''],
===================================== gajim/common/connection.py ===================================== @@ -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:
===================================== gajim/common/modules/carbons.py ===================================== @@ -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):
===================================== gajim/gtk/accounts.py ===================================== @@ -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'), ]
===================================== gajim/gtk/server_info.py ===================================== @@ -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),
===================================== gajim/gui_interface.py ===================================== @@ -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')
View it on GitLab: https://dev.gajim.org/gajim/gajim/commit/30997fa1e4f4d5c656a991857f6353c07ad...