aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-attachment-bar.c
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/misc/e-attachment-bar.c')
-rw-r--r--widgets/misc/e-attachment-bar.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/widgets/misc/e-attachment-bar.c b/widgets/misc/e-attachment-bar.c
index 2903ee4c88..5de718f914 100644
--- a/widgets/misc/e-attachment-bar.c
+++ b/widgets/misc/e-attachment-bar.c
@@ -600,6 +600,29 @@ e_attachment_bar_get_attachment (EAttachmentBar *bar, int id)
return attachments;
}
+GSList *
+e_attachment_bar_get_all_attachments (EAttachmentBar *bar)
+{
+ GSList *attachments = NULL;
+ GList *p;
+ EAttachment *attachment;
+
+ g_return_val_if_fail (bar != NULL, 0);
+ g_return_val_if_fail (E_IS_ATTACHMENT_BAR (bar), 0);
+
+ for ( p = bar->priv->attachments; p!= NULL; p = p->next) {
+ attachment = p->data;
+ if (attachment && attachment->is_available_local) {
+ g_object_ref (attachment);
+ attachments= g_slist_prepend(attachments, attachment);
+ }
+ }
+
+ attachments = g_slist_reverse(attachments);
+
+ return attachments;
+}
+
/* Just the GSList has to be freed by the caller */
GSList *
e_attachment_bar_get_parts (EAttachmentBar *bar)