From 6bce1bd247197a3546c47f84d5f87faa47a68924 Mon Sep 17 00:00:00 2001 From: hiro Date: Fri, 17 Jun 2016 08:52:02 +0000 Subject: added compose_get_attach_list(). git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@3514 ee746299-78ed-0310-b773-934348b2243d --- src/compose.c | 17 +++++++++++++++++ src/compose.h | 1 + 2 files changed, 18 insertions(+) diff --git a/src/compose.c b/src/compose.c index 95374a67..4660428b 100644 --- a/src/compose.c +++ b/src/compose.c @@ -6508,6 +6508,23 @@ void compose_attach_remove_all(Compose *compose) gtk_list_store_clear(GTK_LIST_STORE(model)); } +GSList *compose_get_attach_list(Compose *compose) +{ + GtkTreeModel *model = GTK_TREE_MODEL(compose->attach_store); + GtkTreeIter iter; + gboolean valid; + AttachInfo *ainfo; + GSList *alist = NULL; + + for (valid = gtk_tree_model_get_iter_first(model, &iter); valid; + valid = gtk_tree_model_iter_next(model, &iter)) { + gtk_tree_model_get(model, &iter, COL_ATTACH_INFO, &ainfo, -1); + alist = g_slist_append(alist, ainfo); + } + + return alist; +} + static struct _AttachProperty { GtkWidget *window; diff --git a/src/compose.h b/src/compose.h index ba8f9ee9..7076e460 100644 --- a/src/compose.h +++ b/src/compose.h @@ -257,6 +257,7 @@ void compose_attach_append (Compose *compose, const gchar *filename, const gchar *content_type); void compose_attach_remove_all (Compose *compose); +GSList *compose_get_attach_list (Compose *compose); gint compose_send (Compose *compose, gboolean close_on_success); -- cgit v1.2.3