+_purged_attach_selected (ModestWindow *win)
+{
+ GList *attachments, *node;
+ gint n_selected;
+ gboolean result = FALSE;
+
+ if (MODEST_IS_MSG_VIEW_WINDOW (win)) {
+
+ /* Get selected atachments */
+ attachments = modest_msg_view_window_get_attachments (MODEST_MSG_VIEW_WINDOW(win));
+ n_selected = g_list_length (attachments);
+
+ for (node = attachments; node != NULL && !result; node = g_list_next (node)) {
+ TnyMimePart *mime_part = TNY_MIME_PART (node->data);
+ if (tny_mime_part_is_purged (mime_part)) {
+ result = TRUE;
+ break;
+ }
+ }
+
+ /* Free */
+ g_list_free (attachments);
+ }
+
+ return result;
+}
+
+static gboolean