X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmaemo%2Fmodest-msg-view-window.c;h=29e67b68300d4612d24bf0d526ffaef2c096e303;hp=793c4232ee39f666f806a1273cd6b554723f89b9;hb=c04e24ad16b9a570a1152ec2c05c953fe39a3c3c;hpb=0c840c247895663c09915b97c79cfe5993ae7f06 diff --git a/src/maemo/modest-msg-view-window.c b/src/maemo/modest-msg-view-window.c index 793c423..29e67b6 100644 --- a/src/maemo/modest-msg-view-window.c +++ b/src/maemo/modest-msg-view-window.c @@ -1773,6 +1773,8 @@ modest_msg_view_window_remove_attachments (ModestMsgViewWindow *window) gchar *confirmation_message; gint response; gint n_attachments; + TnyMsg *msg; +/* TnyFolder *folder; */ g_return_if_fail (MODEST_IS_MSG_VIEW_WINDOW (window)); priv = MODEST_MSG_VIEW_WINDOW_GET_PRIVATE (window); @@ -1808,11 +1810,23 @@ modest_msg_view_window_remove_attachments (ModestMsgViewWindow *window) if (response != GTK_RESPONSE_OK) return; + msg = modest_msg_view_get_message (MODEST_MSG_VIEW (priv->msg_view)); +/* folder = tny_msg_get_folder (msg); */ +/* tny_msg_uncache_attachments (msg); */ +/* tny_folder_refresh (folder, NULL); */ +/* g_object_unref (folder); */ + + modest_msg_view_set_message (MODEST_MSG_VIEW (priv->msg_view), msg); + for (node = mime_parts; node != NULL; node = g_list_next (node)) { - modest_msg_view_remove_attachment (MODEST_MSG_VIEW (priv->msg_view), node->data); + tny_mime_part_set_purged (TNY_MIME_PART (node->data)); +/* modest_msg_view_remove_attachment (MODEST_MSG_VIEW (priv->msg_view), node->data); */ } + tny_msg_rewrite_cache (msg); g_list_foreach (mime_parts, (GFunc) g_object_unref, NULL); g_list_free (mime_parts); + modest_platform_information_banner (NULL, NULL, _("mcen_ib_removing_attachment")); + }