aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-05-19 08:47:48 +0800
committerDan Winship <danw@src.gnome.org>2000-05-19 08:47:48 +0800
commit2e6a57075d4757b0e29011303f3a29ef0d00b4ba (patch)
tree429d750b59c6d26340e9a945492caa38e99a5788
parenta909e956daf6879cd5a4bcc1ed8f5d09ea173563 (diff)
downloadgsoc2013-evolution-2e6a57075d4757b0e29011303f3a29ef0d00b4ba.tar
gsoc2013-evolution-2e6a57075d4757b0e29011303f3a29ef0d00b4ba.tar.gz
gsoc2013-evolution-2e6a57075d4757b0e29011303f3a29ef0d00b4ba.tar.bz2
gsoc2013-evolution-2e6a57075d4757b0e29011303f3a29ef0d00b4ba.tar.lz
gsoc2013-evolution-2e6a57075d4757b0e29011303f3a29ef0d00b4ba.tar.xz
gsoc2013-evolution-2e6a57075d4757b0e29011303f3a29ef0d00b4ba.tar.zst
gsoc2013-evolution-2e6a57075d4757b0e29011303f3a29ef0d00b4ba.zip
update for camel_folder_get_uids change
* filter-driver.c (filter_driver_run): update for camel_folder_get_uids change svn path=/trunk/; revision=3127
-rw-r--r--filter/ChangeLog5
-rw-r--r--filter/filter-driver.c16
2 files changed, 13 insertions, 8 deletions
diff --git a/filter/ChangeLog b/filter/ChangeLog
index d88acdccad..56ec6f65f5 100644
--- a/filter/ChangeLog
+++ b/filter/ChangeLog
@@ -1,3 +1,8 @@
+2000-05-18 Dan Winship <danw@helixcode.com>
+
+ * filter-driver.c (filter_driver_run): update for
+ camel_folder_get_uids change
+
2000-05-17 NotZed <NotZed@HelixCode.com>
* filter-druid.c: Fix some html formatting.
diff --git a/filter/filter-driver.c b/filter/filter-driver.c
index ce836a16d4..17ced7412d 100644
--- a/filter/filter-driver.c
+++ b/filter/filter-driver.c
@@ -529,7 +529,9 @@ filter_driver_run(FilterDriver *d, CamelFolder *source, CamelFolder *inbox)
ESExpResult *r;
GList *options;
GString *s, *a;
- GList *all, *m;
+ GPtrArray *all;
+ GList *m;
+ int i;
#warning "This must be made mega-robust"
p->source = source;
@@ -587,10 +589,9 @@ filter_driver_run(FilterDriver *d, CamelFolder *source, CamelFolder *inbox)
/* apply the default of copying to an inbox, if we are given one, and make sure
we delete everything as well */
- all = camel_folder_get_uid_list(p->source, p->ex);
- m = all;
- while (m) {
- char *uid = m->data, *procuid;
+ all = camel_folder_get_uids(p->source, p->ex);
+ for (i = 0; i < all->len; i++) {
+ char *uid = all->pdata[i], *procuid;
CamelMimeMessage *mm;
procuid = g_hash_table_lookup(p->processed, uid);
@@ -598,7 +599,7 @@ filter_driver_run(FilterDriver *d, CamelFolder *source, CamelFolder *inbox)
if (inbox) {
printf("Applying default rule to message %s\n", uid);
- mm = camel_folder_get_message_by_uid(p->source, m->data, p->ex);
+ mm = camel_folder_get_message_by_uid(p->source, all->pdata[i], p->ex);
camel_folder_append_message(inbox, mm, p->ex);
camel_mime_message_set_flags(mm, CAMEL_MESSAGE_DELETED, CAMEL_MESSAGE_DELETED);
gtk_object_unref((GtkObject *)mm);
@@ -606,9 +607,8 @@ filter_driver_run(FilterDriver *d, CamelFolder *source, CamelFolder *inbox)
} else {
camel_folder_delete_message_by_uid(p->source, uid, p->ex);
}
- m = m->next;
}
- g_list_free(all);
+ camel_folder_free_uids(p->source, all);
g_hash_table_destroy(p->processed);
g_hash_table_destroy(p->terminated);