aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-callbacks.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-callbacks.c
parent4c9ec36493cba709c63dc366d768b6162c1acfde (diff)
downloadgsoc2013-evolution-88f9e3608650e8b95a5a326902ad1de5a40602c0.tar.gz
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-callbacks.c')
-rw-r--r--mail/mail-callbacks.c87
1 files changed, 14 insertions, 73 deletions
diff --git a/mail/mail-callbacks.c b/mail/mail-callbacks.c
index fa3125bf15..2e03014dcb 100644
--- a/mail/mail-callbacks.c
+++ b/mail/mail-callbacks.c
@@ -35,7 +35,7 @@
#include "mail-config.h"
#include "mail-accounts.h"
#include "mail-config-druid.h"
-#include "mail-threads.h"
+#include "mail-mt.h"
#include "mail-tools.h"
#include "mail-ops.h"
#include "mail-local.h"
@@ -156,6 +156,8 @@ check_send_configuration (FolderBrowser *fb)
return TRUE;
}
+#if 0
+/* FIXME: is this still required when we send & receive email ? I am not so sure ... */
static void
main_select_first_unread (CamelObject *object, gpointer event_data, gpointer data)
{
@@ -171,45 +173,14 @@ select_first_unread (CamelObject *object, gpointer event_data, gpointer data)
{
mail_op_forward_event (main_select_first_unread, object, event_data, data);
}
+#endif
void
-fetch_mail (GtkWidget *widget, gpointer user_data)
-{
- GSList *sources;
-
- if (!mail_config_is_configured ()) {
- configure_mail (FOLDER_BROWSER (user_data));
- return;
- }
-
- sources = mail_config_get_sources ();
-
- if (!sources || !sources->data) {
- return;
- }
-
- while (sources) {
- MailConfigService *source;
-
- source = (MailConfigService *) sources->data;
- sources = sources->next;
-
- if (!source || !source->url) {
- g_warning ("Bad source in fetch_mail??");
- continue;
- }
-
- mail_do_fetch_mail (source->url, source->keep_on_server,
- NULL, select_first_unread, user_data);
- }
-}
-
-void
-send_queued_mail (GtkWidget *widget, gpointer user_data)
+send_receieve_mail (GtkWidget *widget, gpointer user_data)
{
- extern CamelFolder *outbox_folder;
const MailConfigAccount *account;
-
+
+ /* receive first then send, this is a temp fix for POP-before-SMTP */
if (!mail_config_is_configured ()) {
configure_mail (FOLDER_BROWSER (user_data));
return;
@@ -217,37 +188,12 @@ send_queued_mail (GtkWidget *widget, gpointer user_data)
account = mail_config_get_default_account ();
if (!account || !account->transport) {
- GtkWidget *win = gtk_widget_get_ancestor (GTK_WIDGET (user_data),
- GTK_TYPE_WINDOW);
-
- gnome_error_dialog_parented (_("You have not set a mail transport method"),
- GTK_WINDOW (win));
+ GtkWidget *win = gtk_widget_get_ancestor(GTK_WIDGET (user_data), GTK_TYPE_WINDOW);
+ gnome_error_dialog_parented (_("You have not set a mail transport method"), GTK_WINDOW(win));
return;
}
-
- if (!outbox_folder) {
- GtkWidget *win = gtk_widget_get_ancestor (GTK_WIDGET (user_data),
- GTK_TYPE_WINDOW);
-
- gnome_error_dialog_parented (_("You have no Outbox configured"),
- GTK_WINDOW (win));
- return;
- }
-
- mail_do_send_queue (outbox_folder, account->transport->url);
-}
-void
-send_receieve_mail (GtkWidget *widget, gpointer user_data)
-{
- /* receive first then send, this is a temp fix for POP-before-SMTP */
- if (!mail_config_is_configured ()) {
- configure_mail (FOLDER_BROWSER (user_data));
- return;
- }
-
- fetch_mail (widget, user_data);
- send_queued_mail (widget, user_data);
+ mail_send_receive();
}
static void
@@ -422,13 +368,8 @@ composer_postpone_cb (EMsgComposer *composer, gpointer data)
/* Save the message in Outbox */
mail_do_append_mail (outbox_folder, message, NULL);
- if (psd) {
- guint32 set;
-
- set = camel_folder_get_message_flags (psd->folder, psd->uid);
- camel_folder_set_message_flags (psd->folder, psd->uid,
- psd->flags, psd->flags);
- }
+ if (psd)
+ camel_folder_set_message_flags(psd->folder, psd->uid, psd->flags, psd->flags);
gtk_widget_destroy (GTK_WIDGET (composer));
}
@@ -715,8 +656,8 @@ apply_filters (GtkWidget *widget, gpointer user_data)
uids = g_ptr_array_new ();
message_list_foreach (ml, enumerate_msg, uids);
-
- mail_do_filter_ondemand (fb->folder, uids);
+
+ mail_filter_on_demand(fb->folder, uids);
}
void