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

Commits:

2 changed files:

Changes:

  • gajim/common/setting_values.py
    ... ... @@ -58,8 +58,6 @@ class _ACCOUNT_DEFAULT:
    58 58
         'gc_notify_on_all_messages_public_default',
    
    59 59
         'gc_print_join_left_default',
    
    60 60
         'gc_print_status_default',
    
    61
    -    'hide_chat_banner',
    
    62
    -    'hide_groupchat_banner',
    
    63 61
         'hide_groupchat_occupants_list',
    
    64 62
         'ignore_incoming_attention',
    
    65 63
         'is_window_visible',
    
    ... ... @@ -209,8 +207,6 @@ class _ACCOUNT_DEFAULT:
    209 207
         'gc_sync_threshold_public_default': 1,
    
    210 208
         'global_proxy': '',
    
    211 209
         'groupchat_roster_width': 210,
    
    212
    -    'hide_chat_banner': False,
    
    213
    -    'hide_groupchat_banner': False,
    
    214 210
         'hide_groupchat_occupants_list': False,
    
    215 211
         'ignore_incoming_attention': False,
    
    216 212
         'is_window_visible': True,
    
    ... ... @@ -670,8 +666,6 @@ class WorkspaceSettings(TypedDict):
    670 666
                 'Character to add after nickname when using nickname completion '
    
    671 667
                 '(tab) in group chat.'),
    
    672 668
             'groupchat_roster_width': _('Width of group chat roster in pixel'),
    
    673
    -        'hide_chat_banner': _('Hides the banner in a 1:1 chat window.'),
    
    674
    -        'hide_groupchat_banner': _('Hides the banner in a group chat window.'),
    
    675 669
             'ignore_incoming_attention': _(
    
    676 670
                 'If enabled, Gajim will ignore incoming attention '
    
    677 671
                 'requests ("wizz").'),
    

  • gajim/gtk/chat_banner.py
    ... ... @@ -71,14 +71,6 @@ def __init__(self) -> None:
    71 71
                 'hide_groupchat_occupants_list',
    
    72 72
                 self._set_toggle_roster_button_icon)
    
    73 73
     
    
    74
    -        app.settings.connect_signal(
    
    75
    -            'hide_chat_banner',
    
    76
    -            self._update_hide_banner)
    
    77
    -
    
    78
    -        app.settings.connect_signal(
    
    79
    -            'hide_groupchat_banner',
    
    80
    -            self._update_hide_banner)
    
    81
    -
    
    82 74
             self.show_all()
    
    83 75
     
    
    84 76
         def clear(self) -> None:
    
    ... ... @@ -108,7 +100,6 @@ def switch_contact(self, contact: types.ChatContactT) -> None:
    108 100
             self._update_visitor_button()
    
    109 101
             self._update_name_label()
    
    110 102
             self._update_account_badge()
    
    111
    -        self._update_hide_banner()
    
    112 103
     
    
    113 104
         def _connect_signals(self) -> None:
    
    114 105
             assert self._contact is not None
    
    ... ... @@ -250,22 +241,6 @@ def _update_roster_button(self) -> None:
    250 241
             self._ui.toggle_roster_button.set_visible(
    
    251 242
                 isinstance(self._contact, GroupchatContact))
    
    252 243
     
    
    253
    -    def _update_hide_banner(self, *args: Any) -> None:
    
    254
    -        if self._contact is None:
    
    255
    -            return
    
    256
    -
    
    257
    -        if isinstance(self._contact, GroupchatContact):
    
    258
    -            hide_banner = app.settings.get('hide_groupchat_banner')
    
    259
    -        else:
    
    260
    -            hide_banner = app.settings.get('hide_chat_banner')
    
    261
    -
    
    262
    -        if hide_banner:
    
    263
    -            self.set_no_show_all(True)
    
    264
    -            self.hide()
    
    265
    -        else:
    
    266
    -            self.set_no_show_all(False)
    
    267
    -            self.show_all()
    
    268
    -
    
    269 244
         def _update_avatar(self) -> None:
    
    270 245
             scale = app.window.get_scale_factor()
    
    271 246
             assert self._contact