Age | Commit message (Collapse) | Author |
|
The mx_fastclose_mailbox() calls mx_ops->close(), which invokes
mbox_close_mailbox().
Also, close the ctx->fp inside mbox_close_mailbox(). This way, the
(to be added) compress logic can call the mx_ops->close() instead of
"knowing" to close the fp before recompressing.
mx_fastclose_mailbox() will safe_fclose() the fp again, but I'm
leaving it there just in case I missed a usage of the fp in some other
part of the code.
Thanks to Damien Riegel for the original patch.
|
|
Set the flag MUTT_NEWFOLDER to signal Maildir and MH to create the directory structure.
Distribute the "open append" code to mbox, mh, and imap/imap.c.
Set pop's mx_ops handler to NULL to signal it is not supported.
|
|
The case statement in mx_commit_message() was previously distributed
to the various ops->commit_msg() handlers, but the fflush and fsync were
not.
|
|
This is based on the trash folder patch by Cedric Duval.
Modifications to the original patch are:
* Use a flag called M_PURGE instead of M_APPENDED. The same flag is
then used in the following "purge" patch instead of adding a
different flag.
* Removed the counter in context. The existing context->deleted
is all that's needed.
* Removed the "auto unset M_PURGE" when M_DELETED is unset inside
_mutt_set_flag(), although this is convenient, it easily leads to
header->purge not being reset in a few situations.
* Reset purge flag along with the deleted flag if $delete is answered
no.
* Set M_PURGE on an edited message. (edit_one_message())
* Preserve purge flag in mutt_reopen_mailbox()
* Turn off OPTCONFIRMAPPEND when saving to the trash, rather than
hardcoding it off in mutt_save_confirm(). That way, normal save to the
folder will respect the option.
|
|
|
|
Move MMDF operations that were done in mx_commit_message to a dedicated
mmdf_commit_message function.
|
|
Move mbox operations that were done in mx_commit_message to a dedicated
mbox_commit_message function.
|
|
|
|
Add the callback to open an existing message to struct mx_ops. For mbox,
mmdf, maildir, and mh, the code was implemented directly into
mx_open_message, so it is moved in their respective source files. For
imap and pop, there were already <mailbox>_fetch_message functions, but
their argument order has been changed to pass the context as a first
argument.
|
|
Add new boolean option $mail_check_stats (default off) and
$mail_check_stats_interval. The first turns extended buffy on. The
second sets the amount of time in between extended buffy checks
(defaulting to 60 seconds).
Remove the option $sidebar_refresh_time.
Change mutt_buffy_check() to only notify the sidebar to redraw if a
mailbox buffy value changes.
Remove the #ifdefs around the extended buffy functions. The next
patch will merge these functions with the basic functions and pass a
parameter instead.
Imap is a special case, because it sends out the status in one batch.
Change this to perform the comparisons inside cmd_parse_status() and
flag the sidebar there. It was previously directly assigning the
status counters (unsigned int) to the buffy->new (short). Change this
to assign 1/0.
|
|
This is the patch from neomutt; branch 'devel/win-sidebar'; commit
c796fa85f9cacefb69b8f7d8545fc9ba71674180 with the following changes:
- move the sample muttrc and vimrc to contrib.
- remove the README.sidebar.
- empty out the PATCHES file.
|
|
In mx_check_mailbox switch case, we simply call
<mailbox>_check_mailbox, so this operation can be move into the mx_ops
structure pretty easily.
This commit adds a mandatory "check" operation to struct mx_ops and
change all mailboxes to use it. Check functions are made static as they
are only used in their respective source files now.
|
|
The code was already using a function pointer to do this operation. This
commit moves this function pointer to the mx_ops structure and the
open_new_message functions to their respective source files if it needs
to.
|
|
Introduce a dedicated structure for mailbox operations: struct mx_ops.
Move the open and close operations into that structure.
Assign this structure to the context in mx_open_mailbox. This is
currently based on the "magic" for the mailbox type, but may be
refactored in the future.
Add a stub mbox_close_mailbox function. This function does nothing,
the main purpose is to introduce a mx_ops structure for mbox, so its
usage is similar to mh/imap/pop. We reuse the name that was made
available by the previous commmit. Note that the actual closing of
the descriptor is done in mx.c.
To be more consistent with other mailboxes, introduce functions
mh_open_mailbox and maildir_open_mailbox, and create a dedicated
structure for mmdf.
|
|
mbox_close_mailbox was used as the counterpart of
mx_open_mailbox_append. To make things clearer, rename it
mx_close_mailbox_append.
As it is only used in mx.c, move it there and make it static.
|
|
Changeset 23334e967dd7 created a workaround for a namespace conflict
with Solaris and derivatives. After some discussion, the team decided
it would be best to move away from using the "M_" prefix for macros.
This patch was automatically generated by running:
perl -wpi -e 's/\bM_(\w+)\b/MUTT_$1/g' `find . -name '*.[ch]' -print`
with the exception that sys_socket.h was exempted. (That file will
be backed out subsequent to this commit.)
Thanks to Andras Salamon for supplying the perl script used to make
this change.
|
|
The previous patch from Vincent exposed a crash if ftruncate() fails
in mbox_sync_mailbox(). Change fclose() to safe_fclose(), to avoid it
being called twice.
|
|
Generate an error in the event that ftruncate() fails.
|
|
This patch only updates existing copyright notices in the source
files, using commit dates since the last copyright update in commits
e3af935cdb1a and f8fd60d8d3f2.
Add a notice to the COPYRIGHT file to refer to our mercurial
repository for the full commit history.
Add myself to the COPYRIGHT file and smime_keys.pl file.
|
|
|
|
|
|
system calls.
|
|
|
|
|
|
new mail, or just new mail received since the last visit to a mailbox
closes #3271
partly addresses #3310
|
|
the time in the string rather than the current time, otherwise DST issues cause the computed time to be wrong.
closes #2177
|
|
|
|
See #1362.
|
|
#1362, #3271.
|
|
|
|
|
|
|
|
|
|
|
|
Since the file is changed while we have it open in ctx->fp, we likely
get wrong information when parsing the mailbox. Now we explicitely close
and (re)open it.
|
|
|
|
|
|
|
|
This requires to add the buffer size as parameter since the result may
be longer than the original but still fit in the buffer. Closes #2948.
|
|
Non-fatal errors should prevent moving messages, since they indicate
data loss. But mutt should still attempt to display them, since being
able to see some attachments is better than nothing.
Also stop printing out non-PGP material in application/pgp
attachments. Closes #2545, #2912.
|
|
progress updates for >2 GB mbox files)
|
|
|
|
This is necessary to let the mbox driver print useful percentages. If there's no
percentage given and we have a size, calculate on it on our own. Closes #2929.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
(closes #972)
|