Daniel Brötzmann pushed to branch newcontrol at gajim / gajim
Commits:
cf3828e3 by wurstsalat at 2022-07-04T16:07:14+02:00
Fix GC roster revealer
- - - - -
1 changed file:
- gajim/gtk/controls/groupchat.py
Changes:
=====================================
gajim/gtk/controls/groupchat.py
=====================================
@@ -124,10 +124,8 @@ def __init__(self, account: str, jid: JID) -> None:
show_roster = app.settings.get('hide_groupchat_occupants_list')
self.xml.roster_revealer.set_reveal_child(show_roster)
- app.settings.bind_signal(
- 'hide_groupchat_occupants_list',
- self.xml.roster_revealer,
- 'set_reveal_child')
+ app.settings.connect_signal(
+ 'hide_groupchat_occupants_list', self._show_roster)
self.roster.connect('row-activated', self._on_roster_row_activated)
self.add_actions()
@@ -460,14 +458,12 @@ def _on_change_affiliation(self,
self.room_jid,
{jid: {'affiliation': affiliation}})
- def _show_roster(self, *args: Any) -> None:
- show = not self.xml.roster_revealer.get_reveal_child()
+ def _show_roster(self, show_roster: bool, *args: Any) -> None:
transition = Gtk.RevealerTransitionType.SLIDE_RIGHT
- if show:
+ if show_roster:
transition = Gtk.RevealerTransitionType.SLIDE_LEFT
self.xml.roster_revealer.set_transition_type(transition)
- self.xml.roster_revealer.set_reveal_child(show)
- app.settings.set('hide_groupchat_occupants_list', show)
+ self.xml.roster_revealer.set_reveal_child(show_roster)
def _on_roster_row_activated(self,
_roster: GroupchatRoster,
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/cf3828e3e1a0611a8696e091b439e6b52f21842e
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/cf3828e3e1a0611a8696e091b439e6b52f21842e
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