Commit 63a27ace authored by Philipp Hörist's avatar Philipp Hörist

Use open JoinGroupchat Dialog when browsing MUCs

parent d45fa13e
......@@ -583,6 +583,9 @@ def prefers_app_menu():
def get_app_window(cls):
for win in app.get_windows():
if isinstance(win, cls):
if isinstance(cls, str):
if type(win).__name__ == cls:
return win
elif isinstance(win, cls):
return win
return None
......@@ -1797,11 +1797,12 @@ class MucBrowser(AgentBrowser):
if not iter_:
return
service = model[iter_][0]
if 'join_gc' not in app.interface.instances[self.account]:
window = app.get_app_window('JoinGroupchatWindow')
if window is None:
app.interface.join_gc_minimal(self.account, service)
else:
app.interface.instances[self.account]['join_gc'].set_room(service)
app.interface.instances[self.account]['join_gc'].present()
window.set_room(service)
window.present()
self.window.destroy()
def update_actions(self):
......
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