aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-utils.c
diff options
context:
space:
mode:
authorRitesh Khadgaray <khadgaray@gmail.com>2009-11-20 05:08:34 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-11-20 05:08:34 +0800
commit82e862889dce6540714a90444473454e3ef9c66b (patch)
tree19da02f512fdffd883177460cfaba0bbfeacd76c /mail/em-utils.c
parentf11f1c477dfbdbe666ad5627ad44ac95bd7c816f (diff)
downloadgsoc2013-evolution-82e862889dce6540714a90444473454e3ef9c66b.tar
gsoc2013-evolution-82e862889dce6540714a90444473454e3ef9c66b.tar.gz
gsoc2013-evolution-82e862889dce6540714a90444473454e3ef9c66b.tar.bz2
gsoc2013-evolution-82e862889dce6540714a90444473454e3ef9c66b.tar.lz
gsoc2013-evolution-82e862889dce6540714a90444473454e3ef9c66b.tar.xz
gsoc2013-evolution-82e862889dce6540714a90444473454e3ef9c66b.tar.zst
gsoc2013-evolution-82e862889dce6540714a90444473454e3ef9c66b.zip
BugĀ 563555 - Confirm before forwarding many emails inline
Diffstat (limited to 'mail/em-utils.c')
-rw-r--r--mail/em-utils.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/mail/em-utils.c b/mail/em-utils.c
index 407c686a21..1ccea47a8d 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -79,6 +79,10 @@
#include "em-format-quote.h"
#include "e-mail-local.h"
+/* How many is too many? */
+/* Used in em_util_ask_open_many() */
+#define TOO_MANY 10
+
static void emu_save_part_done (CamelMimePart *part, gchar *name, gint done, gpointer data);
#define d(x)
@@ -113,6 +117,25 @@ em_utils_get_config_dir (void)
return e_shell_backend_get_config_dir (shell_backend);
}
+gboolean
+em_utils_ask_open_many (GtkWindow *parent,
+ gint how_many)
+{
+ gchar *string;
+ gboolean proceed;
+
+ if (how_many < TOO_MANY)
+ return TRUE;
+
+ string = g_strdup_printf ("%d", how_many);
+ proceed = em_utils_prompt_user (
+ parent, "/apps/evolution/mail/prompts/open_many",
+ "mail:ask-open-many", string, NULL);
+ g_free (string);
+
+ return proceed;
+}
+
/**
* em_utils_prompt_user:
* @parent: parent window