diff options
Diffstat (limited to 'widgets/misc')
-rw-r--r-- | widgets/misc/ChangeLog | 6 | ||||
-rw-r--r-- | widgets/misc/e-attachment-bar.c | 23 | ||||
-rw-r--r-- | widgets/misc/e-attachment-bar.h | 2 |
3 files changed, 31 insertions, 0 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog index cb7d96988a..d2e2b007c3 100644 --- a/widgets/misc/ChangeLog +++ b/widgets/misc/ChangeLog @@ -1,3 +1,9 @@ +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. + 2005-11-14 Chenthill Palanisamy <pchenthill@novell.com> * e-dateedit.c: (create_children): Adjusted the size 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) diff --git a/widgets/misc/e-attachment-bar.h b/widgets/misc/e-attachment-bar.h index 638bc5cd3c..97089c1032 100644 --- a/widgets/misc/e-attachment-bar.h +++ b/widgets/misc/e-attachment-bar.h @@ -82,6 +82,8 @@ GtkWidget ** e_attachment_bar_get_selector(EAttachmentBar *bar); GSList *e_attachment_bar_get_parts (EAttachmentBar *bar); GSList *e_attachment_bar_get_selected (EAttachmentBar *bar); void e_attachment_bar_set_width(EAttachmentBar *bar, int bar_width); +GSList * e_attachment_bar_get_all_attachments (EAttachmentBar *bar); + #ifdef __cplusplus } #endif /* __cplusplus */ |