aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2005-01-20 11:56:22 +0800
committerMichael Zucci <zucchi@src.gnome.org>2005-01-20 11:56:22 +0800
commit774affb0aa62f4feb53e6a2e14f5ab2703d7beeb (patch)
tree4d0001db11dd96198bc0e623ccf13ab84aa5b4e5
parentc735fd6d802d141cfa2be6d8c4ee3837a2b17898 (diff)
downloadgsoc2013-evolution-774affb0aa62f4feb53e6a2e14f5ab2703d7beeb.tar
gsoc2013-evolution-774affb0aa62f4feb53e6a2e14f5ab2703d7beeb.tar.gz
gsoc2013-evolution-774affb0aa62f4feb53e6a2e14f5ab2703d7beeb.tar.bz2
gsoc2013-evolution-774affb0aa62f4feb53e6a2e14f5ab2703d7beeb.tar.lz
gsoc2013-evolution-774affb0aa62f4feb53e6a2e14f5ab2703d7beeb.tar.xz
gsoc2013-evolution-774affb0aa62f4feb53e6a2e14f5ab2703d7beeb.tar.zst
gsoc2013-evolution-774affb0aa62f4feb53e6a2e14f5ab2703d7beeb.zip
** See bug #55831.
2005-01-20 Not Zed <NotZed@Ximian.com> ** 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
-rw-r--r--mail/ChangeLog11
-rw-r--r--mail/em-folder-view.c21
-rw-r--r--mail/evolution-mail.schemas.in.in15
-rw-r--r--mail/mail-errors.xml7
-rw-r--r--mail/mail-errors.xml.h5
5 files changed, 54 insertions, 5 deletions
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 <NotZed@Ximian.com>
+
+ ** 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 <fejj@novell.com>
* 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; i<uids->len; 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 @@
</locale>
</schema>
+ <schema>
+ <key>/schemas/apps/evolution/mail/prompts/open_many</key>
+ <applyto>/apps/evolution/mail/prompts/open_many</applyto>
+ <owner>evolution-mail</owner>
+ <type>bool</type>
+ <default>true</default>
+ <locale name="C">
+ <short>Prompt when user tries to open 10 or more messages at once</short>
+ <long>
+ If a user tries to open 10 or more messages at one time, ask the user
+ if they really want to do it.
+ </long>
+ </locale>
+ </schema>
+
<!-- Trash settings -->
<schema>
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
<button label="_Empty Trash" response="GTK_RESPONSE_YES"/>
</error>
+ <error id="ask-open-many" type="warning" default="GTK_RESPONSE_CANCEL">
+ <primary>Are you sure you want to open {0} messages at once?</primary>
+ <secondary>Opening too many messages at once may take a long time.</secondary>
+ <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
+ <button label="_Open Messages" response="GTK_RESPONSE_YES"/>
+ </error>
+
<error id="exit-unsaved" type="warning" default="GTK_RESPONSE_NO">
<primary>You have unsent messages, do you wish to quit anyway?</primary>
<secondary>If you quit, these messages will not be sent until Evolution is started again.</secondary>
diff --git a/mail/mail-errors.xml.h b/mail/mail-errors.xml.h
index 9994212fba..afa7479588 100644
--- a/mail/mail-errors.xml.h
+++ b/mail/mail-errors.xml.h
@@ -49,6 +49,11 @@ char *s = N_("Are you sure you want to permanently remove all the deleted messag
/* mail:ask-empty-trash secondary */
char *s = N_("If you continue, you will not be able to recover these messages.");
char *s = N_("_Empty Trash");
+/* mail:ask-open-many primary */
+char *s = N_("Are you sure you want to open {0} messages at once?");
+/* mail:ask-open-many secondary */
+char *s = N_("Opening too many messages at once may take a long time.");
+char *s = N_("_Open Messages");
/* mail:exit-unsaved primary */
char *s = N_("You have unsent messages, do you wish to quit anyway?");
/* mail:exit-unsaved secondary */