aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-utils.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-11-11 01:14:07 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-11-11 07:18:11 +0800
commit3dfdf087fc7657905fc7804b59414ecd3d74028e (patch)
tree45a5bb547ca73ebaea9c3276860f93df6d417006 /mail/em-utils.c
parentf70ecb0406903e0fdc09bbf1c9a3367c7ba55ec2 (diff)
downloadgsoc2013-evolution-3dfdf087fc7657905fc7804b59414ecd3d74028e.tar.gz
gsoc2013-evolution-3dfdf087fc7657905fc7804b59414ecd3d74028e.tar.zst
gsoc2013-evolution-3dfdf087fc7657905fc7804b59414ecd3d74028e.zip
Kill more redundant save dialogs and related utilities.
Diffstat (limited to 'mail/em-utils.c')
-rw-r--r--mail/em-utils.c76
1 files changed, 0 insertions, 76 deletions
diff --git a/mail/em-utils.c b/mail/em-utils.c
index 4f264955bd..ee547c4372 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -343,82 +343,6 @@ em_filename_make_safe (gchar *string)
}
}
-/* Saving messages... */
-
-struct _save_messages_data {
- CamelFolder *folder;
- GPtrArray *uids;
-};
-
-static void
-emu_save_messages_response(GtkWidget *filesel, gint response, struct _save_messages_data *data)
-{
- gchar *uri;
-
- if (response == GTK_RESPONSE_OK) {
- uri = gtk_file_chooser_get_uri (GTK_FILE_CHOOSER (filesel));
-
- if (!e_file_can_save((GtkWindow *)filesel, uri)) {
- g_free(uri);
- return;
- }
-
- e_file_update_save_path(gtk_file_chooser_get_current_folder_uri(
- GTK_FILE_CHOOSER (filesel)), TRUE);
- mail_save_messages(data->folder, data->uids, uri, NULL, NULL);
- data->uids = NULL;
- g_free(uri);
- }
-
- camel_object_unref(data->folder);
- if (data->uids)
- em_utils_uids_free(data->uids);
- g_free(data);
- gtk_widget_destroy((GtkWidget *)filesel);
-}
-
-/**
- * em_utils_save_messages:
- * @parent: parent window
- * @folder: folder containing messages to save
- * @uids: uids of messages to save
- *
- * Saves a group of messages to disk in mbox format (prompting the
- * user for filename).
- **/
-void
-em_utils_save_messages (GtkWindow *parent, CamelFolder *folder, GPtrArray *uids)
-{
- struct _save_messages_data *data;
- GtkWidget *filesel;
- gchar *filename = NULL;
- CamelMessageInfo *info = NULL;
-
- g_return_if_fail (GTK_IS_WINDOW (parent));
- g_return_if_fail (CAMEL_IS_FOLDER (folder));
- g_return_if_fail (uids != NULL);
-
- info = camel_folder_get_message_info (folder, uids->pdata[0]);
- if (info) {
- filename = g_strdup (camel_message_info_subject (info));
- e_filename_make_safe (filename);
- camel_message_info_free (info);
- }
-
- filesel = e_file_get_save_filesel (parent, _("Save Message..."), filename, GTK_FILE_CHOOSER_ACTION_SAVE);
- if (filename)
- g_free (filename);
-
- camel_object_ref(folder);
-
- data = g_malloc(sizeof(struct _save_messages_data));
- data->folder = folder;
- data->uids = uids;
-
- g_signal_connect(filesel, "response", G_CALLBACK(emu_save_messages_response), data);
- gtk_widget_show((GtkWidget *)filesel);
-}
-
/* ********************************************************************** */
/* Flag-for-Followup... */