diff --git a/src/config.py b/src/config.py index f6e5ab0c49414ee92237543c68a98b7f5c67b90b..48eb522f4eef9d832e11252d803569f9721ae56f 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 932106f93808e922e61e7fc8c5317d5d396b05d2..68c040cf983a184bfb2042e7acefbbbcbaac79b1 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)