aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-ops.c
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-05-19 08:47:58 +0800
committerDan Winship <danw@src.gnome.org>2000-05-19 08:47:58 +0800
commit99f97dea4462119c6b03901969a476663b7dcf06 (patch)
tree7c739c02e4bd3d40010acb13486a525356a88c03 /mail/mail-ops.c
parent2e6a57075d4757b0e29011303f3a29ef0d00b4ba (diff)
downloadgsoc2013-evolution-99f97dea4462119c6b03901969a476663b7dcf06.tar
gsoc2013-evolution-99f97dea4462119c6b03901969a476663b7dcf06.tar.gz
gsoc2013-evolution-99f97dea4462119c6b03901969a476663b7dcf06.tar.bz2
gsoc2013-evolution-99f97dea4462119c6b03901969a476663b7dcf06.tar.lz
gsoc2013-evolution-99f97dea4462119c6b03901969a476663b7dcf06.tar.xz
gsoc2013-evolution-99f97dea4462119c6b03901969a476663b7dcf06.tar.zst
gsoc2013-evolution-99f97dea4462119c6b03901969a476663b7dcf06.zip
Update for camel_folder_get_uids (folder_changed,
* message-list.c (select_msg): Update for camel_folder_get_uids (folder_changed, message_list_set_folder): Update for camel_folder_get_summary * mail-ops.c (fetch_mail): Update for camel_folder_get_uids svn path=/trunk/; revision=3128
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r--mail/mail-ops.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index dc338a1805..90acb9e84d 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -170,9 +170,9 @@ fetch_mail (GtkWidget *button, gpointer user_data)
/* can we perform filtering on this source? */
if (!(sourcefolder->has_summary_capability
- && sourcefolder->has_uid_capability
&& sourcefolder->has_search_capability)) {
- int i, count;
+ GPtrArray *uids;
+ int i;
printf("folder isn't searchable, performing movemail ...\n");
@@ -191,12 +191,12 @@ fetch_mail (GtkWidget *button, gpointer user_data)
goto cleanup;
}
- count = camel_folder_get_message_count (sourcefolder, ex);
- printf("got %d messages in source\n", count);
- for (i = 1; i <= count; i++) {
+ uids = camel_folder_get_uids (sourcefolder, ex);
+ printf("got %d messages in source\n", uids->len);
+ for (i = 0; i < uids->len; i++) {
CamelMimeMessage *msg;
- printf("copying message %d to dest\n", i);
- msg = camel_folder_get_message_by_number (sourcefolder, i, ex);
+ printf("copying message %d to dest\n", i + 1);
+ msg = camel_folder_get_message_by_uid (sourcefolder, uids->pdata[i], ex);
if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE) {
mail_exception_dialog ("Unable to read message", ex, fb);
gtk_object_unref((GtkObject *)msg);
@@ -212,9 +212,10 @@ fetch_mail (GtkWidget *button, gpointer user_data)
goto cleanup;
}
- camel_folder_delete_message_by_number(sourcefolder, i, ex);
+ camel_folder_delete_message_by_uid(sourcefolder, uids->pdata[i], ex);
gtk_object_unref((GtkObject *)msg);
}
+ camel_folder_free_uids (sourcefolder, uids);
gtk_object_unref((GtkObject *)sourcefolder);
} else {
printf("we can search on this folder, performing search!\n");