aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-ops.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-07-11 04:04:32 +0800
committerDan Winship <danw@src.gnome.org>2000-07-11 04:04:32 +0800
commite17db743f3fef10ec8039b3f38254a9dce3f6c44 (patch)
tree29ebf0fb4b74bed5784f72024701e69fa4c6c271 /mail/mail-ops.c
parent8844e57744dfdda537911efc6b9a4d80e7eb4407 (diff)
downloadgsoc2013-evolution-e17db743f3fef10ec8039b3f38254a9dce3f6c44.tar
gsoc2013-evolution-e17db743f3fef10ec8039b3f38254a9dce3f6c44.tar.gz
gsoc2013-evolution-e17db743f3fef10ec8039b3f38254a9dce3f6c44.tar.bz2
gsoc2013-evolution-e17db743f3fef10ec8039b3f38254a9dce3f6c44.tar.lz
gsoc2013-evolution-e17db743f3fef10ec8039b3f38254a9dce3f6c44.tar.xz
gsoc2013-evolution-e17db743f3fef10ec8039b3f38254a9dce3f6c44.tar.zst
gsoc2013-evolution-e17db743f3fef10ec8039b3f38254a9dce3f6c44.zip
Update message_list_select_next to do either next or previous.
* message-list.c (message_list_select): Update message_list_select_next to do either next or previous. * folder-browser.c (etable_key): Make 'n' and 'p' do next and previous unread message. * mail-ops.c (select_first_unread): Update. (real_fetch_mail): clean up a bit. svn path=/trunk/; revision=4046
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r--mail/mail-ops.c29
1 files changed, 11 insertions, 18 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index fdf3bbbf2c..63becc28b7 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -124,8 +124,8 @@ select_first_unread (CamelFolder *folder, int type, gpointer data)
{
FolderBrowser *fb = data;
- message_list_select_next (fb->message_list, 0,
- 0, CAMEL_MESSAGE_SEEN);
+ message_list_select (fb->message_list, 0, MESSAGE_LIST_SELECT_NEXT,
+ 0, CAMEL_MESSAGE_SEEN);
}
void
@@ -136,7 +136,7 @@ real_fetch_mail (gpointer user_data)
CamelException *ex;
CamelStore *store = NULL, *dest_store = NULL;
CamelFolder *folder = NULL, *dest_folder = NULL;
- char *url = NULL, *dest_url, *dest_mbox;
+ char *url = NULL, *dest_url;
FilterDriver *filter = NULL;
char *userrules, *systemrules;
char *tmp_mbox = NULL, *source;
@@ -146,6 +146,10 @@ real_fetch_mail (gpointer user_data)
fb = info->fb;
url = info->source_url;
+ /* If using IMAP, don't do anything... */
+ if (!strncmp (url, "imap:", 5))
+ return;
+
ex = camel_exception_new ();
dest_url = g_strdup_printf ("mbox://%s/local/Inbox", evolution_dir);
@@ -156,21 +160,14 @@ real_fetch_mail (gpointer user_data)
goto cleanup;
}
- dest_mbox = g_strdup_printf ("%s/local/Inbox/mbox", evolution_dir);
- dest_folder = camel_store_get_folder (dest_store,
- strrchr (dest_mbox, '/') + 1,
- FALSE, ex);
+ dest_folder = camel_store_get_folder (dest_store, "mbox", FALSE, ex);
if (!dest_folder) {
async_mail_exception_dialog ("Unable to get new mail", ex, fb);
goto cleanup;
}
-
+
tmp_mbox = g_strdup_printf ("%s/local/Inbox/movemail", evolution_dir);
- /* If using IMAP, don't do anything... */
- if (!strncmp (url, "imap:", 5))
- goto cleanup;
-
/* If fetching mail from an mbox store, safely copy it to a
* temporary store first.
*/
@@ -204,8 +201,7 @@ real_fetch_mail (gpointer user_data)
goto cleanup;
}
- folder = camel_store_get_folder (dest_store,
- strrchr (tmp_mbox, '/') + 1,
+ folder = camel_store_get_folder (dest_store, "movemail",
FALSE, ex);
if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE) {
async_mail_exception_dialog ("Unable to move mail", ex, fb);
@@ -222,7 +218,6 @@ real_fetch_mail (gpointer user_data)
camel_service_connect (CAMEL_SERVICE (store), ex);
if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE) {
- gtk_object_unref (GTK_OBJECT (dest_folder));
if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_USER_CANCEL)
async_mail_exception_dialog ("Unable to get new mail", ex, fb);
goto cleanup;
@@ -230,7 +225,6 @@ real_fetch_mail (gpointer user_data)
sourcefolder = camel_store_get_folder (store, "inbox", FALSE, ex);
if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE) {
- gtk_object_unref (GTK_OBJECT (dest_folder));
async_mail_exception_dialog ("Unable to get new mail", ex, fb);
goto cleanup;
}
@@ -244,8 +238,7 @@ real_fetch_mail (gpointer user_data)
printf ("folder isn't searchable, performing movemail ...\n");
folder = camel_store_get_folder (dest_store,
- strrchr (tmp_mbox, '/') + 1,
- TRUE, ex);
+ "movemail", TRUE, ex);
if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE) {
async_mail_exception_dialog ("Unable to move mail", ex, fb);
goto cleanup;