Philipp Hörist pushed to branch master at gajim / gajim

Commits:

2 changed files:

Changes:

  • gajim/accounts_window.py
    ... ... @@ -177,7 +177,7 @@ class AccountsWindow(Gtk.ApplicationWindow):
    177 177
     
    
    178 178
         def on_remove_account(self, button, account):
    
    179 179
             if app.events.get_events(account):
    
    180
    -            app.interface.raise_dialog('unread-events-on-remove')
    
    180
    +            app.interface.raise_dialog('unread-events-on-remove-account')
    
    181 181
                 return
    
    182 182
     
    
    183 183
             if app.config.get_per('accounts', account, 'is_zeroconf'):
    
    ... ... @@ -211,7 +211,8 @@ class AccountsWindow(Gtk.ApplicationWindow):
    211 211
                     _('You have opened chat in account %s') % account,
    
    212 212
                     _('All chat and groupchat windows will be closed. '
    
    213 213
                       'Do you want to continue?'),
    
    214
    -                on_response_ok=(remove, account))
    
    214
    +                on_response_ok=(remove, account),
    
    215
    +                transient_for=self)
    
    215 216
             else:
    
    216 217
                 remove(account)
    
    217 218
     
    

  • gajim/config.py
    ... ... @@ -1774,7 +1774,8 @@ class RemoveAccountWindow:
    1774 1774
             self.account = account
    
    1775 1775
             xml = gtkgui_helpers.get_gtk_builder('remove_account_window.ui')
    
    1776 1776
             self.window = xml.get_object('remove_account_window')
    
    1777
    -        self.window.set_transient_for(app.interface.roster.window)
    
    1777
    +        active_window = app.app.get_active_window()
    
    1778
    +        self.window.set_transient_for(active_window)
    
    1778 1779
             self.remove_and_unregister_radiobutton = xml.get_object(
    
    1779 1780
                     'remove_and_unregister_radiobutton')
    
    1780 1781
             self.window.set_title(_('Removing %s account') % self.account)
    
    ... ... @@ -1794,7 +1795,8 @@ class RemoveAccountWindow:
    1794 1795
                         dialogs.ErrorDialog(
    
    1795 1796
                             _('Account is disabled'),
    
    1796 1797
                             _('To unregister from a server, account must be '
    
    1797
    -                        'enabled.'))
    
    1798
    +                        'enabled.'),
    
    1799
    +                        transient_for=self.window)
    
    1798 1800
                         return
    
    1799 1801
                     if not app.connections[self.account].password:
    
    1800 1802
                         def on_ok(passphrase, checked):
    
    ... ... @@ -1808,7 +1810,8 @@ class RemoveAccountWindow:
    1808 1810
                         dialogs.PassphraseDialog(
    
    1809 1811
                                 _('Password Required'),
    
    1810 1812
                                 _('Enter your password for account %s') % self.account,
    
    1811
    -                            _('Save password'), ok_handler=on_ok)
    
    1813
    +                            _('Save password'), ok_handler=on_ok,
    
    1814
    +                            transient_for=self.window)
    
    1812 1815
                         return
    
    1813 1816
                     app.connections[self.account].unregister_account(
    
    1814 1817
                             self._on_remove_success)
    
    ... ... @@ -1820,7 +1823,8 @@ class RemoveAccountWindow:
    1820 1823
                 dialogs.ConfirmationDialog(
    
    1821 1824
                     _('Account "%s" is connected to the server') % self.account,
    
    1822 1825
                     _('If you remove it, the connection will be lost.'),
    
    1823
    -                on_response_ok=remove)
    
    1826
    +                on_response_ok=remove,
    
    1827
    +                transient_for=self.window)
    
    1824 1828
             else:
    
    1825 1829
                 remove()
    
    1826 1830
     
    
    ... ... @@ -1837,7 +1841,8 @@ class RemoveAccountWindow:
    1837 1841
                         _('What would you like to do?'),
    
    1838 1842
                         _('Remove only from Gajim'),
    
    1839 1843
                         _('Don\'t remove anything. I\'ll try again later'),
    
    1840
    -                    on_response_ok=self.on_remove_responce_ok, is_modal=False)
    
    1844
    +                    on_response_ok=self.on_remove_responce_ok, is_modal=False,
    
    1845
    +                    transient_for=self.window)
    
    1841 1846
                 return
    
    1842 1847
             # Close all opened windows
    
    1843 1848
             app.interface.roster.close_all(self.account, force=True)
    
    ... ... @@ -2265,7 +2270,8 @@ class AccountCreationWizardWindow:
    2265 2270
             self.xml = gtkgui_helpers.get_gtk_builder(
    
    2266 2271
                     'account_creation_wizard_window.ui')
    
    2267 2272
             self.window = self.xml.get_object('account_creation_wizard_window')
    
    2268
    -        self.window.set_transient_for(app.interface.roster.window)
    
    2273
    +        active_window = app.app.get_active_window()
    
    2274
    +        self.window.set_transient_for(active_window)
    
    2269 2275
     
    
    2270 2276
             # Connect events from comboboxtext_entry
    
    2271 2277
             server_comboboxtext = self.xml.get_object('server_comboboxtext')