Philipp Hörist pushed to branch master at gajim / gajim
Commits: 4aeaf6d3 by Philipp Hörist at 2018-03-07T19:29:50+01:00 Raise correct dialog on account removal Fixes #8941 - - - - - ce4d273d by Philipp Hörist at 2018-03-07T19:30:12+01:00 Fix transients on some Dialogs - - - - - 2 changed files: - gajim/accounts_window.py - gajim/config.py Changes: ===================================== gajim/accounts_window.py ===================================== --- a/gajim/accounts_window.py +++ b/gajim/accounts_window.py @@ -177,7 +177,7 @@ class AccountsWindow(Gtk.ApplicationWindow): def on_remove_account(self, button, account): if app.events.get_events(account): - app.interface.raise_dialog('unread-events-on-remove') + app.interface.raise_dialog('unread-events-on-remove-account') return if app.config.get_per('accounts', account, 'is_zeroconf'): @@ -211,7 +211,8 @@ class AccountsWindow(Gtk.ApplicationWindow): _('You have opened chat in account %s') % account, _('All chat and groupchat windows will be closed. ' 'Do you want to continue?'), - on_response_ok=(remove, account)) + on_response_ok=(remove, account), + transient_for=self) else: remove(account) ===================================== gajim/config.py ===================================== --- a/gajim/config.py +++ b/gajim/config.py @@ -1774,7 +1774,8 @@ class RemoveAccountWindow: self.account = account xml = gtkgui_helpers.get_gtk_builder('remove_account_window.ui') 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( 'remove_and_unregister_radiobutton') self.window.set_title(_('Removing %s account') % self.account) @@ -1794,7 +1795,8 @@ class RemoveAccountWindow: dialogs.ErrorDialog( _('Account is disabled'), _('To unregister from a server, account must be ' - 'enabled.')) + 'enabled.'), + transient_for=self.window) return if not app.connections[self.account].password: def on_ok(passphrase, checked): @@ -1808,7 +1810,8 @@ class RemoveAccountWindow: dialogs.PassphraseDialog( _('Password Required'), _('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 app.connections[self.account].unregister_account( self._on_remove_success) @@ -1820,7 +1823,8 @@ class RemoveAccountWindow: dialogs.ConfirmationDialog( _('Account "%s" is connected to the server') % self.account, _('If you remove it, the connection will be lost.'), - on_response_ok=remove) + on_response_ok=remove, + transient_for=self.window) else: remove() @@ -1837,7 +1841,8 @@ class RemoveAccountWindow: _('What would you like to do?'), _('Remove only from Gajim'), _('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 # Close all opened windows app.interface.roster.close_all(self.account, force=True) @@ -2265,7 +2270,8 @@ class AccountCreationWizardWindow: self.xml = gtkgui_helpers.get_gtk_builder( 'account_creation_wizard_window.ui') 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 server_comboboxtext = self.xml.get_object('server_comboboxtext') View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/cba6336e8fb0df174cff41ac46808f526275a0e0...ce4d273dd72dab89e0b0ce647dced2139ef4e688 --- View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/cba6336e8fb0df174cff41ac46808f526275a0e0...ce4d273dd72dab89e0b0ce647dced2139ef4e688 You're receiving this email because of your account on dev.gajim.org.
_______________________________________________ Commits mailing list Commits@gajim.org https://lists.gajim.org/cgi-bin/listinfo/commits