- gboolean dialog_finished = FALSE;
- while (!dialog_finished)
- {
- gint response = gtk_dialog_run (GTK_DIALOG (window));
- if (response == GTK_RESPONSE_OK) {
- gtk_widget_hide (window);
- dialog_finished = TRUE;
- /* Delete any previous data for this row: */
- if (data)
- {
- modest_account_mgr_free_server_account_data (priv->account_manager, data);
- data = NULL;
- }
-
- /* Get the new account data and save it in the row for later:
- * We free this in finalize(),
- * and save it to our configuration in
- * modest_connection_specific_smtp_window_save_server_accounts(). */
- data = modest_connection_specific_smtp_edit_window_get_settings (
- MODEST_CONNECTION_SPECIFIC_SMTP_EDIT_WINDOW (window),
- priv->account_manager);
-
- if (data) {
- gtk_list_store_set (GTK_LIST_STORE (priv->model), &iter,
- MODEL_COL_SERVER_ACCOUNT_DATA, data,
- MODEL_COL_SERVER_NAME, data->hostname,
- -1);
- } else {
- gtk_list_store_set (GTK_LIST_STORE (priv->model), &iter,
- MODEL_COL_SERVER_ACCOUNT_DATA, NULL,
- MODEL_COL_SERVER_NAME, NULL,
- MODEL_COL_SERVER_ACCOUNT_NAME, NULL,
- -1);
- }
+ gint response = gtk_dialog_run (GTK_DIALOG (window));
+ if (response == GTK_RESPONSE_OK) {
+
+ /* Delete any previous data for this row: */
+ if (server_settings) {
+ g_object_unref (server_settings);
+ server_settings = NULL;