aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-tools.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2001-01-22 19:43:18 +0800
committerMichael Zucci <zucchi@src.gnome.org>2001-01-22 19:43:18 +0800
commit88f9e3608650e8b95a5a326902ad1de5a40602c0 (patch)
tree56be954a8eaed1166f12831b9d4f7485786be6cb /mail/mail-tools.c
parent4c9ec36493cba709c63dc366d768b6162c1acfde (diff)
downloadgsoc2013-evolution-88f9e3608650e8b95a5a326902ad1de5a40602c0.tar
gsoc2013-evolution-88f9e3608650e8b95a5a326902ad1de5a40602c0.tar.gz
gsoc2013-evolution-88f9e3608650e8b95a5a326902ad1de5a40602c0.tar.bz2
gsoc2013-evolution-88f9e3608650e8b95a5a326902ad1de5a40602c0.tar.lz
gsoc2013-evolution-88f9e3608650e8b95a5a326902ad1de5a40602c0.tar.xz
gsoc2013-evolution-88f9e3608650e8b95a5a326902ad1de5a40602c0.tar.zst
gsoc2013-evolution-88f9e3608650e8b95a5a326902ad1de5a40602c0.zip
remove a warning with conditional news compilation.
2001-01-22 Not Zed <NotZed@Ximian.com> * component-factory.c (owner_set_cb): remove a warning with conditional news compilation. * mail-ops.h: Cleaned up the header list. * folder-browser-factory.c: Replace the old get_send mail with the new one (button). * mail-ops.c (set_x_mailer): (mail_load_evolution_rule_context): (mail_do_fetch_mail): (mail_do_filter_ondemand): (mail_send_mail_old): (mail_do_send_queue): All removed, (for) now lives in mail-send-recv.c. (load_context): (setup_filter_driver): (filter_get_folder): (mail_filter_folder): (mail_fetch_mail): (mail_update_subfolders): (mail_send_mail): (mail_send_queue): New equivalents of all these fundtions, moved from mail-send-recv.c ... (mail_filter_on_demand): Moved here too. (mail_load_filter_context): Export this. * mail-callbacks.c (apply_filters): Use the new mail_filter_on_demand() call. (send_receieve_mail): Use mail_send_receive to do the work. Add a little error handling here that used to be elsewhere. (send_queued_mail): Removed. (fetch_mail): Removed. (select_first_unread): #ifdef'd this out. Not sure if this still makes sense, but it doesn't get run right now anyway. (composer_postpone_cb): Fix the setting of message flags. You dont need to get them first, ever. * mail-send-recv.c (mail_send_message): Dont use mail_tool_send_via_transport anymore (it does nothing useful). * mail-tools.c (mail_tool_camel_lock_up): Turned into a noop. (mail_tool_camel_lock_down): And here too. (mail_tool_move_folder_contents): Removed from the code (hasn't bene used for ages). (mail_tool_send_via_transport): Removed, it doesn't save anything. svn path=/trunk/; revision=7702
Diffstat (limited to 'mail/mail-tools.c')
-rw-r--r--mail/mail-tools.c157
1 files changed, 4 insertions, 153 deletions
diff --git a/mail/mail-tools.c b/mail/mail-tools.c
index ff82630e53..b3f1590440 100644
--- a/mail/mail-tools.c
+++ b/mail/mail-tools.c
@@ -52,6 +52,8 @@ static GPrivate *camel_locklevel = NULL;
void mail_tool_camel_lock_up (void)
{
+ return;
+
G_LOCK (camel_locklevel);
if (camel_locklevel == NULL)
@@ -70,6 +72,8 @@ void mail_tool_camel_lock_up (void)
void mail_tool_camel_lock_down (void)
{
+ return;
+
G_LOCK (camel_locklevel);
if (camel_locklevel == NULL) {
@@ -221,140 +225,6 @@ mail_tool_do_movemail (const gchar *source_url, CamelException *ex)
return dest_path;
}
-#if 0
-void
-mail_tool_move_folder_contents (CamelFolder *source, CamelFolder *dest, gboolean use_cache, CamelException *ex)
-{
- CamelUIDCache *cache;
- GPtrArray *uids;
- int i;
- gboolean summary_capability;
- time_t last_update = 0;
-
- mail_tool_camel_lock_up();
-
- camel_object_ref (CAMEL_OBJECT (source));
- camel_object_ref (CAMEL_OBJECT (dest));
-
- /* Get all uids of source */
-
- mail_op_set_message (_("Examining %s"), source->full_name);
-
- uids = camel_folder_get_uids (source);
- printf ("mail_tool_move_folder: got %d messages in source\n", uids->len);
-
- /* If we're using the cache, ... use it */
-
- if (use_cache) {
- GPtrArray *new_uids;
- char *url, *p, *filename;
-
- url = camel_url_to_string (
- CAMEL_SERVICE (source->parent_store)->url, FALSE);
- for (p = url; *p; p++) {
- if (!isascii ((unsigned char)*p) ||
- strchr (" /'\"`&();|<>${}!", *p))
- *p = '_';
- }
- filename = g_strdup_printf ("%s/config/cache-%s",
- evolution_dir, url);
- g_free (url);
-
- cache = camel_uid_cache_new (filename);
-
- if (cache) {
- new_uids = camel_uid_cache_get_new_uids (cache, uids);
- camel_folder_free_uids (source, uids);
- uids = new_uids;
- } else {
- camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
- _("Could not read UID "
- "cache file \"%s\". You may "
- "receive duplicate "
- "messages."), filename);
- }
-
- g_free (filename);
- } else
- cache = NULL;
-
- printf ("mail_tool_move_folder: %d of those messages are new\n", uids->len);
-
- summary_capability = camel_folder_has_summary_capability (source);
-
- /* Copy the messages */
- for (i = 0; i < uids->len; i++) {
- CamelMimeMessage *msg;
- CamelMessageInfo *info = NULL;
- const gboolean last_message = (i+1 == uids->len);
- time_t now;
-
- /* Info */
-
- /*
- * Only update display every 2 seconds, as mail_op_set_message
- * is an expensive operation
- */
- time (&now);
- if (last_message || ((now - last_update) > 2)) {
- mail_op_set_message (_("Retrieving message %d of %d"),
- i + 1, uids->len);
- last_update = now;
- }
-
- /* Get the message */
-
- msg = camel_folder_get_message (source, uids->pdata[i], ex);
- if (camel_exception_is_set (ex)) {
- camel_object_unref (CAMEL_OBJECT (msg));
- goto cleanup;
- }
-
- /* Append it to dest */
-
- mail_op_set_message (_("Writing message %d of %d"),
- i + 1, uids->len);
-
- if (summary_capability)
- info = camel_folder_get_message_info (source, uids->pdata[i]);
- camel_folder_append_message (dest, msg, info, ex);
- if (summary_capability)
- camel_folder_free_message_info(source, info);
-
- if (camel_exception_is_set (ex)) {
- camel_object_unref (CAMEL_OBJECT (msg));
- goto cleanup;
- }
-
- /* (Maybe) get rid of the message */
-
- camel_object_unref (CAMEL_OBJECT (msg));
- if (!use_cache)
- camel_folder_delete_message (source, uids->pdata[i]);
- }
-
- /* All done. Sync n' free. */
-
- if (cache) {
- camel_uid_cache_free_uids (uids);
-
- if (!camel_exception_is_set (ex))
- camel_uid_cache_save (cache);
- camel_uid_cache_destroy (cache);
- } else
- camel_folder_free_uids (source, uids);
-
- mail_op_set_message (_("Saving changes to %s"), source->full_name);
-
- camel_folder_sync (source, TRUE, ex);
-
- cleanup:
- camel_object_unref (CAMEL_OBJECT (source));
- camel_object_unref (CAMEL_OBJECT (dest));
- mail_tool_camel_lock_down();
-}
-#endif
-
void
mail_tool_set_uid_flags (CamelFolder *folder, const char *uid, guint32 mask, guint32 set)
{
@@ -394,25 +264,6 @@ mail_tool_generate_forward_subject (CamelMimeMessage *msg)
return fwd_subj;
}
-void
-mail_tool_send_via_transport (CamelTransport *transport, CamelMedium *medium, CamelException *ex)
-{
- mail_tool_camel_lock_up();
-
- /*camel_service_connect (CAMEL_SERVICE (transport), ex);*/
-
- if (camel_exception_is_set (ex))
- goto cleanup;
-
- camel_transport_send (transport, medium, ex);
-
- /*camel_service_disconnect (CAMEL_SERVICE (transport),
- *camel_exception_is_set (ex) ? NULL : ex);*/
-
- cleanup:
- mail_tool_camel_lock_down();
-}
-
CamelMimePart *
mail_tool_make_message_attachment (CamelMimeMessage *message)
{