Pietro Cerutti [Fri, 9 Jun 2017 12:53:24 +0000 (12:53 +0000)]
More sophisticated check for BDB version + support for DB6 (non default)
This commit enhances configure.ac to actually parse (as in CPP) and
extract the values of DB_VERSION_MAJOR and DB_VERSION_MINOR from the
Berkeley DB include files. The previous approach to just use grep failed
on some system where the includes are just wrappers around the real bdb
headers.
Also, add support for the current db6 version (6.2), although db5 is
still the first one looked for.
Antonio Radici [Sun, 25 Jun 2017 22:47:11 +0000 (23:47 +0100)]
revert part of 40f81d1 Add debug_level/debug_file options
This patch moves the set_default/restore_default couple after the defaults have
been set by the init function; this was correctly placed in 1.7.2 and somehow it
got moved to the wrong place, which means that tmpdir (and many other variable)
are not correctly set with their new default value determined from environment
variables (or other logic), so when they get resetted with a 'reset all' call in
.muttrc, they will never have the correct default to fall back to and they will
use the wrong one in init.h
This patch fixes:
- http://bugs.debian.org/865822
- http://bugs.debian.org/865842
Richard Russon [Sat, 24 Jun 2017 16:44:15 +0000 (17:44 +0100)]
merge: upstream fixes (mutt/default)
* Change the compose menu fields to be dynamically padded.
* Rename 'sign as' to 'Sign as'; makes compose menu more consistent.
* Make GPGME key selection behavior the same as classic-PGP. (see #3950)
* Force hard redraw after $sendmail instead of calling mutt_endwin. (closes #3952) (see #3948)
* Enable all header fields in the compose menu to be translated.
* Auto-pad translation for the GPGME key selection "verify key" headers.
* Improve the L10N comment about Sign as.
Kevin McCarthy [Wed, 14 Jun 2017 22:12:45 +0000 (15:12 -0700)]
Enable all header fields in the compose menu to be translated.
While it is suggested they need not be, for some locales it might be
preferable to be able to localize the fields.
For instance, fr_FR may want to change the punctuation to have a space
in front of the colon. ja_JP may be more comfortable with a native
character set description of the field when using it every day.
Kevin McCarthy [Tue, 13 Jun 2017 01:29:48 +0000 (18:29 -0700)]
Force hard redraw after $sendmail instead of calling mutt_endwin. (closes #3952) (see #3948)
Adding a mutt_endwin() seemed like a clean solution to allowing
ncurses pinentry for $sendmail, but it leaves other users watching a
blank screen. This change is extremely likely to generate a large
number of complaints and bug reports. So instead, force a hard
refresh afterwards.
If the message is no longer in the current query after modifying
the label it will be hidden as before, but if it is in the current
query (again), it will be unhidden.
Decode CRLF line endings to LF when copying headers
This fixes display issues with files that consist of CRLF
line endings rather than just LF line endings, for example,
emails exported directly from the gmail API.
This only kicks in when CH_DECODE is set which might be a bit
strange, because that does RFC2047 header decoding, but it seems
a safe place to place this line end decoding without potentially
affecting anything else.
Richard Russon [Tue, 20 Jun 2017 09:55:11 +0000 (10:55 +0100)]
split mutt_parse_mailboxes into mutt_parse_unmailboxes
Split mutt_parse_mailboxes into two functions: one to add, one to remove.
There's not much overlap in the two functions and separating them
simplifies the logic.
Where unmailboxes used to use two loops, there's now only one.
Richard Russon [Thu, 8 Jun 2017 14:43:16 +0000 (15:43 +0100)]
reduce scope of for loop variables
Each change is limited to a single function:
attach_forward_bodies
attach_forward_msgs
attach_reply_envelope_defaults
check_all_msg
find_parent
mutt_attach_bounce
mutt_attach_reply
mutt_attach_resend
mutt_builtin_editor
mutt_gen_attach_list
Stefan Assmann [Tue, 30 May 2017 07:50:40 +0000 (09:50 +0200)]
include mutt_regex.h in globals.h
Error observered
In file included from main.c:40:0:
globals.h:56:20: error: storage size of 'AttachKeyword' isn't known
WHERE struct Regex AttachKeyword;
^~~~~~~~~~~~~
globals.h:288:20: error: storage size of 'PgpGoodSign' isn't known
WHERE struct Regex PgpGoodSign;
^~~~~~~~~~~
Adding header include for mutt_regex.h.
Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
Stefan Assmann [Tue, 30 May 2017 06:25:33 +0000 (08:25 +0200)]
check return value of fgets
Following warning was observed:
init.c: In function 'mutt_init':
mutt.h:53:15: warning: ignoring return value of 'fgets_unlocked', declared with attribute warn_unused_result [-Wunused-result]
#define fgets fgets_unlocked
init.c:4053:7: note: in expansion of macro 'fgets'
fgets(buffer, sizeof(buffer), f);
^~~~~
Added code that checks return value.
Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
Richard Russon [Wed, 7 Jun 2017 21:56:59 +0000 (22:56 +0100)]
merge: upstream fixes (mutt/default)
* Fix "format string is not a string literal" warnings. (closes #3949)
* Enable TEXTDOMAINDIR override to make translation testing easier.
* Change km_dokey() to return -2 on a timeout/sigwinch.
* Fix tag-prefix to not abort on $timeout.
* Restore setenv function.
* Move setting of GPG_TTY to mutt_init(). (see #3948)
* Add a mutt_endwin() before invoking $sendmail. (closes #3948)
Kevin McCarthy [Wed, 7 Jun 2017 01:38:47 +0000 (18:38 -0700)]
Add a mutt_endwin() before invoking $sendmail. (closes #3948)
This is to support invoking a program such as msmtp that can use gpg
to decrypt a password. The ncurses pinentry can corrupt the screen
unless we exit curses.
Kevin McCarthy [Thu, 1 Jun 2017 22:17:01 +0000 (15:17 -0700)]
Change km_dokey() to return -2 on a timeout/sigwinch.
In some cases, such as tag-prefix or _mutt_enter_string(), it is
desirable to be able to distinguish between a timeout/sigwinch event
and an input error/abort/ctrl-g.
toogley [Mon, 5 Jun 2017 14:18:37 +0000 (16:18 +0200)]
github: simplify PR template
In a lot of PR's, either the question "Why is this PR needed" is removed
or answered very similar to "What does this PR do?". Therefore, i think
this can be removed.