diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-12-11 09:01:05 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-12-11 09:01:05 +0800 |
commit | 19339ece3065266c8d786f052b81ef8ef1988d28 (patch) | |
tree | 5174dcdcc0aecccdd738ccaba872e74a69f114ad /composer/e-msg-composer-attachment-bar.c | |
parent | 63ce54907cd9f30f046e90be07ead0346ffe7154 (diff) | |
download | gsoc2013-evolution-19339ece3065266c8d786f052b81ef8ef1988d28.tar gsoc2013-evolution-19339ece3065266c8d786f052b81ef8ef1988d28.tar.gz gsoc2013-evolution-19339ece3065266c8d786f052b81ef8ef1988d28.tar.bz2 gsoc2013-evolution-19339ece3065266c8d786f052b81ef8ef1988d28.tar.lz gsoc2013-evolution-19339ece3065266c8d786f052b81ef8ef1988d28.tar.xz gsoc2013-evolution-19339ece3065266c8d786f052b81ef8ef1988d28.tar.zst gsoc2013-evolution-19339ece3065266c8d786f052b81ef8ef1988d28.zip |
select_file_attachments now returns a GPtrArray so handle that and loop
2001-12-10 Jeffrey Stedfast <fejj@ximian.com>
* e-msg-composer-attachment-bar.c (add_from_user):
select_file_attachments now returns a GPtrArray so handle that and
loop until we've added all the attachment files.
* e-msg-composer-select-file.c (confirm): Add an evil kludge to
get a list of filenames from the GtkFileSelection widget based on
the label in the history option menu item and the base filenames
of the selected items in the filename clist.
(create_file_selection): Setup the clist to allow multiple
selection.
(file_selection_info_destroy_notify): Destroy the GPtrArray
containing the list of xselected files.
(select_file_internal): Return a GPtrArray of files instead of a
char *.
svn path=/trunk/; revision=14968
Diffstat (limited to 'composer/e-msg-composer-attachment-bar.c')
-rw-r--r-- | composer/e-msg-composer-attachment-bar.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/composer/e-msg-composer-attachment-bar.c b/composer/e-msg-composer-attachment-bar.c index b565ea8788..16c68bf910 100644 --- a/composer/e-msg-composer-attachment-bar.c +++ b/composer/e-msg-composer-attachment-bar.c @@ -442,18 +442,22 @@ static void add_from_user (EMsgComposerAttachmentBar *bar) { EMsgComposer *composer; - char *file_name; + GPtrArray *file_list; gboolean is_inline = FALSE; + int i; composer = E_MSG_COMPOSER (gtk_widget_get_toplevel (GTK_WIDGET (bar))); - file_name = e_msg_composer_select_file_attachment (composer, &is_inline); - if (!file_name) + file_list = e_msg_composer_select_file_attachments (composer, &is_inline); + if (!file_list) return; - add_from_file (bar, file_name, is_inline ? "inline" : "attachment"); + for (i = 0; i < file_list->len; i++) { + add_from_file (bar, file_list->pdata[i], is_inline ? "inline" : "attachment"); + g_free (file_list->pdata[i]); + } - g_free (file_name); + g_ptr_array_free (file_list, TRUE); } |