X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fwidgets%2Fmodest-attachments-view.c;h=76706a8095e4ca6b2a763d2bf5f3687804fbd263;hb=52665b57b1c2770d5542fb0e70f96d6853225eb8;hp=e03795aa2dc19b58070c73c08803db859229cadd;hpb=80677408e08caff16abe8af6c30e10359b642d9f;p=modest diff --git a/src/widgets/modest-attachments-view.c b/src/widgets/modest-attachments-view.c index e03795a..76706a8 100644 --- a/src/widgets/modest-attachments-view.c +++ b/src/widgets/modest-attachments-view.c @@ -655,6 +655,27 @@ modest_attachments_view_get_selection (ModestAttachmentsView *atts_view) return selection; } +GList * +modest_attachments_view_get_attachments (ModestAttachmentsView *atts_view) +{ + ModestAttachmentsViewPrivate *priv; + GList *children, *node, *att_list = NULL; + + g_return_val_if_fail (MODEST_IS_ATTACHMENTS_VIEW (atts_view), NULL); + priv = MODEST_ATTACHMENTS_VIEW_GET_PRIVATE (atts_view); + + children = gtk_container_get_children (GTK_CONTAINER (priv->box)); + for (node = children; node != NULL; node = g_list_next (node)) { + GtkWidget *att_view = GTK_WIDGET (node->data); + TnyMimePart *mime_part = tny_mime_part_view_get_part (TNY_MIME_PART_VIEW (att_view)); + att_list = g_list_prepend (att_list, mime_part); + } + g_list_free (children); + att_list = g_list_reverse (att_list); + return att_list; + +} + void modest_attachments_view_select_all (ModestAttachmentsView *atts_view) {