Yann Leboulanger pushed to branch master at gajim / gajim
Commits:
a9a6b048 by Yann Leboulanger at 2018-03-28T16:14:54+02:00
set a transient_for for join groupchat dialog when needed. Fixes #8994
- - - - -
3 changed files:
- gajim/dialogs.py
- gajim/disco.py
- gajim/gui_interface.py
Changes:
=====================================
gajim/dialogs.py
=====================================
--- a/gajim/dialogs.py
+++ b/gajim/dialogs.py
@@ -2364,7 +2364,8 @@ class SubscriptionRequestWindow(Gtk.ApplicationWindow):
self.destroy()
class JoinGroupchatWindow(Gtk.ApplicationWindow):
- def __init__(self, account, room_jid, password=None, automatic=None):
+ def __init__(self, account, room_jid, password=None, automatic=None,
+ transient_for=None):
Gtk.ApplicationWindow.__init__(self)
self.set_name('JoinGroupchat')
self.set_application(app.app)
@@ -2372,6 +2373,8 @@ class JoinGroupchatWindow(Gtk.ApplicationWindow):
self.set_resizable(False)
self.set_position(Gtk.WindowPosition.CENTER)
self.set_title(_('Join Groupchat'))
+ if transient_for:
+ self.set_transient_for(transient_for)
self.automatic = automatic
self.password = password
=====================================
gajim/disco.py
=====================================
--- a/gajim/disco.py
+++ b/gajim/disco.py
@@ -1399,7 +1399,8 @@ class ToplevelAgentBrowser(AgentBrowser):
if not iter_:
return
service = model[iter_][0]
- app.interface.join_gc_minimal(self.account, service)
+ app.interface.join_gc_minimal(self.account, service,
+ transient_for=self.window.window)
def update_actions(self):
if self.execute_button:
=====================================
gajim/gui_interface.py
=====================================
--- a/gajim/gui_interface.py
+++ b/gajim/gui_interface.py
@@ -1818,7 +1818,8 @@ class Interface:
ctrl.scroll_to_end()
- def join_gc_minimal(self, account, room_jid, password=None):
+ def join_gc_minimal(self, account, room_jid, password=None,
+ transient_for=None):
if account is not None:
if app.in_groupchat(account, room_jid):
# If we already in the groupchat, join_gc_room will bring
@@ -1855,7 +1856,8 @@ class Interface:
dialogs.ErrorDialog(_('JID is not a Groupchat'),
transient_for=app.app.get_active_window())
return
- dialogs.JoinGroupchatWindow(account, room_jid, password=password)
+ dialogs.JoinGroupchatWindow(account, room_jid, password=password,
+ transient_for=transient_for)
disco_account = connected_accounts[0] if account is None else account
app.connections[disco_account].discoverMUC(
View it on GitLab:
https://dev.gajim.org/gajim/gajim/commit/a9a6b048fb4a8fe7ca963b03faf0f9e0eef3eb05
---
View it on GitLab:
https://dev.gajim.org/gajim/gajim/commit/a9a6b048fb4a8fe7ca963b03faf0f9e0eef3eb05
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