From 774affb0aa62f4feb53e6a2e14f5ab2703d7beeb Mon Sep 17 00:00:00 2001 From: Not Zed Date: Thu, 20 Jan 2005 03:56:22 +0000 Subject: ** See bug #55831. 2005-01-20 Not Zed ** See bug #55831. * evolution-mail.schemas.in.in: added open_many prompt key. * mail-errors.xml: added ask-open-many * em-folder-view.c (em_folder_view_open_selected): put back the 'you're opening too many are you sure' thing. svn path=/trunk/; revision=28454 --- mail/em-folder-view.c | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) (limited to 'mail/em-folder-view.c') diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c index 2d82f11fcc..bfa4cb783c 100644 --- a/mail/em-folder-view.c +++ b/mail/em-folder-view.c @@ -368,15 +368,26 @@ em_folder_view_open_selected(EMFolderView *emfv) int i = 0; uids = message_list_get_selected(emfv->list); - + + if (uids->len >= 10) { + char *num = g_strdup_printf("%d", uids->len); + int doit; + + doit = em_utils_prompt_user((GtkWindow *)gtk_widget_get_toplevel((GtkWidget *)emfv), + "/apps/evolution/mail/prompts/open_many", + "mail:ask-open-many", num, NULL); + g_free(num); + if (!doit) { + message_list_free_uids(emfv->list, uids); + return 0; + } + } + if (em_utils_folder_is_drafts(emfv->folder, emfv->folder_uri) || em_utils_folder_is_outbox(emfv->folder, emfv->folder_uri)) { - em_utils_edit_messages (emfv->folder, uids, TRUE); + em_utils_edit_messages(emfv->folder, uids, TRUE); } else { /* TODO: have an em_utils_open_messages call? */ - - /* FIXME: 'are you sure' for > 10 messages; is this even necessary? */ - for (i=0; ilen; i++) { EMMessageBrowser *emmb; -- cgit