aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-utils.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-09-30 20:16:30 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-10-01 01:55:38 +0800
commit75b078e99793350fa2f54ca80b72213d1bfbb17f (patch)
tree1327ffa3b9e87538e6302aeff6f64e28e6935d98 /mail/em-utils.c
parentdb5afff530e35d643f23b8d4e35c930e26e58804 (diff)
downloadgsoc2013-evolution-75b078e99793350fa2f54ca80b72213d1bfbb17f.tar
gsoc2013-evolution-75b078e99793350fa2f54ca80b72213d1bfbb17f.tar.gz
gsoc2013-evolution-75b078e99793350fa2f54ca80b72213d1bfbb17f.tar.bz2
gsoc2013-evolution-75b078e99793350fa2f54ca80b72213d1bfbb17f.tar.lz
gsoc2013-evolution-75b078e99793350fa2f54ca80b72213d1bfbb17f.tar.xz
gsoc2013-evolution-75b078e99793350fa2f54ca80b72213d1bfbb17f.tar.zst
gsoc2013-evolution-75b078e99793350fa2f54ca80b72213d1bfbb17f.zip
Kill em_utils_temp_save_part().
Rewrite the last usage of it in itip-formatter.c to use EAttachments instead. This also allowed me to kill mail_save_part() in mail-ops.c. I may need to reevaluate the EAttachment API at some point for all these fringe EAttachment uses we're accumulating. Having to asynchronously "load" an EAttachment whose content is already in memory kinda sucks.
Diffstat (limited to 'mail/em-utils.c')
-rw-r--r--mail/em-utils.c64
1 files changed, 0 insertions, 64 deletions
diff --git a/mail/em-utils.c b/mail/em-utils.c
index c7b7020b4b..971d74f892 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -84,8 +84,6 @@ extern const gchar *shell_builtin_backend;
/* 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)
gboolean
@@ -943,68 +941,6 @@ em_utils_selection_get_urilist (GtkSelectionData *selection_data,
g_strfreev (uris);
}
-static void
-emu_save_part_done (CamelMimePart *part, gchar *name, gint done, gpointer data)
-{
- ((gint *)data)[0] = done;
-}
-
-/**
- * em_utils_temp_save_part:
- * @parent:
- * @part:
- * @mode: readonly or not.
- *
- * Save a part's content to a temporary file, and return the
- * filename.
- *
- * Return value: NULL if anything failed.
- **/
-gchar *
-em_utils_temp_save_part (GtkWidget *parent, CamelMimePart *part, gboolean mode)
-{
- const gchar *filename;
- gchar *tmpdir, *path, *utf8_mfilename = NULL, *mfilename = NULL;
- gint done;
- GtkWidget *w;
-
- tmpdir = e_mkdtemp("evolution-tmp-XXXXXX");
- if (tmpdir == NULL) {
- w = e_alert_dialog_new_for_args ((GtkWindow *)parent, "mail:no-create-tmp-path", g_strerror(errno), NULL);
- em_utils_show_error_silent (w);
- return NULL;
- }
-
- filename = camel_mime_part_get_filename (part);
- if (filename == NULL) {
- /* This is the default filename used for temporary file creation */
- filename = _("Unknown");
- } else {
- utf8_mfilename = g_strdup (filename);
- e_filename_make_safe (utf8_mfilename);
- mfilename = g_filename_from_utf8 ((const gchar *) utf8_mfilename, -1, NULL, NULL, NULL);
- g_free (utf8_mfilename);
- filename = (const gchar *) mfilename;
- }
-
- path = g_build_filename (tmpdir, filename, NULL);
- g_free (tmpdir);
- g_free (mfilename);
-
- /* FIXME: This doesn't handle default charsets */
- if (mode)
- mail_msg_wait (mail_save_part (part, path, emu_save_part_done, &done, TRUE));
- else
- mail_msg_wait (mail_save_part (part, path, emu_save_part_done, &done, FALSE));
- if (!done) {
- /* mail_save_part should popup an error box automagically */
- g_free (path);
- path = NULL;
- }
-
- return path;
-}
-
/** em_utils_folder_is_templates:
* @folder: folder
* @uri: uri for this folder, if known