ChangePasswordDialog set transient_for. See #7185
This commit is contained in:
parent
37adfe9e2a
commit
b0bc896aca
|
@ -2303,7 +2303,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
|
||||
|
|
|
@ -2875,7 +2875,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'),
|
||||
|
@ -2885,6 +2885,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)
|
||||
|
|
Loading…
Reference in New Issue