| ... |
... |
@@ -124,10 +124,8 @@ def __init__(self, account: str, jid: JID) -> None: |
|
124
|
124
|
|
|
125
|
125
|
show_roster = app.settings.get('hide_groupchat_occupants_list')
|
|
126
|
126
|
self.xml.roster_revealer.set_reveal_child(show_roster)
|
|
127
|
|
- app.settings.bind_signal(
|
|
128
|
|
- 'hide_groupchat_occupants_list',
|
|
129
|
|
- self.xml.roster_revealer,
|
|
130
|
|
- 'set_reveal_child')
|
|
|
127
|
+ app.settings.connect_signal(
|
|
|
128
|
+ 'hide_groupchat_occupants_list', self._show_roster)
|
|
131
|
129
|
self.roster.connect('row-activated', self._on_roster_row_activated)
|
|
132
|
130
|
|
|
133
|
131
|
self.add_actions()
|
| ... |
... |
@@ -460,14 +458,12 @@ def _on_change_affiliation(self, |
|
460
|
458
|
self.room_jid,
|
|
461
|
459
|
{jid: {'affiliation': affiliation}})
|
|
462
|
460
|
|
|
463
|
|
- def _show_roster(self, *args: Any) -> None:
|
|
464
|
|
- show = not self.xml.roster_revealer.get_reveal_child()
|
|
|
461
|
+ def _show_roster(self, show_roster: bool, *args: Any) -> None:
|
|
465
|
462
|
transition = Gtk.RevealerTransitionType.SLIDE_RIGHT
|
|
466
|
|
- if show:
|
|
|
463
|
+ if show_roster:
|
|
467
|
464
|
transition = Gtk.RevealerTransitionType.SLIDE_LEFT
|
|
468
|
465
|
self.xml.roster_revealer.set_transition_type(transition)
|
|
469
|
|
- self.xml.roster_revealer.set_reveal_child(show)
|
|
470
|
|
- app.settings.set('hide_groupchat_occupants_list', show)
|
|
|
466
|
+ self.xml.roster_revealer.set_reveal_child(show_roster)
|
|
471
|
467
|
|
|
472
|
468
|
def _on_roster_row_activated(self,
|
|
473
|
469
|
_roster: GroupchatRoster,
|