diff options
author | Srinivasa Ragavan <sragavan@novell.com> | 2005-11-16 01:08:51 +0800 |
---|---|---|
committer | Srinivasa Ragavan <sragavan@src.gnome.org> | 2005-11-16 01:08:51 +0800 |
commit | 201ef5f000326079a34796af26833b61ebdb97e8 (patch) | |
tree | 2ffcfe0825f24b664bd21d3bdb116d084f1ea860 /widgets/misc/e-attachment-bar.c | |
parent | 08e531bac2635e28a997bab36423fced386bab37 (diff) | |
download | gsoc2013-evolution-201ef5f000326079a34796af26833b61ebdb97e8.tar.gz gsoc2013-evolution-201ef5f000326079a34796af26833b61ebdb97e8.tar.zst gsoc2013-evolution-201ef5f000326079a34796af26833b61ebdb97e8.zip |
Added a function to get all attachments of the attachment bar for plugin
2005-11-15 Srinivasa Ragavan <sragavan@novell.com>
* e-attachment-bar.[ch] (e_attachment_bar_get_all_attachments): Added
a function to get all attachments of the attachment bar for plugin
purposes.
svn path=/trunk/; revision=30620
Diffstat (limited to 'widgets/misc/e-attachment-bar.c')
-rw-r--r-- | widgets/misc/e-attachment-bar.c | 23 |
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) |