Commit graph

1174 commits

Author SHA1 Message Date
Colin Leroy d8b3d1705d Implement safe_fclose() so we can respect the "Metadata handling"
preference for every data file we write into.
2018-10-16 18:45:37 +02:00
Colin Leroy 31fce04fdc Fix bug #3889, "Address and quoted message inconsistent in reply"
* Fix right-click replying to messages in summaryview
* Fix corner-case when selected and opened messages are different,
  and one of them is to a mailing-list.
2018-10-04 19:32:28 +02:00
Paul deaf6940f7 fix warning dialogue when a re-edited draft compose window is closed after a send failure
prevents unexpected loss of drafted message
2018-09-14 11:29:14 +02:00
wwp 144e8a2911 Add new folder options: enable/disable per-folder signing and
encrypting (by default: obey to applicable account preference).
2018-09-14 11:29:05 +02:00
wwp 6c2c5640b5 Rename activate_privacy_system() to compose_activate_privacy_system(). 2018-09-14 11:28:35 +02:00
Olivier Brunel 592f6d1325 Preserve flags & tags when re-editing a message
When re-editing a message, let's preserve its flags (color labels, etc)
and tags. Can be especially useful for those who use such things on queued
messages, and find themselves re-editing messages afterwards but before
actually sending them.
2018-09-14 11:27:30 +02:00
wwp 53710532cd Since we depend on GLib 2.28, make real use of GList/GSList's _free_full
functions. Remove unused list freeing functions.
2018-05-26 15:14:44 +02:00
wwp 2b5bf3d617 Fix few unchecked return values reported by Coverity:
1434187, 1434189, 1434192, 1434193, 1434195, 1434196, 1434198, 1434200, 1434202, 1434203
And few more. Change few silent returns into debug ones (cm_return_if_fail).
2018-05-26 15:09:11 +02:00
wwp afd4f40000 Fix code compilation when configure --enable-generic-umpc code has been used. 2018-05-06 23:28:39 +02:00
wwp 3b3156d944 Clean-up in comments (The Commit Of The Year). 2018-04-28 20:45:37 +02:00
Andrej Kacian 7087f6b973 Fix two missed return values in compose_write_to_file() from commit e9f610a4f.
Thanks to wwp for finding the issue!
2018-04-28 20:45:31 +02:00
Andrej Kacian b8db458023 Fix for e9f610a4f for the rare cases the privacy system has no error string ready. 2018-04-13 20:26:51 +02:00
Andrej Kacian 06cd7d5ff5 Rework and simplify how compose_queue() return values are handled
Also closes bug #3960 - Sends unencrypted emails when encryption fails
because we now return from compose_queue() with an error when
that happens, instead of ignoring it.
2018-04-13 20:09:36 +02:00
wwp 7e99816361 Fix broken templates attachments due to commit 814b087,
which clears template internals (including attachments list)
wherever template contains any field to apply (To/Subject/etc.)
and before attachments could be processed. Simply process
attachments before attachments list may be cleared by fields
processing. Ideally we should change quote_fmt_reset_vartable()
or its uses in compose.c at least.
2018-04-10 18:35:31 +02:00
Andrej Kacian ebd2fafbef Fix a dumb double-free on Windows.
Closes bug 3957: Claws-Mail 64bit crashes when saving a draft
2018-02-28 19:47:56 +01:00
Ricardo Mones 27c4b31bae Replace deprecated gtk_misc_set_alignment() in core 2018-02-20 19:08:45 +01:00
Andrej Kacian ab0270f13e Correctly set initial size for main and compose windows.
Use gtk_window_set_default_size() instead of
gtk_widget_set_size_request(), since in GTK3, the latter
sets minimum allowed size for a widget, and we're
interested in just setting initial size here. User
should be allowed to make the windows smaller.
2018-02-17 11:37:35 +01:00
Andrej Kacian 0463f92df1 Fix compose textview not using full window height. 2018-02-11 13:38:23 +01:00
Andrej Kacian 1d07c0f5db Limit external editor feature to UNIX OS with X11.
It uses GtkSocket, which is only available on X11
with GTK3.
2018-02-11 13:38:23 +01:00
wwp a99a6bc52c Update few occurrences to the new alertpanel() API (and by the way,
solve a leaking button_label strinc allocation).
2018-02-09 22:36:41 +01:00
Andrej Kacian 5ab9e6e799 Rework of alertpanel default button focus handling.
Instead of using "+" prefix with button labels and/or
the default_value parameter, we introduce "focus"
parameter, which will point to first, second or third
button.

Advantages:
- we got rid of the "+" prefix, which won't work with GTK3
  with GTK3
- instead of having two ways to indicate which button
  should have focus, which can be in conflict, and
  are not very straightforward, there is just one,
  arguably more intuitive
- some small memory leaks fixed along the way
  (using g_strconcat() directly as function argument)
2018-02-09 14:44:30 +01:00
Ralph Sennhauser 59309a6501 Drop ifdefs for old gtk+2
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2018-02-06 20:27:53 +01:00
Ricardo Mones 8363e45874 Move all colors into an array 2018-02-05 21:18:03 +01:00
Andrej Kacian b190f09ab3 Fix missing GError initialization in compose_draft(). 2017-12-20 10:46:01 +01:00
Andrej Kacian 9df59ba025 Add proper ifdefs around master_passphrase() calls. 2017-12-14 23:24:20 +01:00
Ricardo Mones 5b7108e97e Fix bug 3935: build from GIT master broken on arch linux
Completes 48f72c22f9 to allow building
with disabled LDAP support.
2017-12-12 18:27:32 +01:00
Andrej Kacian 48f72c22f9 Fix bug 3793: segfault when autocompletion asks for master passphrase
This is done by checking early if any ldap server is password-protected,
and asking for master passphrase when compose window appears.  If user
cancels the dialog (does not enter the passphrase), we temporarily
disable the password-protected LDAP servers, just for that particular
compose window. We reenable them in compose_destroy().
2017-12-10 18:13:28 +01:00
Ricardo Mones 9d25cc995d Fix CID 1420437 (OVERFLOW_BEFORE_WIDEN) 2017-10-30 11:00:17 +01:00
Andrej Kacian b97b0cead9 Use GIO API instead of g_stat() in compose_draft() on Windows. 2017-10-29 18:41:35 +01:00
Andrej Kacian 211cb04781 Use GIO API instead of g_stat() on Windows in compose_add_attachments() and get_file_size(). 2017-10-29 18:41:35 +01:00
Andrej Kacian 5407e4537c Use GIO API instead of g_stat() in compose_insert_file() on Windows. 2017-10-29 18:12:12 +01:00
Colin Leroy 9b17603ded CLI: Add a --insert option to --compose, allowing to insert files. 2017-09-15 15:45:46 +02:00
Paul 62686c8f6f fix bug 3852, 'delete header entry button doesn't restore colour' 2017-09-02 10:44:48 +01:00
Paul 9f24157d84 fix bug 3886, '"About to send mail to 2 recipients" warning when one of them is Reply-To' 2017-08-31 10:13:28 +01:00
Andrej Kacian 3266300edc Fix a memory leak in empty subject warning dialog in compose.c. 2017-07-28 19:50:29 +02:00
Andrej Kacian 14eb5b0094 Fix template parsing broken by commit 814b087. 2017-07-28 19:46:13 +02:00
Andrej Kacian fb0fb9d311 Fix a memory leak in compose_write_to_file(). 2017-07-12 11:14:13 +02:00
Andrej Kacian 814b087c91 Fix several memory leaks around template parsing.
FLEX-generated quote_fmt_scan_string() allocates a buffer
(and actually returns a pointer to it, although its prototype
in quote_fmt.h says its return value is void), which needs
to be cleaned up afterwards.
2017-07-11 18:37:54 +02:00
Ricardo Mones e00bcd4249 Check for NULL buttons also here
Thanks Andrej for the suggestion!
2017-07-11 10:06:20 +02:00
Ricardo Mones cd5ee29a81 Fix initialization of privacy buttons sensitivity 2017-07-11 09:53:42 +02:00
Andrej Kacian 7bf56c150c Add Sign/Encrypt toggle buttons to Compose toolbar. 2017-07-11 00:12:42 +02:00
Andrej Kacian 2872997c50 Fix two memory leaks around use of privacy_get_system_ids(). 2017-07-10 17:56:09 +02:00
Andrej Kacian d661fd7233 Only preserve existing Message-ID when reediting a draft.
This is a followup to commit e22cbed1f.
Closes Bug 3828 - "Re-edit" should not recycle the Message-ID header
2017-05-31 21:10:19 +02:00
Paul 6cc9389b81 add more utf8 listitem characters
patch by H. Merijn Brand
2017-05-22 17:56:06 +01:00
Paul 2db3b8b102 fix Resent-Date value 2017-05-21 19:12:51 +01:00
Paul 592315ae17 fix bug 3801, 'Broken auto wrapping' 2017-04-02 12:24:20 +01:00
Andrej Kacian 7c16b7e353 Make sure outgoing messages have a trailing newline.
This fixes a corner case where if the last line of
a message is a quote, its last character doesn't get
displayed when viewing the copy in outbox.
2017-03-30 21:12:52 +02:00
Andreas Bierfert e6db5f2b30 Fix bug #3796 format-security warnings in alertpanel_ use
This patch fixes format-security warnings in alertpanel_ use by passing
"%s" as string and the buffer as va argument if no other va arguments
are present.
2017-03-30 00:42:38 +02:00
wwp cce5b68054 Correct/update comment. 2017-03-19 19:42:04 +01:00
wwp 3595d6c625 Fix bug 3785: custom headers not stored in queued messages (and thus,
not sent).
2017-03-19 12:13:28 +01:00