Commit 80289935 authored by Philipp Hörist's avatar Philipp Hörist

GroupChatSettings: Create box only on demand

parent de206c40
Pipeline #6747 passed with stages
in 5 minutes and 47 seconds
......@@ -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):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment