aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2016-06-17 08:52:02 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2016-06-17 08:52:02 +0000
commit6bce1bd247197a3546c47f84d5f87faa47a68924 (patch)
tree7e1688e17f94b0bc3b3b6bee67283a459e815a76
parent5b4a9f7089f4cfd4b37d477b9aaa42517238f9a2 (diff)
added compose_get_attach_list().
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@3514 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r--src/compose.c17
-rw-r--r--src/compose.h1
2 files changed, 18 insertions, 0 deletions
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);