* src/maemo/modest-msg-edit-window.c:
authorJose Dapena Paz <jdapena@igalia.com>
Wed, 6 Jun 2007 15:06:50 +0000 (15:06 +0000)
committerJose Dapena Paz <jdapena@igalia.com>
Wed, 6 Jun 2007 15:06:50 +0000 (15:06 +0000)
        * When you request to remove attachments, and you
          cancel in the confirmation dialog, the attachments
          were removed anyway. Now it respects the dialog
          response (fixes NB#57929).

pmo-trunk-r2087

src/maemo/modest-msg-edit-window.c

index 1f0ebb6..791c04c 100644 (file)
@@ -1576,6 +1576,11 @@ modest_msg_edit_window_remove_attachments (ModestMsgEditWindow *window,
                }
                dialog_response = (gtk_dialog_run (GTK_DIALOG (confirmation_dialog))==GTK_RESPONSE_OK);
                gtk_widget_destroy (confirmation_dialog);
+               if (!dialog_response) {
+                       if (clean_list)
+                               g_list_free (att_list);
+                       return;
+               }
                hildon_banner_show_information (NULL, NULL, _("mcen_ib_removing_attachment"));
 
                for (node = att_list; node != NULL; node = g_list_next (node)) {