Author: asterix Date: 2007-09-05 23:16:22 +0200 (Wed, 05 Sep 2007) New Revision: 8737
Modified: trunk/src/config.py Log: destroy connection instance when we cancel the addition of an account
Modified: trunk/src/config.py =================================================================== --- trunk/src/config.py 2007-09-05 18:26:42 UTC (rev 8736) +++ trunk/src/config.py 2007-09-05 21:16:22 UTC (rev 8737) @@ -2976,6 +2976,11 @@ 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 @@ 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