From 87dfb8b481ad85b492fb97dad45e216fc0fa4276 Mon Sep 17 00:00:00 2001 From: Denis Fomin <fominde@gmail.com> Date: Sat, 7 Sep 2013 22:06:48 +0400 Subject: [PATCH] ChangePasswordDialog set transient_for. See #7185 --- src/config.py | 3 ++- src/dialogs.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/config.py b/src/config.py index f6e5ab0c49..48eb522f4e 100644 --- a/src/config.py +++ b/src/config.py @@ -2277,7 +2277,8 @@ class AccountsWindow: new_password) try: - dialogs.ChangePasswordDialog(self.current_account, on_changed) + dialogs.ChangePasswordDialog(self.current_account, on_changed, + self.window) except GajimGeneralException: # if we showed ErrorDialog, there will not be dialog instance return diff --git a/src/dialogs.py b/src/dialogs.py index 932106f938..68c040cf98 100644 --- a/src/dialogs.py +++ b/src/dialogs.py @@ -2844,7 +2844,7 @@ class NewChatDialog(InputDialog): gajim.interface.new_chat_from_jid(self.account, jid) class ChangePasswordDialog: - def __init__(self, account, on_response): + def __init__(self, account, on_response, transient_for=None): # 'account' can be None if we are about to create our first one if not account or gajim.connections[account].connected < 2: ErrorDialog(_('You are not connected to the server'), @@ -2854,6 +2854,7 @@ class ChangePasswordDialog: self.on_response = on_response self.xml = gtkgui_helpers.get_gtk_builder('change_password_dialog.ui') self.dialog = self.xml.get_object('change_password_dialog') + self.dialog.set_transient_for(transient_for) self.password1_entry = self.xml.get_object('password1_entry') self.password2_entry = self.xml.get_object('password2_entry') self.dialog.connect('response', self.on_dialog_response) -- GitLab