#include "copy.h"
#include "keymap.h"
#include "url.h"
+#include "sidebar.h"
#ifdef USE_COMPRESSED
#include "compress.h"
#include "lib/intl.h"
#include "lib/str.h"
#include "lib/list.h"
+#include "lib/debug.h"
#include <dirent.h>
#include <fcntl.h>
while (fcntl (fd, F_SETLK, &lck) == -1) {
struct stat sb;
- dprint (1, (debugfile, "mx_lock_file(): fcntl errno %d.\n", errno));
+ debug_print (1, ("fcntl errno %d.\n", errno));
if (errno != EAGAIN && errno != EACCES) {
mutt_perror ("fcntl");
return (-1);
}
#undef this_body
ctx->msgcount = j;
+
+ /* update sidebar count */
+ sidebar_set_buffystats (ctx);
}
return 0;
}
+ /* update sidebar counts */
+ sidebar_set_buffystats (ctx);
+
/* if we haven't deleted any messages, we don't need to resort */
/* ... except for certain folder formats which need "unsorted"
* sort order in order to synchronize folders.
ADDRESS *p = NULL;
if (!MX_IDX(dest->magic-1)) {
- dprint (1, (debugfile, "mx_open_new_message(): function "
- "unimplemented for mailbox type %d.\n", dest->magic));
+ debug_print (1, ("function unimplemented for mailbox type %d.\n", dest->magic));
return (NULL);
}
}
}
- dprint (1, (debugfile, "mx_check_mailbox: null or invalid context.\n"));
+ debug_print (1, ("null or invalid context.\n"));
return (-1);
}
if (msg->fp == NULL) {
mutt_perror (path);
- dprint (1, (debugfile, "mx_open_message: fopen: %s: %s (errno %d).\n",
- path, strerror (errno), errno));
+ debug_print (1, ("fopen: %s: %s (errno %d).\n", path, strerror (errno), errno));
FREE (&msg);
}
}
#endif /* USE_NNTP */
default:
- dprint (1,
- (debugfile,
- "mx_open_message(): function not implemented for mailbox type %d.\n",
- ctx->magic));
+ debug_print (1, ("function not implemented for mailbox type %d.\n", ctx->magic));
FREE (&msg);
break;
}
int r = 0;
if (!(msg->write && ctx->append)) {
- dprint (1,
- (debugfile,
- "mx_commit_message(): msg->write = %d, ctx->append = %d\n",
- msg->write, ctx->append));
+ debug_print (1, ("msg->write = %d, ctx->append = %d\n", msg->write, ctx->append));
return -1;
}
(*msg)->fp = NULL;
if ((*msg)->path) {
- dprint (1, (debugfile, "mx_close_message (): unlinking %s\n",
- (*msg)->path));
+ debug_print (1, ("unlinking %s\n", (*msg)->path));
unlink ((*msg)->path);
FREE (&(*msg)->path);
}
ctx->new++;
}
}
+ /* update sidebar count */
+ sidebar_set_buffystats (ctx);
}
/*