Fix transients on some Dialogs
This commit is contained in:
parent
4aeaf6d3bc
commit
ce4d273dd7
2 changed files with 14 additions and 7 deletions
|
@ -211,7 +211,8 @@ class AccountsWindow(Gtk.ApplicationWindow):
|
||||||
_('You have opened chat in account %s') % account,
|
_('You have opened chat in account %s') % account,
|
||||||
_('All chat and groupchat windows will be closed. '
|
_('All chat and groupchat windows will be closed. '
|
||||||
'Do you want to continue?'),
|
'Do you want to continue?'),
|
||||||
on_response_ok=(remove, account))
|
on_response_ok=(remove, account),
|
||||||
|
transient_for=self)
|
||||||
else:
|
else:
|
||||||
remove(account)
|
remove(account)
|
||||||
|
|
||||||
|
|
|
@ -1774,7 +1774,8 @@ class RemoveAccountWindow:
|
||||||
self.account = account
|
self.account = account
|
||||||
xml = gtkgui_helpers.get_gtk_builder('remove_account_window.ui')
|
xml = gtkgui_helpers.get_gtk_builder('remove_account_window.ui')
|
||||||
self.window = xml.get_object('remove_account_window')
|
self.window = xml.get_object('remove_account_window')
|
||||||
self.window.set_transient_for(app.interface.roster.window)
|
active_window = app.app.get_active_window()
|
||||||
|
self.window.set_transient_for(active_window)
|
||||||
self.remove_and_unregister_radiobutton = xml.get_object(
|
self.remove_and_unregister_radiobutton = xml.get_object(
|
||||||
'remove_and_unregister_radiobutton')
|
'remove_and_unregister_radiobutton')
|
||||||
self.window.set_title(_('Removing %s account') % self.account)
|
self.window.set_title(_('Removing %s account') % self.account)
|
||||||
|
@ -1794,7 +1795,8 @@ class RemoveAccountWindow:
|
||||||
dialogs.ErrorDialog(
|
dialogs.ErrorDialog(
|
||||||
_('Account is disabled'),
|
_('Account is disabled'),
|
||||||
_('To unregister from a server, account must be '
|
_('To unregister from a server, account must be '
|
||||||
'enabled.'))
|
'enabled.'),
|
||||||
|
transient_for=self.window)
|
||||||
return
|
return
|
||||||
if not app.connections[self.account].password:
|
if not app.connections[self.account].password:
|
||||||
def on_ok(passphrase, checked):
|
def on_ok(passphrase, checked):
|
||||||
|
@ -1808,7 +1810,8 @@ class RemoveAccountWindow:
|
||||||
dialogs.PassphraseDialog(
|
dialogs.PassphraseDialog(
|
||||||
_('Password Required'),
|
_('Password Required'),
|
||||||
_('Enter your password for account %s') % self.account,
|
_('Enter your password for account %s') % self.account,
|
||||||
_('Save password'), ok_handler=on_ok)
|
_('Save password'), ok_handler=on_ok,
|
||||||
|
transient_for=self.window)
|
||||||
return
|
return
|
||||||
app.connections[self.account].unregister_account(
|
app.connections[self.account].unregister_account(
|
||||||
self._on_remove_success)
|
self._on_remove_success)
|
||||||
|
@ -1820,7 +1823,8 @@ class RemoveAccountWindow:
|
||||||
dialogs.ConfirmationDialog(
|
dialogs.ConfirmationDialog(
|
||||||
_('Account "%s" is connected to the server') % self.account,
|
_('Account "%s" is connected to the server') % self.account,
|
||||||
_('If you remove it, the connection will be lost.'),
|
_('If you remove it, the connection will be lost.'),
|
||||||
on_response_ok=remove)
|
on_response_ok=remove,
|
||||||
|
transient_for=self.window)
|
||||||
else:
|
else:
|
||||||
remove()
|
remove()
|
||||||
|
|
||||||
|
@ -1837,7 +1841,8 @@ class RemoveAccountWindow:
|
||||||
_('What would you like to do?'),
|
_('What would you like to do?'),
|
||||||
_('Remove only from Gajim'),
|
_('Remove only from Gajim'),
|
||||||
_('Don\'t remove anything. I\'ll try again later'),
|
_('Don\'t remove anything. I\'ll try again later'),
|
||||||
on_response_ok=self.on_remove_responce_ok, is_modal=False)
|
on_response_ok=self.on_remove_responce_ok, is_modal=False,
|
||||||
|
transient_for=self.window)
|
||||||
return
|
return
|
||||||
# Close all opened windows
|
# Close all opened windows
|
||||||
app.interface.roster.close_all(self.account, force=True)
|
app.interface.roster.close_all(self.account, force=True)
|
||||||
|
@ -2265,7 +2270,8 @@ class AccountCreationWizardWindow:
|
||||||
self.xml = gtkgui_helpers.get_gtk_builder(
|
self.xml = gtkgui_helpers.get_gtk_builder(
|
||||||
'account_creation_wizard_window.ui')
|
'account_creation_wizard_window.ui')
|
||||||
self.window = self.xml.get_object('account_creation_wizard_window')
|
self.window = self.xml.get_object('account_creation_wizard_window')
|
||||||
self.window.set_transient_for(app.interface.roster.window)
|
active_window = app.app.get_active_window()
|
||||||
|
self.window.set_transient_for(active_window)
|
||||||
|
|
||||||
# Connect events from comboboxtext_entry
|
# Connect events from comboboxtext_entry
|
||||||
server_comboboxtext = self.xml.get_object('server_comboboxtext')
|
server_comboboxtext = self.xml.get_object('server_comboboxtext')
|
||||||
|
|
Loading…
Add table
Reference in a new issue