Show the "Discard changes" confirmation note whenever the user
[modest] / src / maemo / modest-connection-specific-smtp-window.c
index 09b9e82..64513d2 100644 (file)
@@ -194,7 +194,7 @@ modest_connection_specific_smtp_window_fill_with_connections (ModestConnectionSp
                        /* Get any already-associated connection-specific server account: */
                        gchar *server_account_name = NULL;
                        server_account_name = modest_account_mgr_get_connection_specific_smtp (
-                               priv->account_manager, connection_name);
+                               priv->account_manager, connection_id);
                                        
                        /* Add the row to the model: */
                        GtkTreeIter iter;
@@ -264,7 +264,7 @@ on_button_edit (GtkButton *button, gpointer user_data)
                        server_settings = NULL;
                }
                        
-               gtk_window_set_transient_for (GTK_WINDOW (self), GTK_WINDOW (window));
+               modest_window_mgr_set_modal (modest_runtime_get_window_mgr (), GTK_WINDOW (window));
                
                gboolean dialog_finished = FALSE;
                while (!dialog_finished)
@@ -302,24 +302,8 @@ on_button_edit (GtkButton *button, gpointer user_data)
                        }
                        else
                        {
-                               if (!modest_connection_specific_smtp_edit_window_is_dirty(
-                                               MODEST_CONNECTION_SPECIFIC_SMTP_EDIT_WINDOW(window)))
-                               {
-                                       gtk_widget_hide(window);
-                                       dialog_finished = TRUE;
-                               }
-                               else
-                               {
-                                               
-                                       gint response;
-                                       response = modest_platform_run_confirmation_dialog (GTK_WINDOW (window), 
-                                                                           _("imum_nc_wizard_confirm_lose_changes"));                   
-                                       if (response == GTK_RESPONSE_OK)
-                                       {
-                                               gtk_widget_hide(window);
-                                               dialog_finished = TRUE;
-                                       }
-                               }
+                               gtk_widget_hide(window);
+                               dialog_finished = TRUE;
                        }
                }
        }
@@ -537,7 +521,7 @@ modest_connection_specific_smtp_window_save_server_accounts (ModestConnectionSpe
                                
                                /* associate the specific server account with this connection for this account: */
                                success = success && modest_account_mgr_set_connection_specific_smtp (
-                                       priv->account_manager, connection_name, server_account_name);
+                                       priv->account_manager, id, server_account_name);
                                
                                /* Save the new name in the treemodel, so it can be edited again later: */
                                gtk_list_store_set (GTK_LIST_STORE (priv->model), &iter, 
@@ -546,10 +530,10 @@ modest_connection_specific_smtp_window_save_server_accounts (ModestConnectionSpe
                        } else {
                                modest_account_mgr_save_server_settings (mgr, server_settings);
                        }
-               } else if (connection_name && server_name && 
+               } else if (id && server_name && 
                           !strcmp (server_name, _("mcen_ia_optionalsmtp_notdefined"))) {
                        modest_account_mgr_remove_connection_specific_smtp (priv->account_manager, 
-                                                                           connection_name);
+                                                                           id);
                        gtk_list_store_set (GTK_LIST_STORE (priv->model), &iter, 
                                            MODEL_COL_SERVER_ACCOUNT_NAME, NULL, -1);
                }