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


Commits:
26805837 by Philipp Hörist at 2022-10-10T20:17:13+02:00
change: Remove setting to hide the chat banner

As we place important functionality like hiding the groupchat roster
in the banner, hiding it is not an option anymore

- - - - -


2 changed files:

- gajim/common/setting_values.py
- gajim/gtk/chat_banner.py


Changes:

=====================================
gajim/common/setting_values.py
=====================================
@@ -58,8 +58,6 @@ class _ACCOUNT_DEFAULT:
     'gc_notify_on_all_messages_public_default',
     'gc_print_join_left_default',
     'gc_print_status_default',
-    'hide_chat_banner',
-    'hide_groupchat_banner',
     'hide_groupchat_occupants_list',
     'ignore_incoming_attention',
     'is_window_visible',
@@ -209,8 +207,6 @@ class _ACCOUNT_DEFAULT:
     'gc_sync_threshold_public_default': 1,
     'global_proxy': '',
     'groupchat_roster_width': 210,
-    'hide_chat_banner': False,
-    'hide_groupchat_banner': False,
     'hide_groupchat_occupants_list': False,
     'ignore_incoming_attention': False,
     'is_window_visible': True,
@@ -670,8 +666,6 @@ class WorkspaceSettings(TypedDict):
             'Character to add after nickname when using nickname completion '
             '(tab) in group chat.'),
         'groupchat_roster_width': _('Width of group chat roster in pixel'),
-        'hide_chat_banner': _('Hides the banner in a 1:1 chat window.'),
-        'hide_groupchat_banner': _('Hides the banner in a group chat window.'),
         'ignore_incoming_attention': _(
             'If enabled, Gajim will ignore incoming attention '
             'requests ("wizz").'),


=====================================
gajim/gtk/chat_banner.py
=====================================
@@ -71,14 +71,6 @@ def __init__(self) -> None:
             'hide_groupchat_occupants_list',
             self._set_toggle_roster_button_icon)
 
-        app.settings.connect_signal(
-            'hide_chat_banner',
-            self._update_hide_banner)
-
-        app.settings.connect_signal(
-            'hide_groupchat_banner',
-            self._update_hide_banner)
-
         self.show_all()
 
     def clear(self) -> None:
@@ -108,7 +100,6 @@ def switch_contact(self, contact: types.ChatContactT) -> 
None:
         self._update_visitor_button()
         self._update_name_label()
         self._update_account_badge()
-        self._update_hide_banner()
 
     def _connect_signals(self) -> None:
         assert self._contact is not None
@@ -250,22 +241,6 @@ def _update_roster_button(self) -> None:
         self._ui.toggle_roster_button.set_visible(
             isinstance(self._contact, GroupchatContact))
 
-    def _update_hide_banner(self, *args: Any) -> None:
-        if self._contact is None:
-            return
-
-        if isinstance(self._contact, GroupchatContact):
-            hide_banner = app.settings.get('hide_groupchat_banner')
-        else:
-            hide_banner = app.settings.get('hide_chat_banner')
-
-        if hide_banner:
-            self.set_no_show_all(True)
-            self.hide()
-        else:
-            self.set_no_show_all(False)
-            self.show_all()
-
     def _update_avatar(self) -> None:
         scale = app.window.get_scale_factor()
         assert self._contact



View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/26805837d2b22b867a01cda4dd7ae8c4d2633ecc

-- 
View it on GitLab: 
https://dev.gajim.org/gajim/gajim/-/commit/26805837d2b22b867a01cda4dd7ae8c4d2633ecc
You're receiving this email because of your account on dev.gajim.org.


_______________________________________________
Commits mailing list
[email protected]
https://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to