if (n_msg == 0)
item->new = item->unread = item->total = 0;
else {
- gint new, unread, total;
+ gint new, unread, total, min, max;
- procmsg_get_mark_sum(".", &new, &unread, &total);
+ procmsg_get_mark_sum(".", &new, &unread, &total, &min, &max, 0);
if (n_msg > total) {
new += n_msg - total;
unread += n_msg - total;
new_item = folder_item_new(d->d_name, entry);
folder_item_append(item, new_item);
if (!item->path) {
- if (!strcmp(d->d_name, "inbox")) {
+ if (!strcmp(d->d_name, INBOX_DIR)) {
new_item->stype = F_INBOX;
item->folder->inbox = new_item;
- } else if (!strcmp(d->d_name, "outbox")) {
+ } else if (!strcmp(d->d_name, OUTBOX_DIR)) {
new_item->stype = F_OUTBOX;
item->folder->outbox = new_item;
- } else if (!strcmp(d->d_name, "draft")) {
+ } else if (!strcmp(d->d_name, DRAFT_DIR)) {
new_item->stype = F_DRAFT;
item->folder->draft = new_item;
- } else if (!strcmp(d->d_name, "queue")) {
+ } else if (!strcmp(d->d_name, QUEUE_DIR)) {
new_item->stype = F_QUEUE;
item->folder->queue = new_item;
- } else if (!strcmp(d->d_name, "trash")) {
+ } else if (!strcmp(d->d_name, TRASH_DIR)) {
new_item->stype = F_TRASH;
item->folder->trash = new_item;
}
closedir(dp);
if (item->path) {
- gint new, unread, total;
+ gint new, unread, total, min, max;
- procmsg_get_mark_sum(item->path, &new, &unread, &total);
+ procmsg_get_mark_sum(item->path, &new, &unread, &total,
+ &min, &max, 0);
if (n_msg > total) {
new += n_msg - total;
unread += n_msg - total;