Philipp Hörist pushed to branch master at gajim / gajim
Commits:
80289935 by lovetox at 2020-11-18T23:05:12+01:00
GroupChatSettings: Create box only on demand
- - - - -
1 changed file:
- gajim/groupchat_control.py
Changes:
=====================================
gajim/groupchat_control.py
=====================================
@@ -177,9 +177,7 @@ def __init__(self, parent_win, contact, muc_data, acct):
self.xml.info_box.add(self._muc_info_box)
# Groupchat settings
- self._groupchat_settings_box = GroupChatSettings(
- self.account, self.room_jid)
- self.xml.settings_scrolled_box.add(self._groupchat_settings_box)
+ self._groupchat_settings_box = None
# Groupchat invite
self.xml.quick_invite_button.set_action_name(
@@ -469,6 +467,14 @@ def _on_information(self, _action, _param):
self._show_page('muc-info')
def _on_groupchat_settings(self, _action, _param):
+ if self._groupchat_settings_box is not None:
+ self.xml.settings_scrolled_box.remove(self._groupchat_settings_box)
+ self._groupchat_settings_box.destroy()
+
+ self._groupchat_settings_box = GroupChatSettings(
+ self.account, self.room_jid)
+ self._groupchat_settings_box.show_all()
+ self.xml.settings_scrolled_box.add(self._groupchat_settings_box)
self._show_page('muc-settings')
def _on_invite(self, _action, _param):
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/80289935bdd3cacb208141cac35be6a0e9101436
--
View it on GitLab:
https://dev.gajim.org/gajim/gajim/-/commit/80289935bdd3cacb208141cac35be6a0e9101436
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