Use open JoinGroupchat Dialog when browsing MUCs
This commit is contained in:
parent
d45fa13ee9
commit
63a27ace61
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue