Roger Cornelius [Wed, 26 Apr 2017 22:40:34 +0000 (15:40 -0700)]
Fix error message when opening a mailbox with no read permission. (closes #3934)
ctx->mx_ops ends up being NULL for both the case that ctx->magic is 0
and -1. This meant the mutt_perror() error message was never being
printed, because the check for ctx->mx_ops == NULL was taking place
first.
Move the "ctx->magic == -1" check first, so mutt will print out an
appropriate perror message in that case.
Pietro Cerutti [Mon, 24 Apr 2017 15:57:15 +0000 (16:57 +0100)]
Fix and simplify handling of GPGME in configure.ac (#545)
* Fix
When GPGME is not installed, the m4 macro AM_PATH_GPGME is not defined,
which causes autoconf to fail. The fix adds an `ifdef` around the block
to skip expanding the macro, if it's not defined.
* Enhancement
The enhancement is to assume that we have at leat GPGME 1.2.0 (released
in 2009). This allows us to simplify the configure.ac code block by
avoiding checks for functionalities we know to be there.
Ian Zimmerman [Tue, 18 Apr 2017 22:01:36 +0000 (15:01 -0700)]
fix broken from_chars behaviour
Upstream adopted and extended the from_chars feature.
A couple of changes to the behaviour were introduced by the change:
- '\r' wasn't being recognised
- An unwanted space was being displayed
Kevin McCarthy [Tue, 18 Apr 2017 19:25:17 +0000 (12:25 -0700)]
Fix GPG_TTY to be added to envlist. (closes #3931)
Changeset 37209157e33c converted filters to use the envlist.
Unfortunately, I missed that pgp.c sets GPG_TTY when using the GnuPG
agent. Convert to add GPG_TTY to the envlist too.
Kevin McCarthy [Tue, 18 Apr 2017 20:13:00 +0000 (13:13 -0700)]
Revert sort prompt labels. (see #3930)
Using the (s)ort style may look a bit better, but it makes the prompt
over 80 columns. The multichoice prompt supports multiple lines now,
but it is better to have it fit on one line if possible.
Revert back to the "capital letter" method, but leave the ticket open,
to explore other ideas that Vincent and chdiza have for better ways to
present a long choice like this.
Kevin McCarthy [Tue, 18 Apr 2017 19:25:17 +0000 (12:25 -0700)]
Fix GPG_TTY to be added to envlist. (closes #3931)
Changeset 37209157e33c converted filters to use the envlist.
Unfortunately, I missed that pgp.c sets GPG_TTY when using the GnuPG
agent. Convert to add GPG_TTY to the envlist too.
Richard Russon [Tue, 18 Apr 2017 12:50:55 +0000 (13:50 +0100)]
merge: upstream fixes (mutt/default)
* Add ifdefs around new mutt_resize_screen calls.
* Add multiline and sigwinch handling to mutt_multi_choice. (see #3877)
* Set pager's REDRAW_SIGWINCH when reflowing windows.
* Add multiline and sigwinch handling to mutt_yesorno. (closes #3877)
* Change the sort prompt to use (s)ort style prompts.
* Handle the pager sort prompt inside the pager.
Kevin McCarthy [Tue, 18 Apr 2017 00:40:15 +0000 (17:40 -0700)]
Handle the pager sort prompt inside the pager.
Display the prompt in the pager, so a multiline prompt or resize
doesn't refresh the index menu. Then, bounce back through the index
to handle resorting and status line updates.
Kevin McCarthy [Tue, 18 Apr 2017 00:40:15 +0000 (17:40 -0700)]
Handle the pager sort prompt inside the pager.
Display the prompt in the pager, so a multiline prompt or resize
doesn't refresh the index menu. Then, bounce back through the index
to handle resorting and status line updates.
Richard Russon [Sat, 15 Apr 2017 16:27:54 +0000 (17:27 +0100)]
build: restore po/mutt.pot
This file is autogenerated from the the files listed in po/POTFILES.in
However, if it's missing it causes the build to regenerate ALL the .po
files every time there's a change to the code. This is annoying.
If you want to update the .po files, try:
make -C po update-po
use w3m as default for generating UTF8 manual.txt (#491)
The input for manual.txt is manual.html which is UTF8 encoded. Now
forcing manual.txt to be ascii leads to all sorts of "?" in the ascii
file, which is not nice. If we have UTF8 input we should also use UTF8
for the output.
Moved w3m to be the default to generate UTF8 manual.txt. If you prefer
manual.txt to be ascii the fallbacks lynx or elinks will still produce
plain ascii.
Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
Richard Russon [Wed, 12 Apr 2017 18:45:24 +0000 (19:45 +0100)]
apply clang-format to the source code
The source and headers have been treated slightly differently.
The source files (*.c) have had clang-format applied and it's expected
that this will become an automatic process in the future. A few blocks
of source have been protected from change by special comments
// clang-format off
// clang-format on
The header files contain a lot of #define'd lists which contain a lot of
manually placed whitespace. clang-format doesn't have an option to
align these as we'd like.
The compromise was to run clang-format on the headers, but cherry-pick
the formatting that was more human-friendly. clang-format won't be
automatically run on the headers.
This commit also sorts out a few other formatting issues:
- All tabs have been expanded
- Tabs in translated strings have been expanded
(this makes it easier to align translated strings)
Richard Russon [Thu, 13 Apr 2017 11:24:05 +0000 (12:24 +0100)]
revert broken fix
This IS the site of a possible bug, but this isn't the way to fix it.
Some paths through parse_set() will lead to (idx == -1) which will cause a
buffer underrun when used as an index to MuttVars.
Richard Russon [Wed, 12 Apr 2017 01:23:44 +0000 (02:23 +0100)]
merge: boolify functions
These functions returned -1 on failure but are essentially boolean.
Convert them to use false/true.
* check_all_msg()
* check_msg()
* compare_certificates()
* compare_stat()
* crypt_key_is_valid()
* is_bound()
* line_compare()
* mutt_check_charset()
* rfc822_valid_msgid()
* smtp_code()
* url_parse_query()
* user_in_addr()