Philipp Hörist pushed to branch master at gajim / gajim

Commits:

3 changed files:

Changes:

  • gajim/common/config.py
    ... ... @@ -277,7 +277,7 @@ class Config:
    277 277
                 'keyid': [opt_str, '', '', True],
    
    278 278
                 'keyname': [opt_str, '', '', True],
    
    279 279
                 'use_plain_connection': [opt_bool, False, _('Use an unencrypted connection to the server')],
    
    280
    -            'action_when_plain_connection': [opt_str, 'warn', _('Show a warning dialog before sending password on an plaintext connection. Can be \'warn\', or \'none\'.')],
    
    280
    +            'confirm_unencrypted_connection': [opt_bool, True],
    
    281 281
                 'use_custom_host': [opt_bool, False, '', True],
    
    282 282
                 'custom_port': [opt_int, 5222, '', True],
    
    283 283
                 'custom_host': [opt_str, '', '', True],
    
    ... ... @@ -304,11 +304,7 @@ class Config:
    304 304
                 'answer_receipts': [opt_bool, True, _('If enabled, Gajim will answer to message receipt requests.')],
    
    305 305
                 'publish_tune': [opt_bool, False],
    
    306 306
                 'publish_location': [opt_bool, False],
    
    307
    -            'subscribe_mood': [opt_bool, True],
    
    308
    -            'subscribe_activity': [opt_bool, True],
    
    309
    -            'subscribe_tune': [opt_bool, True],
    
    310
    -            'subscribe_nick': [opt_bool, True],
    
    311
    -            'subscribe_location': [opt_bool, True],
    
    307
    +            'request_user_data': [opt_bool, True],
    
    312 308
                 'ignore_unknown_contacts': [opt_bool, False],
    
    313 309
                 'send_os_info': [opt_bool, True, _('Allow Gajim to send information about the operating system you are running.')],
    
    314 310
                 'send_time_info': [opt_bool, True, _('Allow Gajim to send your local time.')],
    

  • gajim/common/helpers.py
    ... ... @@ -802,16 +802,14 @@ def get_current_show(account):
    802 802
     
    
    803 803
     def get_optional_features(account):
    
    804 804
         features = []
    
    805
    -    if app.config.get_per('accounts', account, 'subscribe_mood'):
    
    805
    +    if app.config.get_per('accounts', account, 'request_user_data'):
    
    806 806
             features.append(Namespace.MOOD + '+notify')
    
    807
    -    if app.config.get_per('accounts', account, 'subscribe_activity'):
    
    808 807
             features.append(Namespace.ACTIVITY + '+notify')
    
    809
    -    if app.config.get_per('accounts', account, 'subscribe_tune'):
    
    810 808
             features.append(Namespace.TUNE + '+notify')
    
    811
    -    if app.config.get_per('accounts', account, 'subscribe_nick'):
    
    812
    -        features.append(Namespace.NICK + '+notify')
    
    813
    -    if app.config.get_per('accounts', account, 'subscribe_location'):
    
    814 809
             features.append(Namespace.LOCATION + '+notify')
    
    810
    +
    
    811
    +    features.append(Namespace.NICK + '+notify')
    
    812
    +
    
    815 813
         if app.connections[account].get_module('Bookmarks').using_bookmark_2:
    
    816 814
             features.append(Namespace.BOOKMARKS_2 + '+notify')
    
    817 815
         elif app.connections[account].get_module('Bookmarks').using_bookmark_1:
    
    ... ... @@ -1395,7 +1393,7 @@ def get_custom_host(account):
    1395 1393
     
    
    1396 1394
     def warn_about_plain_connection(account, connection_types):
    
    1397 1395
         warn = app.config.get_per(
    
    1398
    -        'accounts', account, 'action_when_plain_connection') == 'warn'
    
    1396
    +        'accounts', account, 'confirm_unencrypted_connection')
    
    1399 1397
         for type_ in connection_types:
    
    1400 1398
             if type_.is_plain and warn:
    
    1401 1399
                 return True
    

  • gajim/gtk/accounts.py
    ... ... @@ -309,6 +309,7 @@ class AccountSubMenu(Gtk.ListBox):
    309 309
             if account != 'Local':
    
    310 310
                 self.add(PageMenuItem('privacy', _('Privacy')))
    
    311 311
                 self.add(PageMenuItem('connection', _('Connection')))
    
    312
    +            self.add(PageMenuItem('advanced', _('Advanced')))
    
    312 313
                 self.add(RemoveMenuItem())
    
    313 314
     
    
    314 315
         @property
    
    ... ... @@ -400,6 +401,8 @@ class PageMenuItem(MenuItem):
    400 401
                 icon = 'preferences-system-privacy-symbolic'
    
    401 402
             elif name == 'connection':
    
    402 403
                 icon = 'preferences-system-network-symbolic'
    
    404
    +        elif name == 'advanced':
    
    405
    +            icon = 'preferences-other-symbolic'
    
    403 406
             else:
    
    404 407
                 icon = 'dialog-error-symbolic'
    
    405 408
     
    
    ... ... @@ -422,6 +425,7 @@ class Account:
    422 425
                 self._settings.add_page(GeneralPage(account))
    
    423 426
                 self._settings.add_page(ConnectionPage(account))
    
    424 427
                 self._settings.add_page(PrivacyPage(account))
    
    428
    +            self._settings.add_page(AdvancedPage(account))
    
    425 429
     
    
    426 430
             self._account_row = AccountRow(account)
    
    427 431
             self._menu.add_account(self._account_row)
    
    ... ... @@ -675,6 +679,10 @@ class PrivacyPage(GenericSettingPage):
    675 679
                         desc=_('Ignore everything from contacts not in your '
    
    676 680
                                'Roster')),
    
    677 681
     
    
    682
    +            Setting(SettingKind.SWITCH, _('Send Message Receipts'),
    
    683
    +                    SettingType.ACCOUNT_CONFIG, 'answer_receipts',
    
    684
    +                    desc=_('Tell your contacts if you received a message')),
    
    685
    +
    
    678 686
                 ]
    
    679 687
             GenericSettingPage.__init__(self, account, settings)
    
    680 688
     
    
    ... ... @@ -698,8 +706,42 @@ class ConnectionPage(GenericSettingPage):
    698 706
     
    
    699 707
                 Setting(SettingKind.PRIORITY, _('Priority'),
    
    700 708
                         SettingType.DIALOG, props={'dialog': PriorityDialog}),
    
    709
    +
    
    710
    +            Setting(SettingKind.SWITCH, _('Use Unencrypted Connection'),
    
    711
    +                    SettingType.ACCOUNT_CONFIG, 'use_plain_connection',
    
    712
    +                    desc=_('Use an unencrypted connection to the server')),
    
    713
    +
    
    714
    +            Setting(SettingKind.SWITCH, _('Confirm Unencrypted Connection'),
    
    715
    +                    SettingType.ACCOUNT_CONFIG,
    
    716
    +                    'confirm_unencrypted_connection',
    
    717
    +                    desc=_('Show a confirmation dialog before connecting '
    
    718
    +                           'unencrypted')),
    
    701 719
                 ]
    
    720
    +        GenericSettingPage.__init__(self, account, settings)
    
    721
    +
    
    702 722
     
    
    723
    +class AdvancedPage(GenericSettingPage):
    
    724
    +
    
    725
    +    name = 'advanced'
    
    726
    +
    
    727
    +    def __init__(self, account):
    
    728
    +
    
    729
    +        settings = [
    
    730
    +            Setting(SettingKind.SWITCH, _('Contact Information'),
    
    731
    +                    SettingType.ACCOUNT_CONFIG, 'request_user_data',
    
    732
    +                    desc=_('Request contact information '
    
    733
    +                           '(Mood, Activity, Tune, Location)')),
    
    734
    +
    
    735
    +            Setting(SettingKind.SWITCH, _('Accept all Contact Requests'),
    
    736
    +                    SettingType.ACCOUNT_CONFIG, 'autoauth',
    
    737
    +                    desc=_('Automatically accept all contact requests')),
    
    738
    +
    
    739
    +            Setting(SettingKind.COMBO, _('Filetransfer Preference'),
    
    740
    +                    SettingType.ACCOUNT_CONFIG, 'filetransfer_preference',
    
    741
    +                    props={'combo_items': ['httpupload', 'jingle']},
    
    742
    +                    desc=_('Preferred file transfer mechanism for '
    
    743
    +                           'file drag&drop on a chat window'))
    
    744
    +            ]
    
    703 745
             GenericSettingPage.__init__(self, account, settings)
    
    704 746
     
    
    705 747