From 17957b82973240ce944196c993d042b3ba568076 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Tue, 11 Dec 2001 21:55:55 +0000 Subject: If multiple-selection is enabled but nothing is slected, fall back to 2001-12-11 Jeffrey Stedfast * e-msg-composer-select-file.c (confirm): If multiple-selection is enabled but nothing is slected, fall back to using the filename in the entry box as the "selected" file. svn path=/trunk/; revision=14994 --- composer/ChangeLog | 6 ++++++ composer/e-msg-composer-select-file.c | 11 +++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) (limited to 'composer') diff --git a/composer/ChangeLog b/composer/ChangeLog index 4b8f010237..e33769832c 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,9 @@ +2001-12-11 Jeffrey Stedfast + + * e-msg-composer-select-file.c (confirm): If multiple-selection is + enabled but nothing is slected, fall back to using the filename in + the entry box as the "selected" file. + 2001-12-11 Jeffrey Stedfast * e-msg-composer-select-file.c diff --git a/composer/e-msg-composer-select-file.c b/composer/e-msg-composer-select-file.c index 82733f9e5b..173664aace 100644 --- a/composer/e-msg-composer-select-file.c +++ b/composer/e-msg-composer-select-file.c @@ -45,15 +45,18 @@ static void confirm (FileSelectionInfo *info) { const char *filename; - GtkWidget *file_list; + GtkCList *file_list; char *path; GList *l; - if (info->multiple) { + file_list = GTK_CLIST (GTK_FILE_SELECTION (info->widget)->file_list); + + if (info->multiple && file_list->selection) { /* evil kludgy hack cuz the gtk file selector fucking sucks ass */ path = g_dirname (gtk_file_selection_get_filename (GTK_FILE_SELECTION (info->widget))); - file_list = GTK_FILE_SELECTION (info->widget)->file_list; - l = GTK_CLIST (file_list)->selection; + + l = file_list->selection; + while (l) { int row; -- cgit v1.2.3