Skip to content
Snippets Groups Projects
Commit 176a1f9e authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

destroy connection instance when we cancel the addition of an account

parent 55ba2388
No related branches found
No related tags found
No related merge requests found
......@@ -2976,6 +2976,11 @@ def __init__(self):
self.window.show_all()
def on_wizard_window_destroy(self, widget):
page = self.notebook.get_current_page()
if page > 2 and page < 5 and self.account in gajim.connections:
# connection instance is saved in gajim.connections and we canceled the
# addition of the account
del gajim.connections[self.account]
del gajim.interface.instances['account_creation_wizard']
def on_register_server_features_button_clicked(self, widget):
......@@ -2993,6 +2998,8 @@ def on_back_button_clicked(self, widget):
self.notebook.set_current_page(0)
self.back_button.set_sensitive(False)
elif self.notebook.get_current_page() == 3:
if self.account in gajim.connections:
del gajim.connections[self.account]
self.notebook.set_current_page(2)
self.xml.get_widget('form_vbox').remove(self.data_form_widget)
elif self.notebook.get_current_page() == 5: # finish page
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment