Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlovetox <philipp@hoerist.com>2022-08-09 17:48:15 +0300
committerlovetox <philipp@hoerist.com>2022-08-09 17:48:39 +0300
commit4d3a78b652e1143ccbdd5d203c1a5c44e51610a2 (patch)
treee3dd24e4905abbefea4c826501d5bcba13b88b34
parent342d0213f2338c80ff2d4c613617848817f4787c (diff)
fix: Preferences: Enable roster settings again
-rw-r--r--gajim/gtk/control.py11
-rw-r--r--gajim/gtk/preferences.py16
2 files changed, 11 insertions, 16 deletions
diff --git a/gajim/gtk/control.py b/gajim/gtk/control.py
index eeb9ace4a..fc19c65ce 100644
--- a/gajim/gtk/control.py
+++ b/gajim/gtk/control.py
@@ -97,9 +97,9 @@ class ChatControl(EventHelper):
self._scrolled_view.connect('request-history',
self.fetch_n_lines_history, 20)
- self.roster = GroupchatRoster()
+ self._roster = GroupchatRoster()
- self._ui.conv_view_box.add(self.roster)
+ self._ui.conv_view_box.add(self._roster)
# Keeps track of whether the ConversationView is populated
self._chat_loaded: bool = False
@@ -132,6 +132,9 @@ class ChatControl(EventHelper):
def has_active_chat(self) -> bool:
return self._contact is not None
+ def get_group_chat_roster(self) -> GroupchatRoster:
+ return self._roster
+
def clear(self) -> None:
log.info('Clear')
@@ -144,7 +147,7 @@ class ChatControl(EventHelper):
self.last_msg_id = None
self.reset_view()
self._groupchat_state.clear()
- self.roster.clear()
+ self._roster.clear()
def switch_contact(self, contact: Union[BareContact,
GroupchatContact,
@@ -161,7 +164,7 @@ class ChatControl(EventHelper):
self._jump_to_end_button.switch_contact(contact)
self.conversation_view.switch_contact(contact)
self._groupchat_state.switch_contact(contact)
- self.roster.switch_contact(contact)
+ self._roster.switch_contact(contact)
self.encryption = self.get_encryption_state()
self.conversation_view.encryption_enabled = self.encryption is not None
diff --git a/gajim/gtk/preferences.py b/gajim/gtk/preferences.py
index 772f3f912..bc1d55d95 100644
--- a/gajim/gtk/preferences.py
+++ b/gajim/gtk/preferences.py
@@ -402,21 +402,13 @@ class GroupChats(PreferenceBox):
@staticmethod
def _on_sort_by_show_in_muc(_value: bool, *args: Any) -> None:
- # TODO
- return
- for ctrl in app.window.get_controls():
- if ctrl.is_groupchat:
- if ctrl.roster is not None:
- ctrl.roster.invalidate_sort()
+ roster = app.window.get_control().get_group_chat_roster()
+ roster.invalidate_sort()
@staticmethod
def _on_show_status_in_roster(_value: bool, *args: Any) -> None:
- # TODO
- return
- for ctrl in app.window.get_controls():
- if ctrl.is_groupchat:
- if ctrl.roster is not None:
- ctrl.roster.draw_contacts()
+ roster = app.window.get_control().get_group_chat_roster()
+ roster.draw_contacts()
@staticmethod
def _reset_join_left(button: Gtk.Button) -> None: