diff options
author | Not Zed <NotZed@Ximian.com> | 2004-03-03 14:39:14 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-03-03 14:39:14 +0800 |
commit | 467bbf6fb6b0b215d7b6bd18a6b84acd839a08f9 (patch) | |
tree | 9bb0cb5e2fb74fbea57f5dfd818a4769349f8990 /mail | |
parent | 9b2a16eb3e313e3057a8ac785fecacf54c8266a0 (diff) | |
download | gsoc2013-evolution-467bbf6fb6b0b215d7b6bd18a6b84acd839a08f9.tar.gz gsoc2013-evolution-467bbf6fb6b0b215d7b6bd18a6b84acd839a08f9.tar.zst gsoc2013-evolution-467bbf6fb6b0b215d7b6bd18a6b84acd839a08f9.zip |
if we have the folder opened already, and its the outbox, then use the
2004-03-03 Not Zed <NotZed@Ximian.com>
* em-inline-filter.c (emif_scan):
* em-folder-tree-model.c (em_folder_tree_model_set_folder_info):
if we have the folder opened already, and its the outbox, then use
the total count instead of unread count. Bit of hack, but copies
mail-folder-cache stuff.
* mail-component.c (mc_add_store): renamed from
mail_component_add_store, internal call. Added a done callback.
(mc_add_local_store): renamed from mc_add_store, callback for
local store.
(mail_component_add_store): call mc_add_store to do the work.
(mc_add_local_store_done): ugh, the target of all this shit - note
all the default folders now they should be setup.
* mail-folder-cache.c (mail_note_folder): clean up the logic a
bit. was gonna do osmething else but it didn't work.
2004-03-02 Not Zed <NotZed@Ximian.com>
* mail-send-recv.c (mail_send): if we're already sending, up the
again count to tell it we need to re-send again.
(receive_done): if we've been asked to run a send again while we
were already running it, run it again to make sure we didn't miss
any new messages. See bug #46839.
* em-mailer-prefs.c (em_mailer_prefs_construct): update
check_incoming_imap changes for merge conflicts.
(settings_changed): i have no idea what these changes jeff did do,
but check_incoming_imap is no longer needed, so i've deleted most
of it.
2004-02-27 Not Zed <NotZed@Ximian.com>
* em-format.c (emf_multipart_encrypted, emf_multipart_signed): If
validation fails, display as multipart/mixed rather than unkown
attachment type, and make the error a little clearer that its an
error. See #52939.
2004-02-26 Not Zed <NotZed@Ximian.com>
* message-list.c (regen_list_regened): NOOP if the folder has
changed.
* mail-session.c (mail_session_check_junk_notify): remove
check_incoming_imap test.
(mail_session_init): "
* evolution-mail.schemas.in.in: Remove check_incoming_imap option.
* mail-config.glade: Remove check incoming imap checkbox.
* em-mailer-prefs.c (em_mailer_prefs_construct): remove
check_incoming_imap test.
(em_mailer_prefs_apply): "
(settings_changed): "
svn path=/trunk/; revision=24944
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 59 | ||||
-rw-r--r-- | mail/em-folder-tree-model.c | 30 | ||||
-rw-r--r-- | mail/em-format.c | 12 | ||||
-rw-r--r-- | mail/em-mailer-prefs.c | 25 | ||||
-rw-r--r-- | mail/em-mailer-prefs.h | 1 | ||||
-rw-r--r-- | mail/evolution-mail.schemas.in.in | 14 | ||||
-rw-r--r-- | mail/mail-component.c | 65 | ||||
-rw-r--r-- | mail/mail-config.glade | 52 | ||||
-rw-r--r-- | mail/mail-folder-cache.c | 28 | ||||
-rw-r--r-- | mail/mail-ops.c | 6 | ||||
-rw-r--r-- | mail/mail-send-recv.c | 18 | ||||
-rw-r--r-- | mail/mail-session.c | 3 |
12 files changed, 166 insertions, 147 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 9c09a787b3..cdf0fd8097 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,62 @@ +2004-03-03 Not Zed <NotZed@Ximian.com> + + * em-inline-filter.c (emif_scan): + + * em-folder-tree-model.c (em_folder_tree_model_set_folder_info): + if we have the folder opened already, and its the outbox, then use + the total count instead of unread count. Bit of hack, but copies + mail-folder-cache stuff. + + * mail-component.c (mc_add_store): renamed from + mail_component_add_store, internal call. Added a done callback. + (mc_add_local_store): renamed from mc_add_store, callback for + local store. + (mail_component_add_store): call mc_add_store to do the work. + (mc_add_local_store_done): ugh, the target of all this shit - note + all the default folders now they should be setup. + + * mail-folder-cache.c (mail_note_folder): clean up the logic a + bit. was gonna do osmething else but it didn't work. + +2004-03-02 Not Zed <NotZed@Ximian.com> + + * mail-send-recv.c (mail_send): if we're already sending, up the + again count to tell it we need to re-send again. + (receive_done): if we've been asked to run a send again while we + were already running it, run it again to make sure we didn't miss + any new messages. See bug #46839. + + * em-mailer-prefs.c (em_mailer_prefs_construct): update + check_incoming_imap changes for merge conflicts. + (settings_changed): i have no idea what these changes jeff did do, + but check_incoming_imap is no longer needed, so i've deleted most + of it. + +2004-02-27 Not Zed <NotZed@Ximian.com> + + * em-format.c (emf_multipart_encrypted, emf_multipart_signed): If + validation fails, display as multipart/mixed rather than unkown + attachment type, and make the error a little clearer that its an + error. See #52939. + +2004-02-26 Not Zed <NotZed@Ximian.com> + + * message-list.c (regen_list_regened): NOOP if the folder has + changed. + + * mail-session.c (mail_session_check_junk_notify): remove + check_incoming_imap test. + (mail_session_init): " + + * evolution-mail.schemas.in.in: Remove check_incoming_imap option. + + * mail-config.glade: Remove check incoming imap checkbox. + + * em-mailer-prefs.c (em_mailer_prefs_construct): remove + check_incoming_imap test. + (em_mailer_prefs_apply): " + (settings_changed): " + 2004-03-02 Jeffrey Stedfast <fejj@ximian.com> * em-folder-tree.c (emft_tree_button_press): s/||/&&/. Fixes a diff --git a/mail/em-folder-tree-model.c b/mail/em-folder-tree-model.c index 91defd775b..948de7774a 100644 --- a/mail/em-folder-tree-model.c +++ b/mail/em-folder-tree-model.c @@ -41,12 +41,16 @@ #include "mail-tools.h" #include "mail-mt.h" +/* sigh, these 2 only needed for outbox total count checking - a mess */ +#include "mail-component.h" +#include "mail-folder-cache.h" + #include "em-utils.h" #include "em-marshal.h" #include "em-folder-tree-model.h" - +#define u(x) /* unread count debug */ #define d(x) x static GType col_types[] = { @@ -408,6 +412,7 @@ em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, GtkTreeIter *ite GtkTreePath *path; GtkTreeIter sub; gboolean load; + struct _CamelFolder *folder; load = fi->child == NULL && !(fi->flags & (CAMEL_FOLDER_NOCHILDREN | CAMEL_FOLDER_NOINFERIORS)); @@ -415,12 +420,19 @@ em_folder_tree_model_set_folder_info (EMFolderTreeModel *model, GtkTreeIter *ite uri_row = gtk_tree_row_reference_new ((GtkTreeModel *) model, path); path_row = gtk_tree_row_reference_copy (uri_row); gtk_tree_path_free (path); - + g_hash_table_insert (model->uri_hash, g_strdup (fi->url), uri_row); g_hash_table_insert (si->path_hash, g_strdup (fi->path), path_row); - + + /* HACK: if we have the folder, and its the outbox folder, we need the total count, not unread */ + /* This is duplicated in mail-folder-cache too, should perhaps be functionised */ unread = fi->unread_message_count == -1 ? 0 : fi->unread_message_count; - + if (mail_note_get_folder_from_uri(fi->url, &folder) && folder) { + if (folder == mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_OUTBOX)) + unread = camel_folder_get_message_count(folder); + camel_object_unref(folder); + } + gtk_tree_store_set ((GtkTreeStore *) model, iter, COL_STRING_DISPLAY_NAME, fi->name, COL_POINTER_CAMEL_STORE, si->store, @@ -939,14 +951,20 @@ em_folder_tree_model_set_unread_count (EMFolderTreeModel *model, CamelStore *sto g_return_if_fail (CAMEL_IS_STORE (store)); g_return_if_fail (path != NULL); + u(printf("set unread count %p '%s' %d\n", store, path, unread)); + if (unread < 0) unread = 0; - if (!(si = g_hash_table_lookup (model->store_hash, store))) + if (!(si = g_hash_table_lookup (model->store_hash, store))) { + u(printf(" can't find store\n")); return; + } - if (!(row = g_hash_table_lookup (si->path_hash, path))) + if (!(row = g_hash_table_lookup (si->path_hash, path))) { + u(printf(" can't find row\n")); return; + } tree_path = gtk_tree_row_reference_get_path (row); if (!gtk_tree_model_get_iter ((GtkTreeModel *) model, &iter, tree_path)) { diff --git a/mail/em-format.c b/mail/em-format.c index e107e39db4..9917f1ce8b 100644 --- a/mail/em-format.c +++ b/mail/em-format.c @@ -1158,8 +1158,10 @@ emf_multipart_encrypted(EMFormat *emf, CamelStream *stream, CamelMimePart *part, opart = camel_mime_part_new(); valid = camel_cipher_decrypt(context, part, opart, ex); if (valid == NULL) { - em_format_format_error(emf, stream, ex->desc?ex->desc:_("Could not parse S/MIME message: Unknown error")); - em_format_part_as(emf, stream, part, NULL); + em_format_format_error(emf, stream, ex->desc?("Could not parse S/MIME message"):_("Could not parse S/MIME message: Unknown error")); + if (ex->desc) + em_format_format_error(emf, stream, ex->desc); + em_format_part_as(emf, stream, part, "multipart/mixed"); } else { em_format_format_secure(emf, stream, opart, valid); } @@ -1319,8 +1321,10 @@ emf_multipart_signed(EMFormat *emf, CamelStream *stream, CamelMimePart *part, co valid = camel_cipher_verify(cipher, part, ex); if (valid == NULL) { - em_format_format_error(emf, stream, ex->desc?ex->desc:_("Unknown error verifying signature")); - em_format_part_as(emf, stream, part, NULL); + em_format_format_error(emf, stream, ex->desc?_("Error verifying signature"):_("Unknown error verifying signature")); + if (ex->desc) + em_format_format_error(emf, stream, ex->desc); + em_format_part_as(emf, stream, part, "multipart/mixed"); } else { em_format_format_secure(emf, stream, cpart, valid); } diff --git a/mail/em-mailer-prefs.c b/mail/em-mailer-prefs.c index 9f12c4522c..ff8c789be0 100644 --- a/mail/em-mailer-prefs.c +++ b/mail/em-mailer-prefs.c @@ -159,16 +159,6 @@ static void settings_changed (GtkWidget *widget, gpointer user_data) { EMMailerPrefs *prefs = (EMMailerPrefs *) user_data; - gboolean check_incoming, locked = FALSE; - - if (prefs->check_incoming && prefs->check_incoming_imap) { - /* this callback can get called in _construct() before - * these widgets have been created */ - if ((check_incoming = gtk_toggle_button_get_active (prefs->check_incoming))) - locked = gconf_client_key_is_writable (prefs->gconf, "/apps/evolution/mail/junk/sa/check_incoming_imap", NULL); - - gtk_widget_set_sensitive (GTK_WIDGET (prefs->check_incoming_imap), check_incoming && !locked); - } if (prefs->control) evolution_config_control_changed (prefs->control); @@ -465,7 +455,7 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs) GtkTreeIter iter; char *font, *buf; GladeXML *gui; - gboolean locked, check_incoming; + gboolean locked; int val, i; gui = glade_xml_new (EVOLUTION_GLADEDIR "/mail-config.glade", "preferences_tab", NULL); @@ -756,20 +746,11 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs) emmp_header_remove_sensitivity (prefs); /* Junk prefs */ - prefs->check_incoming_imap = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkDoNotCheckIMAP")); - toggle_button_init (prefs->check_incoming_imap, prefs->gconf, - "/apps/evolution/mail/junk/sa/check_incoming_imap", - TRUE, G_CALLBACK (settings_changed), prefs); - prefs->check_incoming = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkCheckIncomingMail")); toggle_button_init (prefs->check_incoming, prefs->gconf, "/apps/evolution/mail/junk/sa/check_incoming", FALSE, G_CALLBACK (settings_changed), prefs); - - check_incoming = gtk_toggle_button_get_active (prefs->check_incoming); - if (!gtk_toggle_button_get_active (prefs->check_incoming)) - gtk_widget_set_sensitive ((GtkWidget *) prefs->check_incoming_imap, FALSE); - + prefs->sa_local_tests_only = GTK_TOGGLE_BUTTON (glade_xml_get_widget (gui, "chkSALocalTestsOnly")); toggle_button_init (prefs->sa_local_tests_only, prefs->gconf, "/apps/evolution/mail/junk/sa/local_only", @@ -918,8 +899,6 @@ em_mailer_prefs_apply (EMMailerPrefs *prefs) /* junk prefs */ gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/junk/check_incoming", gtk_toggle_button_get_active (prefs->check_incoming), NULL); - gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/junk/check_incoming_imap", - !gtk_toggle_button_get_active (prefs->check_incoming_imap), NULL); gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/junk/sa/local_only", gtk_toggle_button_get_active (prefs->sa_local_tests_only), NULL); gconf_client_set_bool (prefs->gconf, "/apps/evolution/mail/junk/sa/use_daemon", diff --git a/mail/em-mailer-prefs.h b/mail/em-mailer-prefs.h index bf7a2cbfb8..3a182476ff 100644 --- a/mail/em-mailer-prefs.h +++ b/mail/em-mailer-prefs.h @@ -116,7 +116,6 @@ struct _EMMailerPrefs { /* Junk prefs */ GtkToggleButton *check_incoming; - GtkToggleButton *check_incoming_imap; GtkToggleButton *sa_local_tests_only; GtkToggleButton *sa_use_daemon; }; diff --git a/mail/evolution-mail.schemas.in.in b/mail/evolution-mail.schemas.in.in index f6b85a1f22..56a17130fc 100644 --- a/mail/evolution-mail.schemas.in.in +++ b/mail/evolution-mail.schemas.in.in @@ -688,20 +688,6 @@ </schema> <schema> - <key>/schemas/apps/evolution/mail/junk/check_incoming_imap</key> - <applyto>/apps/evolution/mail/junk/check_incoming_imap</applyto> - <owner>evolution-mail</owner> - <type>bool</type> - <default>true</default> - <locale name="C"> - <short>Check incoming mail being junk for IMAP accounts</short> - <long> - Run junk test on incoming mail for IMAP accounts (only valid if check_incoming is set to true) - </long> - </locale> - </schema> - - <schema> <key>/schemas/apps/evolution/mail/junk/sa/local_only</key> <applyto>/apps/evolution/mail/junk/sa/local_only</applyto> <owner>evolution-mail</owner> diff --git a/mail/mail-component.c b/mail/mail-component.c index f2d2304736..ec02f61196 100644 --- a/mail/mail-component.c +++ b/mail/mail-component.c @@ -106,16 +106,6 @@ struct _MailComponentPrivate { CamelStore *local_store; }; -/* Utility functions. */ -static void -mc_add_store(CamelStore *store, const char *name, MailComponent *mc) -{ - mail_component_add_store(mc, store, name); - - camel_object_unref(store); - g_object_unref(mc); -} - /* indexed by _mail_component_folder_t */ static struct { char *name; @@ -129,6 +119,44 @@ static struct { { "Inbox", }, /* 'always local' inbox */ }; +/* Utility functions. */ +static void +mc_add_store(MailComponent *component, CamelStore *store, const char *name, void (*done)(CamelStore *store, CamelFolderInfo *info, void *data)) +{ + char *service_name = NULL; + + MAIL_COMPONENT_DEFAULT(component); + + if (name == NULL) + name = service_name = camel_service_get_name ((CamelService *) store, TRUE); + + camel_object_ref(store); + g_hash_table_insert(component->priv->store_hash, store, g_strdup(name)); + em_folder_tree_model_add_store(component->priv->model, store, name); + mail_note_store(store, NULL, done, component); + g_free(service_name); +} + +static void +mc_add_local_store_done(CamelStore *store, CamelFolderInfo *info, void *data) +{ + MailComponent *mc = data; + int i; + + for (i=0;i<sizeof(mc_default_folders)/sizeof(mc_default_folders[0]);i++) { + if (mc_default_folders[i].folder) + mail_note_folder(mc_default_folders[i].folder); + } +} + +static void +mc_add_local_store(CamelStore *store, const char *name, MailComponent *mc) +{ + mc_add_store(mc, store, name, mc_add_local_store_done); + camel_object_unref(store); + g_object_unref(mc); +} + static void mc_setup_local_store(MailComponent *mc) { @@ -170,7 +198,7 @@ mc_setup_local_store(MailComponent *mc) g_object_ref(mc); camel_object_ref(p->local_store); - mail_async_event_emit(p->async_event, MAIL_ASYNC_GUI, (MailAsyncFunc)mc_add_store, p->local_store, _("On This Computer"), mc); + mail_async_event_emit(p->async_event, MAIL_ASYNC_GUI, (MailAsyncFunc)mc_add_local_store, p->local_store, _("On This Computer"), mc); return; fail: @@ -329,8 +357,6 @@ impl_dispose (GObject *object) { MailComponentPrivate *priv = MAIL_COMPONENT (object)->priv; - printf("mail dispose?\n"); - if (priv->activity_handler != NULL) { g_object_unref (priv->activity_handler); priv->activity_handler = NULL; @@ -706,18 +732,7 @@ mail_component_peek_activity_handler (MailComponent *component) void mail_component_add_store (MailComponent *component, CamelStore *store, const char *name) { - char *service_name = NULL; - - MAIL_COMPONENT_DEFAULT(component); - - if (name == NULL) - name = service_name = camel_service_get_name ((CamelService *) store, TRUE); - - camel_object_ref(store); - g_hash_table_insert(component->priv->store_hash, store, g_strdup(name)); - em_folder_tree_model_add_store(component->priv->model, store, name); - mail_note_store(store, NULL, NULL, NULL); - g_free(service_name); + mc_add_store(component, store, name, NULL); } /** diff --git a/mail/mail-config.glade b/mail/mail-config.glade index f81eeeaf55..7498de63ee 100644 --- a/mail/mail-config.glade +++ b/mail/mail-config.glade @@ -4678,58 +4678,6 @@ For example: "Work" or "Personal"</property> <property name="fill">False</property> </packing> </child> - - <child> - <widget class="GtkHBox" id="hbox177"> - <property name="visible">True</property> - <property name="homogeneous">False</property> - <property name="spacing">0</property> - - <child> - <widget class="GtkLabel" id="label475"> - <property name="visible">True</property> - <property name="label" translatable="yes"> </property> - <property name="use_underline">False</property> - <property name="use_markup">False</property> - <property name="justify">GTK_JUSTIFY_LEFT</property> - <property name="wrap">False</property> - <property name="selectable">False</property> - <property name="xalign">0.5</property> - <property name="yalign">0.5</property> - <property name="xpad">0</property> - <property name="ypad">0</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - - <child> - <widget class="GtkCheckButton" id="chkDoNotCheckIMAP"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="label" translatable="yes">Do _Not Check Incoming Mail For IMAP Accounts</property> - <property name="use_underline">True</property> - <property name="relief">GTK_RELIEF_NORMAL</property> - <property name="active">False</property> - <property name="inconsistent">False</property> - <property name="draw_indicator">True</property> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> - </widget> - <packing> - <property name="padding">0</property> - <property name="expand">False</property> - <property name="fill">False</property> - </packing> - </child> </widget> <packing> <property name="padding">0</property> diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c index c2df775195..edd6dc1dc3 100644 --- a/mail/mail-folder-cache.c +++ b/mail/mail-folder-cache.c @@ -54,7 +54,7 @@ #include "em-folder-tree-model.h" #define w(x) -#define d(x) /*(printf("%s(%d):%s: ", __FILE__, __LINE__, __PRETTY_FUNCTION__), (x))*/ +#define d(x) /*(printf("%s(%d):%s: ", __FILE__, __LINE__, __PRETTY_FUNCTION__), (x))*/ /* note that many things are effectively serialised by having them run in the main loop thread which they need to do because of corba/gtk calls */ @@ -334,11 +334,14 @@ update_1folder(struct _folder_info *mfi, int new, CamelFolderInfo *info) folder = mfi->folder; if (folder) { + d(printf("update 1 folder '%s'\n", folder->full_name)); if ((count_trash && CAMEL_IS_VTRASH_FOLDER (folder)) || folder == mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_OUTBOX) || (count_sent && folder == mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_SENT))) { + d(printf(" total count\n")); unread = camel_folder_get_message_count(folder); } else { + d(printf(" unread count\n")); if (info) unread = info->unread_message_count; else @@ -423,7 +426,9 @@ folder_changed (CamelObject *o, gpointer event_data, gpointer user_data) if (mfi->folder != folder) return; - + + d(printf("folder '%s' changed\n", folder->full_name)); + if (!CAMEL_IS_VTRASH_FOLDER(folder) && folder != mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_OUTBOX) && folder != mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_SENT) @@ -480,22 +485,13 @@ void mail_note_folder(CamelFolder *folder) struct _store_info *si; struct _folder_info *mfi; - if (stores == NULL) { - g_warning("Adding a folder `%s' to a store which hasn't been added yet?\n", folder->full_name); - return; - } + d(printf("noting folder '%s'\n", folder->full_name)); LOCK(info_lock); - si = g_hash_table_lookup(stores, store); - if (si == NULL) { - /*g_warning("Adding a folder `%s' to a store %p which hasn't been added yet?", folder->full_name, store);*/ - UNLOCK(info_lock); - return; - } - - mfi = g_hash_table_lookup(si->folders, folder->full_name); - if (mfi == NULL) { - w(g_warning("Adding a folder `%s' that I dont know about yet?", folder->full_name)); + if (stores == NULL + || (si = g_hash_table_lookup(stores, store)) == NULL + || (mfi = g_hash_table_lookup(si->folders, folder->full_name)) == NULL) { + w(g_warning("Noting folder before store initialised")); UNLOCK(info_lock); return; } diff --git a/mail/mail-ops.c b/mail/mail-ops.c index 91f068c664..2b338bb1ee 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -721,7 +721,7 @@ send_queue_send(struct _mail_msg *mm) if (m->cancel) camel_operation_register (m->cancel); - + for (i = 0; i < uids->len; i++) { CamelMimeMessage *message; CamelMessageInfo *info; @@ -754,9 +754,9 @@ send_queue_send(struct _mail_msg *mm) camel_object_unref (m->driver); m->driver = NULL; } - + camel_folder_free_uids (m->queue, uids); - + if (!camel_exception_is_set (&mm->ex)) camel_folder_expunge (m->queue, &mm->ex); diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c index 38bbb1b41e..1ee8eebf7f 100644 --- a/mail/mail-send-recv.c +++ b/mail/mail-send-recv.c @@ -112,6 +112,8 @@ struct _send_info { GtkButton *stop; EClippedLabel *status; + int again; /* need to run send again */ + int timeout_id; char *what; int pc; @@ -120,6 +122,8 @@ struct _send_info { struct _send_data *data; }; +static CamelFolder *receive_get_folder(CamelFilterDriver *d, const char *uri, void *data, CamelException *ex); + static struct _send_data *send_data = NULL; static GtkWidget *send_recv_dialog = NULL; @@ -568,6 +572,19 @@ receive_done (char *uri, void *data) { struct _send_info *info = data; + /* if we've been called to run again - run again */ + if (info->type == SEND_SEND && info->state == SEND_ACTIVE && info->again) { + info->again = 0; + mail_send_queue (mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_OUTBOX), + info->uri, + FILTER_SOURCE_OUTGOING, + info->cancel, + receive_get_folder, info, + receive_status, info, + receive_done, info); + return; + } + if (info->bar) { gtk_progress_bar_set_fraction((GtkProgressBar *)info->bar, (gfloat)1.0); @@ -911,6 +928,7 @@ mail_send (void) data = setup_send_data (); info = g_hash_table_lookup (data->active, SEND_URI_KEY); if (info != NULL) { + info->again++; d(printf("send of %s still in progress\n", transport->url)); return; } diff --git a/mail/mail-session.c b/mail/mail-session.c index ee7afdea94..1eb4f76b90 100644 --- a/mail/mail-session.c +++ b/mail/mail-session.c @@ -771,8 +771,6 @@ mail_session_check_junk_notify (GConfClient *gconf, guint id, GConfEntry *entry, key ++; if (!strcmp (key, "check_incoming")) camel_session_set_check_junk (session, gconf_value_get_bool (gconf_entry_get_value (entry))); - else if (!strcmp (key, "check_incoming_imap")) - camel_session_set_check_junk_for_imap (session, gconf_value_get_bool (gconf_entry_get_value (entry))); } } @@ -793,7 +791,6 @@ mail_session_init (const char *base_directory) gconf = mail_config_get_gconf_client (); gconf_client_add_dir (gconf, "/apps/evolution/mail/junk", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL); camel_session_set_check_junk (session, gconf_client_get_bool (gconf, "/apps/evolution/mail/junk/check_incoming", NULL)); - camel_session_set_check_junk_for_imap (session, gconf_client_get_bool (gconf, "/apps/evolution/mail/junk/check_incoming_imap", NULL)); session_check_junk_notify_id = gconf_client_notify_add (gconf, "/apps/evolution/mail/junk", (GConfClientNotifyFunc) mail_session_check_junk_notify, session, NULL, NULL); |