Philipp Hörist pushed to branch master at gajim / gajim
Commits: 720b0c50 by lovetox at 2020-03-22T18:49:43+01:00 Add license to gstreamer module
- - - - - b32e8ca7 by lovetox at 2020-03-22T19:40:40+01:00 Accounts: Add connection type setting for custom host
- - - - -
4 changed files:
- gajim/common/config.py - gajim/common/helpers.py - gajim/gtk/accounts.py - gajim/gtk/gstreamer.py
Changes:
===================================== gajim/common/config.py ===================================== @@ -308,6 +308,7 @@ class Config: 'use_custom_host': [opt_bool, False, '', True], 'custom_port': [opt_int, 5222, '', True], 'custom_host': [opt_str, '', '', True], + 'custom_type': [opt_str, 'START TLS', _('ConnectionType: START TLS, DIRECT TLS or PLAIN'), True], 'sync_with_global_status': [opt_bool, False, ], 'no_log_for': [opt_str, '', _('List of XMPP Addresses (space separated) for which you do not want to store chat history. You can also add the name of an account to disable storing chat history for this account.')], 'attached_gpg_keys': [opt_str, ''],
===================================== gajim/common/helpers.py ===================================== @@ -1775,9 +1775,10 @@ def get_custom_host(account): return host = app.config.get_per('accounts', account, 'custom_host') port = app.config.get_per('accounts', account, 'custom_port') + type_ = app.config.get_per('accounts', account, 'custom_type') return ('%s:%s' % (host, port), ConnectionProtocol.TCP, - ConnectionType.DIRECT_TLS) + ConnectionType(type_))
def warn_about_plain_connection(account, connection_types):
===================================== gajim/gtk/accounts.py ===================================== @@ -764,6 +764,8 @@ class PriorityDialog(SettingsDialog): class CutstomHostnameDialog(SettingsDialog): def __init__(self, account, parent):
+ type_values = ('START TLS', 'DIRECT TLS', 'PLAIN') + settings = [ Setting(SettingKind.SWITCH, _('Enable'), SettingType.ACCOUNT_CONFIG, @@ -776,6 +778,11 @@ class CutstomHostnameDialog(SettingsDialog): Setting(SettingKind.ENTRY, _('Port'), SettingType.ACCOUNT_CONFIG, 'custom_port', enabledif=('custom', True)), + + Setting(SettingKind.COMBO, _('Type'), + SettingType.ACCOUNT_CONFIG, 'custom_type', + enabledif=('custom', True), + props={'combo_items': type_values}), ]
SettingsDialog.__init__(self, parent, _('Connection Settings'),
===================================== gajim/gtk/gstreamer.py ===================================== @@ -1,3 +1,17 @@ +# This file is part of Gajim. +# +# Gajim is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published +# by the Free Software Foundation; version 3 only. +# +# Gajim is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with Gajim. If not, see http://www.gnu.org/licenses/. + try: from gi.repository import Gst except Exception:
View it on GitLab: https://dev.gajim.org/gajim/gajim/-/compare/86164a02969b50c660cf1299ec274870...