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):
|
def get_app_window(cls):
|
||||||
for win in app.get_windows():
|
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 win
|
||||||
return None
|
return None
|
||||||
|
|
|
@ -1797,11 +1797,12 @@ class MucBrowser(AgentBrowser):
|
||||||
if not iter_:
|
if not iter_:
|
||||||
return
|
return
|
||||||
service = model[iter_][0]
|
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)
|
app.interface.join_gc_minimal(self.account, service)
|
||||||
else:
|
else:
|
||||||
app.interface.instances[self.account]['join_gc'].set_room(service)
|
window.set_room(service)
|
||||||
app.interface.instances[self.account]['join_gc'].present()
|
window.present()
|
||||||
self.window.destroy()
|
self.window.destroy()
|
||||||
|
|
||||||
def update_actions(self):
|
def update_actions(self):
|
||||||
|
|
Loading…
Reference in New Issue