aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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);