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/ChangeLog | 11 +++++++++++ mail/em-folder-view.c | 21 ++++++++++++++++----- mail/evolution-mail.schemas.in.in | 15 +++++++++++++++ mail/mail-errors.xml | 7 +++++++ mail/mail-errors.xml.h | 5 +++++ 5 files changed, 54 insertions(+), 5 deletions(-) (limited to 'mail') diff --git a/mail/ChangeLog b/mail/ChangeLog index 945a9f4f3a..57ada8d5d4 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,14 @@ +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. + 2005-01-19 Jeffrey Stedfast * em-folder-properties.c (emfp_get_folder_item): Increment i each 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; diff --git a/mail/evolution-mail.schemas.in.in b/mail/evolution-mail.schemas.in.in index 17f3ce4ea7..f4752ef99d 100644 --- a/mail/evolution-mail.schemas.in.in +++ b/mail/evolution-mail.schemas.in.in @@ -646,6 +646,21 @@ + + /schemas/apps/evolution/mail/prompts/open_many + /apps/evolution/mail/prompts/open_many + evolution-mail + bool + true + + Prompt when user tries to open 10 or more messages at once + + If a user tries to open 10 or more messages at one time, ask the user + if they really want to do it. + + + + diff --git a/mail/mail-errors.xml b/mail/mail-errors.xml index a71b35962d..25fa41b99f 100644 --- a/mail/mail-errors.xml +++ b/mail/mail-errors.xml @@ -69,6 +69,13 @@ Many email systems add an Apparently-To header to messages that only have BCC re