[Commits] [SCM] claws branch, gtk3, updated. 3.16.0-822-g14b243655

paul at claws-mail.org paul at claws-mail.org
Tue Nov 19 10:02:45 CET 2019


The branch, gtk3 has been updated
       via  14b243655db5f329306c6e764a05f2ff69c284d5 (commit)
       via  9dc4849397b93df3ab24b6a141185988979ff075 (commit)
       via  d042ef5652c031df5cf3b14786b7558236fb4684 (commit)
       via  567f9e714454d57a5506c4b835b72c13c560c150 (commit)
       via  508e95005154c797d2738fd4973f66714d7116b5 (commit)
       via  7664e664f6df59f4d536bbfef5f324dc4220c3fb (commit)
       via  70bf25cfe5a25869f8c3f0cb10573de597e2b957 (commit)
       via  5e00dce88c03f1411ca90093f909543b00573975 (commit)
       via  8e58c3f9205e8785aa03e9f92afdc0cc5d9c8adb (commit)
       via  fd84b8a798568aa0a655662ba527d63e661b9e99 (commit)
       via  48d6387b579c8ca65aa9de9a255ff2f1a9d09060 (commit)
       via  696e43087a29dad2dc23668c88106603a6230bff (commit)
       via  7639e2a87fba27056a00d58e145ba7ab963d24b0 (commit)
       via  399c094348d2e4ce1e41f011c67de3d9820f41b8 (commit)
       via  0d5fbaf0c359b6712ac1020fe91fadf1e75f754a (commit)
       via  63f0dc7bc4cb44aa8a7d53f47021ab04baf700a8 (commit)
       via  e6affb13d094ae55d7caaee56eb8d87c6b02817a (commit)
       via  8239b16d04ccedcc9d09532305b8d171d1ac5fc6 (commit)
       via  714ebee34cd950369f7f300090892447187817c8 (commit)
       via  60c48df1ffb38fed0c2ebcc31c00abd097e50ecd (commit)
       via  db38901ce27ee994e64b7baf98d9120e8d834c78 (commit)
       via  46e97eac34b82e336d184bd081ccb473b663cb83 (commit)
       via  fafd8ff38834edb111b745f70af4c5a95fa80328 (commit)
       via  019648163c7eb418488a35ec9d8e67b2f7755ee4 (commit)
       via  e85b2da5b040049c844b0998b76144781a05c7d0 (commit)
       via  e70e3cde6ffbbbcda7fc4a5cd355484aec6346e8 (commit)
      from  9907462a49c70bb9bcadacd7af873bd1158cd8b8 (commit)

Summary of changes:
 AUTHORS                                 |   2 +
 manual/advanced.xml                     |  22 ----
 manual/es/advanced.xml                  |  23 ----
 manual/fr/advanced.xml                  |  19 ---
 src/account.c                           |  34 ++---
 src/account.h                           |   8 +-
 src/compose.c                           |   7 +-
 src/gtk/authors.h                       |   1 +
 src/gtk/menu.c                          |   4 +
 src/mainwindow.c                        | 222 +++++++++++++++-----------------
 src/mbox.c                              |   2 +-
 src/messageview.c                       |   1 -
 src/mimeview.c                          |  11 +-
 src/plugins/spamassassin/spamassassin.c |   2 +-
 src/prefs_matcher.c                     |   5 +-
 src/prefs_msg_colors.c                  |  42 +++++-
 src/prefs_summaries.c                   |  26 ++++
 src/procmime.c                          |   6 +-
 src/procmsg.c                           |   7 +-
 src/procmsg.h                           |   3 +-
 src/quote_fmt_parse.y                   |   6 +-
 src/summaryview.c                       | 135 +++++++++----------
 src/textview.c                          |  41 +++---
 src/textview.h                          |   3 +-
 tools/gitlog2changelog.py               |   4 +-
 25 files changed, 320 insertions(+), 316 deletions(-)


- Log -----------------------------------------------------------------
commit 14b243655db5f329306c6e764a05f2ff69c284d5
Author: Paul <paul at claws-mail.org>
Date:   Mon Nov 4 14:30:56 2019 +0000

    move diff colour prefs into 'Message view' frame, and react to 'enable coloration...' checkbox

diff --git a/src/prefs_msg_colors.c b/src/prefs_msg_colors.c
index 5191ddadc..3dced72fe 100644
--- a/src/prefs_msg_colors.c
+++ b/src/prefs_msg_colors.c
@@ -1,6 +1,6 @@
 /*
  * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2004-2017 Hiroyuki Yamamoto & The Claws Mail Team
+ * Copyright (C) 2004-2019 The Claws Mail Team & Hiroyuki Yamamoto
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -126,6 +126,8 @@ static void prefs_msg_colors_create_widget(PrefsPage *_page, GtkWindow *window,
 	GtkWidget *hbox_quote;
 	GtkWidget *vbox_quotefg;
 	GtkWidget *vbox_quotebg;
+	GtkWidget *frame_diff;
+	GtkWidget *vbox4;
 	/* custom colors */
 	GtkWidget *hbox_custom_colors;
 	GtkWidget *vbox_custom_colors;
@@ -306,36 +308,12 @@ static void prefs_msg_colors_create_widget(PrefsPage *_page, GtkWindow *window,
 	COLOR_LABEL_PACK_START(hbox, COL_SIGNATURE, _("Signatures"));
 	SET_TOGGLE_SENSITIVITY(checkbtn_enable_colors, label[COL_SIGNATURE]);
 
-	vbox2 = gtkut_get_options_frame(vbox1, &frame_folder, _("Folder list"));
-
-	hbox = gtk_hbox_new(FALSE, VBOX_BORDER);
-	gtk_widget_show (hbox);
-	gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, TRUE, 0);
-
-	COLOR_BUTTON_PACK_START(hbox, COL_TGT_FOLDER,
-				C_("Tooltip", "Pick color for Target folder. "
-				   "Target folder is used when the option "
-				   "'Execute immediately when moving or "
-				   "deleting messages' is turned off"));
-
-	COLOR_LABEL_PACK_START(hbox, COL_TGT_FOLDER, _("Target folder"));
+	vbox4 = gtkut_get_options_frame(vbox2, &frame_diff, _("Patch messages and attachments"));
+	SET_TOGGLE_SENSITIVITY(checkbtn_enable_colors, frame_diff);
 
 	hbox = gtk_hbox_new(FALSE, VBOX_BORDER);
 	gtk_widget_show (hbox);
-	gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
-
-	COLOR_BUTTON_PACK_START(hbox, COL_NEW,
-				C_("Tooltip", "Pick color for folders "
-				   "containing new messages"));
-
-	COLOR_LABEL_PACK_START(hbox, COL_NEW,
-			       _("Folder containing new messages"));
-
-	vbox2 = gtkut_get_options_frame(vbox1, &frame_folder, _("Patch messages/attachments"));
-
-	hbox = gtk_hbox_new(FALSE, VBOX_BORDER);
-	gtk_widget_show (hbox);
-	gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, TRUE, 0);
+	gtk_box_pack_start (GTK_BOX (vbox4), hbox, FALSE, TRUE, 0);
 
 	COLOR_BUTTON_PACK_START(hbox, COL_DIFF_ADDED,
 				C_("Tooltip", "Pick color for inserted lines"));
@@ -344,7 +322,7 @@ static void prefs_msg_colors_create_widget(PrefsPage *_page, GtkWindow *window,
 
 	hbox = gtk_hbox_new(FALSE, VBOX_BORDER);
 	gtk_widget_show (hbox);
-	gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
+	gtk_box_pack_start (GTK_BOX (vbox4), hbox, FALSE, FALSE, 0);
 
 	COLOR_BUTTON_PACK_START(hbox, COL_DIFF_DELETED,
 				C_("Tooltip", "Pick color for removed lines"));
@@ -354,7 +332,7 @@ static void prefs_msg_colors_create_widget(PrefsPage *_page, GtkWindow *window,
 
 	hbox = gtk_hbox_new(FALSE, VBOX_BORDER);
 	gtk_widget_show (hbox);
-	gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
+	gtk_box_pack_start (GTK_BOX (vbox4), hbox, FALSE, FALSE, 0);
 
 	COLOR_BUTTON_PACK_START(hbox, COL_DIFF_HUNK,
 				C_("Tooltip", "Pick color for hunk lines"));
@@ -362,6 +340,31 @@ static void prefs_msg_colors_create_widget(PrefsPage *_page, GtkWindow *window,
 	COLOR_LABEL_PACK_START(hbox, COL_DIFF_HUNK,
 			       _("Hunk lines"));
 
+	vbox2 = gtkut_get_options_frame(vbox1, &frame_folder, _("Folder list"));
+
+	hbox = gtk_hbox_new(FALSE, VBOX_BORDER);
+	gtk_widget_show (hbox);
+	gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, TRUE, 0);
+
+	COLOR_BUTTON_PACK_START(hbox, COL_TGT_FOLDER,
+				C_("Tooltip", "Pick color for Target folder. "
+				   "Target folder is used when the option "
+				   "'Execute immediately when moving or "
+				   "deleting messages' is turned off"));
+
+	COLOR_LABEL_PACK_START(hbox, COL_TGT_FOLDER, _("Target folder"));
+
+	hbox = gtk_hbox_new(FALSE, VBOX_BORDER);
+	gtk_widget_show (hbox);
+	gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
+
+	COLOR_BUTTON_PACK_START(hbox, COL_NEW,
+				C_("Tooltip", "Pick color for folders "
+				   "containing new messages"));
+
+	COLOR_LABEL_PACK_START(hbox, COL_NEW,
+			       _("Folder containing new messages"));
+
 	/* custom colors */
 	vbox_custom_colors = gtk_vbox_new (FALSE, VSPACING_NARROW);
 	gtk_widget_show (vbox_custom_colors);

commit 9dc4849397b93df3ab24b6a141185988979ff075
Author: Ricardo Mones <ricardo at mones.org>
Date:   Wed Oct 30 11:04:01 2019 +0100

    Fix indentation, really

diff --git a/tools/gitlog2changelog.py b/tools/gitlog2changelog.py
index cebbd0c5c..fdbc178cc 100755
--- a/tools/gitlog2changelog.py
+++ b/tools/gitlog2changelog.py
@@ -67,7 +67,7 @@ for line in fin:
         date = dateList[1]
         date = date[0:len(date)-1]
         dateFound = True
-    continue
+        continue
     # The svn-id lines are ignored
     elif re.match('    git-svn-id:', line) >= 0:
         continue

commit d042ef5652c031df5cf3b14786b7558236fb4684
Author: Ricardo Mones <ricardo at mones.org>
Date:   Tue Oct 29 16:17:59 2019 +0100

    Fix indentation and interpreter

diff --git a/tools/gitlog2changelog.py b/tools/gitlog2changelog.py
index 216145bd1..cebbd0c5c 100755
--- a/tools/gitlog2changelog.py
+++ b/tools/gitlog2changelog.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python2
 # Copyright 2008 Marcus D. Hanwell <marcus at cryos.org>
 # Adapted for Claws Mail - Copyright 2013 Colin Leroy <colin at colino.net>
 # Distributed under the terms of the GNU General Public License v2 or later
@@ -67,7 +67,7 @@ for line in fin:
         date = dateList[1]
         date = date[0:len(date)-1]
         dateFound = True
-	continue
+    continue
     # The svn-id lines are ignored
     elif re.match('    git-svn-id:', line) >= 0:
         continue

commit 567f9e714454d57a5506c4b835b72c13c560c150
Author: Ricardo Mones <ricardo at mones.org>
Date:   Tue Oct 29 16:12:45 2019 +0100

    Fix UI description in tooltip

diff --git a/src/prefs_matcher.c b/src/prefs_matcher.c
index 5924ea9e4..5f5109019 100644
--- a/src/prefs_matcher.c
+++ b/src/prefs_matcher.c
@@ -669,9 +669,9 @@ static void prefs_matcher_create(void)
 	gtk_widget_set_size_request(headers_combo, 100, -1);
 	gtk_box_pack_start(GTK_BOX(upper_hbox), headers_combo, TRUE, TRUE, 0);
 	header_entry = gtk_bin_get_child(GTK_BIN((headers_combo)));
-	CLAWS_SET_TIP(header_entry, _("Use button on the left to select the "
-		"header name. Type the name of the header if not available in "
-		"the list."));
+	CLAWS_SET_TIP(header_entry, _("Use selector on the right to pick "
+		"the header name. Type the name of the header if not "
+		"available in the list."));
 
 	criteria_combo2 = gtkut_sc_combobox_create(NULL, TRUE);
 	prefs_matcher_set_model(criteria_combo2, matcher.model_phrase);

commit 508e95005154c797d2738fd4973f66714d7116b5
Author: Ricardo Mones <ricardo at mones.org>
Date:   Tue Oct 29 11:05:21 2019 +0100

    Usage hint on header filtering

diff --git a/src/prefs_matcher.c b/src/prefs_matcher.c
index 0e9a3e710..5924ea9e4 100644
--- a/src/prefs_matcher.c
+++ b/src/prefs_matcher.c
@@ -669,7 +669,10 @@ static void prefs_matcher_create(void)
 	gtk_widget_set_size_request(headers_combo, 100, -1);
 	gtk_box_pack_start(GTK_BOX(upper_hbox), headers_combo, TRUE, TRUE, 0);
 	header_entry = gtk_bin_get_child(GTK_BIN((headers_combo)));
-	
+	CLAWS_SET_TIP(header_entry, _("Use button on the left to select the "
+		"header name. Type the name of the header if not available in "
+		"the list."));
+
 	criteria_combo2 = gtkut_sc_combobox_create(NULL, TRUE);
 	prefs_matcher_set_model(criteria_combo2, matcher.model_phrase);
 	gtk_box_pack_start(GTK_BOX(upper_hbox), criteria_combo2, TRUE, TRUE, 0);

commit 7664e664f6df59f4d536bbfef5f324dc4220c3fb
Author: Paul <paul at claws-mail.org>
Date:   Wed Oct 16 09:52:02 2019 +0100

    remove this GDK_WINDOW_TYPE_HINT_DIALOG
    
    this is annoying for users of those WMs which conflate
    GDK_WINDOW_TYPE_HINT_DIALOG with modalilty

diff --git a/src/messageview.c b/src/messageview.c
index b56961a13..f305a4a9b 100644
--- a/src/messageview.c
+++ b/src/messageview.c
@@ -714,7 +714,6 @@ static MessageView *messageview_create_with_new_window_visible(MainWindow *mainw
 	window = gtkut_window_new(GTK_WINDOW_TOPLEVEL, "messageview");
 	gtk_window_set_title(GTK_WINDOW(window), _("Claws Mail - Message View"));
 	gtk_window_set_resizable(GTK_WINDOW(window), TRUE);
-	gtk_window_set_type_hint(GTK_WINDOW(window), GDK_WINDOW_TYPE_HINT_DIALOG);
 
 	gtk_window_set_default_size(GTK_WINDOW(window), prefs_common.msgwin_width,
 			prefs_common.msgwin_height);

commit 70bf25cfe5a25869f8c3f0cb10573de597e2b957
Author: Paul <paul at claws-mail.org>
Date:   Thu Oct 10 15:09:12 2019 +0100

    fix bug 4257, 'claws-mail 3.17.4 breaks copy-pasting from emacs-gtk3'

diff --git a/src/compose.c b/src/compose.c
index e4b4ddb4a..072ae7a46 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -11021,7 +11021,7 @@ static void entry_paste_clipboard(Compose *compose, GtkWidget *entry,
 				  gboolean wrap, GdkAtom clip, GtkTextIter *insert_place)
 {
 	if (GTK_IS_TEXT_VIEW(entry)) {
-		GdkAtom types = gdk_atom_intern ("TARGETS", FALSE);
+		GdkAtom types = gdk_atom_intern ("MULTIPLE", FALSE);
 		GdkAtom *targets = NULL;
 		int n_targets = 0, i;
 		gboolean paste_done = FALSE;

commit 5e00dce88c03f1411ca90093f909543b00573975
Author: Paul <paul at claws-mail.org>
Date:   Thu Oct 10 14:33:39 2019 +0100

    this type_hint not wanted or needed here

diff --git a/src/compose.c b/src/compose.c
index 5640b7d36..e4b4ddb4a 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -7773,7 +7773,6 @@ static Compose *compose_create(PrefsAccount *account,
 	window = gtkut_window_new(GTK_WINDOW_TOPLEVEL, "compose");
 
 	gtk_window_set_resizable(GTK_WINDOW(window), TRUE);
-	gtk_window_set_type_hint(GTK_WINDOW(window), GDK_WINDOW_TYPE_HINT_DIALOG);
 	gtk_widget_set_size_request(window, prefs_common.compose_width,
 					prefs_common.compose_height);
 

commit 8e58c3f9205e8785aa03e9f92afdc0cc5d9c8adb
Author: Paul <paul at claws-mail.org>
Date:   Wed Oct 9 19:01:36 2019 +0100

    another better fix for bug 2131

diff --git a/src/summaryview.c b/src/summaryview.c
index 1c00222f3..b7d9a527b 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -2324,7 +2324,7 @@ void summary_select_node(SummaryView *summaryview, GtkCMCTreeNode *node,
 		summary_unlock(summaryview);
 
 		/* If quicksearch has focus, let's keep it there. */
-		if (!quicksearch_is_in_typing(summaryview->quicksearch) &&
+		if (!quicksearch_has_focus(summaryview->quicksearch) ||
 		    quicksearch_is_running(summaryview->quicksearch))
 			summary_grab_focus(summaryview);
 

commit fd84b8a798568aa0a655662ba527d63e661b9e99
Author: Paul <paul at claws-mail.org>
Date:   Sun Oct 6 18:54:49 2019 +0100

    remove the now unhidden prefs from the Hidden Preferences section

diff --git a/manual/advanced.xml b/manual/advanced.xml
index 1be159151..472d6c37d 100644
--- a/manual/advanced.xml
+++ b/manual/advanced.xml
@@ -631,18 +631,6 @@
 	  </para>
 	</listitem>
       </varlistentry>
-     <varlistentry>
-	<term><literal>diff_added_color</literal></term>
-	<term><literal>diff_deleted_color</literal></term>
-	<term><literal>diff_hunk_color</literal></term>
-	<listitem>
-	  <para>
-    Colors to use when displaying attachments in unified diff format.
-    Default values are '#008b8b' (dark cyan), '#6a5acd' (slate blue) and
-    '#a52a2a' (red brown) respectively.
-	  </para>
-	</listitem>
-      </varlistentry>
       <varlistentry>
 	<term><literal>emphasis_color</literal></term>
 	<listitem>
@@ -899,16 +887,6 @@
 	  </para>
 	</listitem>
       </varlistentry>
-      <varlistentry>
-	<term><literal>summary_from_show</literal></term>
-	<listitem>
-	  <para>
-    Controls the data displayed in the From column in the Message List.
-    Default value '0' displays name, '1' displays address and '2' displays
-    both name and address.
-	  </para>
-	</listitem>
-      </varlistentry>
       <varlistentry>
 	<term><literal>tags_color</literal></term>
 	<term><literal>tags_bgcolor</literal></term>
diff --git a/manual/es/advanced.xml b/manual/es/advanced.xml
index 1c276c2b2..d1fcb8097 100644
--- a/manual/es/advanced.xml
+++ b/manual/es/advanced.xml
@@ -675,18 +675,6 @@
 	  </para>
 	</listitem>
       </varlistentry>
-      <varlistentry>
-	<term><literal>diff_added_color</literal></term>
-	<term><literal>diff_deleted_color</literal></term>
-	<term><literal>diff_hunk_color</literal></term>
-	<listitem>
-	  <para>
-    Colores a usar para mostrar los adjuntos en formato unificado de
-    diff. Los valores predeterminados son '#008b8b' (cian oscuro),
-    '#6a5acd' (azul pizarra) y '#a52a2a' (marrón rojizo) respectivamente.
-	  </para>
-	</listitem>
-      </varlistentry>
       <varlistentry>
 	<term><literal>emphasis_color</literal></term>
 	<listitem>
@@ -938,17 +926,6 @@
 	  </para>
 	</listitem>
       </varlistentry>
-      <varlistentry>
-	<term><literal>summary_from_show</literal></term>
-	<listitem>
-	  <para>
-    Controla la información mostrada en la columna «Desde» de la lista
-    de mensajes. El valor predeterminado '0' muestra el nombre, '1'
-    muestra la dirección de correo electrónico y '2' muestra ambos
-    valores, nombre y dirección.
-	  </para>
-	</listitem>
-      </varlistentry>
       <varlistentry>
 	<term><literal>tags_color</literal></term>
 	<term><literal>tags_bgcolor</literal></term>
diff --git a/manual/fr/advanced.xml b/manual/fr/advanced.xml
index 5cee1f5c2..6aedf2607 100644
--- a/manual/fr/advanced.xml
+++ b/manual/fr/advanced.xml
@@ -390,16 +390,6 @@
                     <listitem><para>Ne pas utiliser de gras ni d'italique dans le
 		    sélecteur de compte de la fenêtre de composition.</para></listitem>
             </varlistentry>
-      <varlistentry>
-	<term><literal>diff_added_color</literal></term>
-	<term><literal>diff_deleted_color</literal></term>
-	<term><literal>diff_hunk_color</literal></term>
-	<listitem>
-	  <para>
-	Couleurs à utiliser pour afficher des pièces jointes au format diff unifié.
-	  </para>
-	</listitem>
-      </varlistentry>
 	    <varlistentry><term>emphasis_color</term>
 		    <listitem><para>
 			Couleur utilisée pour mettre en évidence l'en-tête X-Mailer
@@ -529,15 +519,6 @@
 			les lignes.
 			</para></listitem>
 	    </varlistentry>
-      <varlistentry>
-	<term><literal>summary_from_show</literal></term>
-	<listitem>
-	<para>
-	Choisit ce qui est affiché dans la colonne De de la liste de messages :
-	0 affiche le nom, 1 affiche l'adresse et 2 affiche les deux.
-	</para>
-	</listitem>
-      </varlistentry>
 	    <varlistentry><term>textview_cursor_visible</term>
 		    <listitem><para>Affiche un curseur dans la vue du message.</para></listitem>
 	    </varlistentry>

commit 48d6387b579c8ca65aa9de9a255ff2f1a9d09060
Author: Paul <paul at claws-mail.org>
Date:   Sun Oct 6 18:54:09 2019 +0100

    add UI for summary_from_show pref

diff --git a/src/prefs_summaries.c b/src/prefs_summaries.c
index 0bec32cac..7318d04f6 100644
--- a/src/prefs_summaries.c
+++ b/src/prefs_summaries.c
@@ -76,6 +76,7 @@ typedef struct _SummariesPage
 	GtkWidget *checkbtn_ask_override_colorlabel;
   	GtkWidget *optmenu_sort_key;
   	GtkWidget *optmenu_sort_type;
+	GtkWidget *optmenu_summaryfromshow;
 	GtkWidget *optmenu_nextunreadmsgdialog;
 	GtkWidget *checkbtn_folder_default_thread;
 	GtkWidget *checkbtn_folder_default_thread_collapsed;
@@ -355,6 +356,7 @@ static void prefs_summaries_create_widget(PrefsPage *_page, GtkWindow *window,
 	GtkWidget *label, *label_fill;
 	GtkListStore *menu;
 	GtkTreeIter iter;
+ 	GtkWidget *optmenu_summaryfromshow;
  	GtkWidget *optmenu_nextunreadmsgdialog;
 	GtkWidget *button_edit_actions;
 	GtkWidget *radio_mark_as_read_on_select;
@@ -459,6 +461,24 @@ static void prefs_summaries_create_widget(PrefsPage *_page, GtkWindow *window,
 	PACK_SPACER(hbox0, hbox1, 4);
 	PACK_CHECK_BUTTON(hbox0, checkbtn_summary_col_lock, _("Lock column headers"));
 
+	hbox1 = gtk_hbox_new (FALSE, 10);
+	gtk_widget_show (hbox1);
+	gtk_box_pack_start (GTK_BOX (vbox1), hbox1, FALSE, FALSE, 0);
+
+	label = gtk_label_new (_("Displayed in From column"));
+	gtk_widget_show (label);
+	gtk_box_pack_start(GTK_BOX(hbox1), label, FALSE, FALSE, 0);
+
+	optmenu_summaryfromshow = gtkut_sc_combobox_create(NULL, FALSE);
+	menu = GTK_LIST_STORE(gtk_combo_box_get_model(
+				GTK_COMBO_BOX(optmenu_summaryfromshow)));
+	gtk_widget_show (optmenu_summaryfromshow);
+
+	COMBOBOX_ADD (menu, _("Name"), SHOW_NAME);
+	COMBOBOX_ADD (menu, _("Address"), SHOW_ADDR);
+	COMBOBOX_ADD (menu, _("Name and Address"), SHOW_BOTH);
+
+	gtk_box_pack_start(GTK_BOX(hbox1), optmenu_summaryfromshow, FALSE, FALSE, 0);
 	hbox2 = gtk_hbox_new (FALSE, 8);
 	gtk_widget_show (hbox2);
 	gtk_box_pack_start (GTK_BOX (vbox1), hbox2, FALSE, TRUE, 0);
@@ -675,6 +695,7 @@ static void prefs_summaries_create_widget(PrefsPage *_page, GtkWindow *window,
 	prefs_summaries->optmenu_sort_key = optmenu_sort_key;
 	prefs_summaries->optmenu_sort_type = optmenu_sort_type;
 	prefs_summaries->optmenu_nextunreadmsgdialog = optmenu_nextunreadmsgdialog;
+	prefs_summaries->optmenu_summaryfromshow = optmenu_summaryfromshow;
 
 	prefs_summaries->checkbtn_folder_default_thread = checkbtn_folder_default_thread;
 	prefs_summaries->checkbtn_folder_default_thread_collapsed = checkbtn_folder_default_thread_collapsed;
@@ -737,6 +758,9 @@ static void prefs_summaries_create_widget(PrefsPage *_page, GtkWindow *window,
 	combobox_select_by_data(GTK_COMBO_BOX(optmenu_sort_type),
 			prefs_common.default_sort_type);
 
+	combobox_select_by_data(GTK_COMBO_BOX(optmenu_summaryfromshow),
+			prefs_common.summary_from_show);
+
 	combobox_select_by_data(GTK_COMBO_BOX(optmenu_nextunreadmsgdialog),
 			prefs_common.next_unread_msg_dialog);
 
@@ -811,6 +835,8 @@ static void prefs_summaries_save(PrefsPage *_page)
 			GTK_COMBO_BOX(page->optmenu_sort_key));
 	prefs_common.default_sort_type = combobox_get_active_data(
 			GTK_COMBO_BOX(page->optmenu_sort_type));
+	prefs_common.summary_from_show = combobox_get_active_data(
+			GTK_COMBO_BOX(page->optmenu_summaryfromshow));
 	prefs_common.next_unread_msg_dialog = combobox_get_active_data(
 			GTK_COMBO_BOX(page->optmenu_nextunreadmsgdialog));
 	prefs_common.folder_default_thread =  gtk_toggle_button_get_active(

commit 696e43087a29dad2dc23668c88106603a6230bff
Author: Paul <paul at claws-mail.org>
Date:   Sun Oct 6 12:45:59 2019 +0100

    implemtent RFE 4255, "Switching 'Thread view' on/off discards message selection"

diff --git a/src/mainwindow.c b/src/mainwindow.c
index 4838e9213..a51a91af2 100644
--- a/src/mainwindow.c
+++ b/src/mainwindow.c
@@ -4623,9 +4623,13 @@ static void thread_cb(GtkAction *action, gpointer data)
 {
 	MainWindow *mainwin = (MainWindow *)data;
 	gboolean threaded = FALSE;
+	guint selected_msgnum = 0;
+
 	if (mainwin->menu_lock_count) return;
 	if (!mainwin->summaryview->folder_item) return;
 
+	selected_msgnum = summary_get_msgnum(mainwin->summaryview, mainwin->summaryview->selected);
+
 	threaded = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
 
 	mainwin->summaryview->folder_item->threaded = threaded; 
@@ -4634,6 +4638,7 @@ static void thread_cb(GtkAction *action, gpointer data)
 
 	summary_show(mainwin->summaryview, 
 			mainwin->summaryview->folder_item);
+	summary_select_by_msgnum(mainwin->summaryview, selected_msgnum, FALSE);
 }
 
 static void expand_threads_cb(GtkAction *action, gpointer data)

commit 7639e2a87fba27056a00d58e145ba7ab963d24b0
Author: Paul <paul at claws-mail.org>
Date:   Thu Oct 3 10:30:04 2019 +0100

    beter fix for bug 2131, 3982d3e615ab83b8da70617df46be2cf52ed1cc5
    
    Maintain the previous behaviour of focus switching to the summaryview
    when a quicksearch has been executed

diff --git a/src/summaryview.c b/src/summaryview.c
index 5405a00fb..1c00222f3 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -2324,7 +2324,8 @@ void summary_select_node(SummaryView *summaryview, GtkCMCTreeNode *node,
 		summary_unlock(summaryview);
 
 		/* If quicksearch has focus, let's keep it there. */
-		if (!quicksearch_has_focus(summaryview->quicksearch))
+		if (!quicksearch_is_in_typing(summaryview->quicksearch) &&
+		    quicksearch_is_running(summaryview->quicksearch))
 			summary_grab_focus(summaryview);
 
 		gtkut_ctree_node_move_if_on_the_edge(ctree, node, -1);

commit 399c094348d2e4ce1e41f011c67de3d9820f41b8
Author: wwp <subscript at free.fr>
Date:   Thu Oct 3 09:22:12 2019 +0200

    Remove deprecated define.

diff --git a/src/mimeview.c b/src/mimeview.c
index e2417e900..3a0f1884b 100644
--- a/src/mimeview.c
+++ b/src/mimeview.c
@@ -1536,10 +1536,6 @@ static gboolean mimeview_scrolled(GtkWidget *widget, GdkEventScroll *event,
 	return TRUE;
 }
 
-#include "gdk/gdkscreen.h"
-/* from gdkevents.c */
-#define DOUBLE_CLICK_TIME 250
-
 static gboolean part_button_pressed(MimeView *mimeview, GdkEventButton *event, 
 				    MimeInfo *partinfo)
 {

commit 0d5fbaf0c359b6712ac1020fe91fadf1e75f754a
Author: wwp <subscript at free.fr>
Date:   Wed Oct 2 13:40:20 2019 +0200

    Get double-click time from GTK API instead of hard-coded value 250.

diff --git a/src/mimeview.c b/src/mimeview.c
index 8ba420ee1..e2417e900 100644
--- a/src/mimeview.c
+++ b/src/mimeview.c
@@ -1536,6 +1536,7 @@ static gboolean mimeview_scrolled(GtkWidget *widget, GdkEventScroll *event,
 	return TRUE;
 }
 
+#include "gdk/gdkscreen.h"
 /* from gdkevents.c */
 #define DOUBLE_CLICK_TIME 250
 
@@ -1545,8 +1546,11 @@ static gboolean part_button_pressed(MimeView *mimeview, GdkEventButton *event,
 	static MimeInfo *lastinfo;
 	static guint32 lasttime;
 
+	gint double_click_time;
+	g_object_get(gtk_settings_get_default(), "gtk-double-click-time", &double_click_time, NULL);
+
 	if (event->button == 2 ||
-	    (event->button == 1 && (event->time - lasttime) < DOUBLE_CLICK_TIME && lastinfo == partinfo)) {
+	    (event->button == 1 && (event->time - lasttime) < double_click_time && lastinfo == partinfo)) {
 		/* call external program for image, audio or html */
 		mimeview_launch(mimeview, partinfo);
 		return TRUE;

commit 63f0dc7bc4cb44aa8a7d53f47021ab04baf700a8
Author: wwp <subscript at free.fr>
Date:   Wed Oct 2 12:08:20 2019 +0200

    Get rid of a hardcoded define when the enum size can be automatically
    handled.

diff --git a/src/mimeview.c b/src/mimeview.c
index e682aad38..8ba420ee1 100644
--- a/src/mimeview.c
+++ b/src/mimeview.c
@@ -63,9 +63,10 @@ typedef enum
 	COL_SIZE     = 1,
 	COL_NAME     = 2,
 	COL_DATA     = 3,
+	N_MIMEVIEW_COLUMNS
 } MimeViewColumnPos;
 
-#define N_MIMEVIEW_COLS	4
+#define N_MIMEVIEW_COLS	(N_MIMEVIEW_COLUMNS)
 
 static void mimeview_set_multipart_tree		(MimeView	*mimeview,
 						 MimeInfo	*mimeinfo,

commit e6affb13d094ae55d7caaee56eb8d87c6b02817a
Author: Paul <paul at claws-mail.org>
Date:   Wed Oct 2 10:53:48 2019 +0100

    no need to add M_DRAFT for context menu item 'Re-Edit', just use existing M_ALLOW_REEDIT instead

diff --git a/src/mainwindow.c b/src/mainwindow.c
index b6fcf3249..4838e9213 100644
--- a/src/mainwindow.c
+++ b/src/mainwindow.c
@@ -2999,10 +2999,6 @@ SensitiveCondMask main_window_get_current_state(MainWindow *mainwin)
 	    && mainwin->summaryview->folder_item->stype != F_DRAFT)
 		UPDATE_STATE(M_NOT_DRAFT);
 
-	if (mainwin->summaryview->folder_item &&
-	    mainwin->summaryview->folder_item->stype == F_DRAFT)
-		UPDATE_STATE(M_DRAFT);
-
 	if (prefs_common.actions_list && g_slist_length(prefs_common.actions_list))
 		UPDATE_STATE(M_ACTIONS_EXIST);
 
diff --git a/src/mainwindow.h b/src/mainwindow.h
index 0d1ffb14a..ce0b30cac 100644
--- a/src/mainwindow.h
+++ b/src/mainwindow.h
@@ -70,7 +70,6 @@ typedef enum
 	M_HAVE_RETRIEVABLE_ACCOUNT,
 	M_HAVE_ANY_RETRIEVABLE_ACCOUNT,
 	M_NOT_DRAFT,
-	M_DRAFT,
 
 /* reserved */
     M_MAX_RESERVED
diff --git a/src/summaryview.c b/src/summaryview.c
index 1157186b5..5405a00fb 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -1813,7 +1813,7 @@ void summary_set_menu_sensitive(SummaryView *summaryview)
 			(const gchar *) entry_str, \
 			((cond & state) == cond)); \
 }
-	SET_SENSITIVE("Menus/SummaryViewPopup/Reedit", M_TARGET_EXIST, M_DRAFT);
+	SET_SENSITIVE("Menus/SummaryViewPopup/Reedit", M_ALLOW_REEDIT);
 	SET_SENSITIVE("Menus/SummaryViewPopup/Reply", M_HAVE_ACCOUNT, M_TARGET_EXIST);
 #ifndef GENERIC_UMPC
 	SET_SENSITIVE("Menus/SummaryViewPopup/ReplyTo", M_HAVE_ACCOUNT, M_TARGET_EXIST);

commit 8239b16d04ccedcc9d09532305b8d171d1ac5fc6
Author: wwp <subscript at free.fr>
Date:   Wed Oct 2 11:37:15 2019 +0200

    Get rid of one-shot static arrays with hardcoded size using defines,
    directly do the menu entry processing instead of creating an array
    then loop over it.

diff --git a/src/mainwindow.c b/src/mainwindow.c
index d60ff637e..b6fcf3249 100644
--- a/src/mainwindow.c
+++ b/src/mainwindow.c
@@ -3133,127 +3133,112 @@ void main_window_set_menu_sensitive(MainWindow *mainwin)
 	gchar *menu_path;
 	GtkWidget *menu;
 	GList *children, *cur_item;
-	gint i;
 	gboolean mimepart_selected = FALSE;
 
-#define N_ENTRIES 88
-	static struct {
-		const gchar *entry;
-		SensitiveCondMask cond;
-	} entry[N_ENTRIES];
-
-	i = 0;
-#define FILL_TABLE(entry_str, ...) \
-do { \
-	entry[i].entry = (const gchar *) entry_str; entry[i++].cond = main_window_get_mask(__VA_ARGS__, -1); \
-} while (0)
-
-	FILL_TABLE("Menu/File/SaveAs", M_TARGET_EXIST);
-	FILL_TABLE("Menu/File/SavePartAs", M_SINGLE_TARGET_EXIST);
-	FILL_TABLE("Menu/File/Print", M_TARGET_EXIST);
-	FILL_TABLE("Menu/File/SynchroniseFolders", M_WANT_SYNC);
-	FILL_TABLE("Menu/File/Exit", M_UNLOCKED);
-
-	FILL_TABLE("Menu/Edit/SelectThread", M_TARGET_EXIST, M_SUMMARY_ISLIST);
-	FILL_TABLE("Menu/Edit/Find", M_SINGLE_TARGET_EXIST);
-	FILL_TABLE("Menu/Edit/QuickSearch", M_IN_MSGLIST);
-	FILL_TABLE("Menu/Edit/SearchFolder", M_TARGET_EXIST, M_SUMMARY_ISLIST);
-
-	FILL_TABLE("Menu/View/SetColumns/Folderlist", M_UNLOCKED, M_SUMMARY_ISLIST);
-	FILL_TABLE("Menu/View/Sort", M_EXEC, M_SUMMARY_ISLIST);
-	FILL_TABLE("Menu/View/ThreadView", M_EXEC, M_SUMMARY_ISLIST);
-	FILL_TABLE("Menu/View/ExpandThreads", M_MSG_EXIST, M_SUMMARY_ISLIST);
-	FILL_TABLE("Menu/View/CollapseThreads", M_MSG_EXIST, M_SUMMARY_ISLIST);
-	FILL_TABLE("Menu/View/HideReadThreads", M_HIDE_READ_THREADS, M_SUMMARY_ISLIST, M_NOT_DRAFT);
-	FILL_TABLE("Menu/View/HideReadMessages", M_HIDE_READ_MSG, M_SUMMARY_ISLIST, M_NOT_DRAFT);
-	FILL_TABLE("Menu/View/HideDelMessages", M_SUMMARY_ISLIST, M_NOT_DRAFT);
-	FILL_TABLE("Menu/View/Goto/Prev", M_MSG_EXIST);
-	FILL_TABLE("Menu/View/Goto/Next", M_MSG_EXIST);
-	FILL_TABLE("Menu/View/Goto/PrevUnread", M_MSG_EXIST);
-	FILL_TABLE("Menu/View/Goto/NextUnread", M_MSG_EXIST);
-	FILL_TABLE("Menu/View/Goto/PrevNew", M_MSG_EXIST);
-	FILL_TABLE("Menu/View/Goto/NextNew", M_MSG_EXIST);
-	FILL_TABLE("Menu/View/Goto/PrevMarked", M_MSG_EXIST);
-	FILL_TABLE("Menu/View/Goto/NextMarked", M_MSG_EXIST);
-	FILL_TABLE("Menu/View/Goto/PrevLabeled", M_MSG_EXIST);
-	FILL_TABLE("Menu/View/Goto/NextLabeled", M_MSG_EXIST);
-	FILL_TABLE("Menu/View/Goto/ParentMessage", M_SINGLE_TARGET_EXIST);
-	FILL_TABLE("Menu/View/Goto/NextPart", M_SINGLE_TARGET_EXIST);
-	FILL_TABLE("Menu/View/Goto/PrevPart", M_SINGLE_TARGET_EXIST);
-	FILL_TABLE("Menu/View/OpenNewWindow", M_SINGLE_TARGET_EXIST);
-	FILL_TABLE("Menu/View/MessageSource", M_SINGLE_TARGET_EXIST);
-	FILL_TABLE("Menu/View/Part", M_SINGLE_TARGET_EXIST);
-	FILL_TABLE("Menu/View/AllHeaders", M_SINGLE_TARGET_EXIST);
-	FILL_TABLE("Menu/View/Quotes", M_SINGLE_TARGET_EXIST);
-
-	FILL_TABLE("Menu/Message/Receive/CurrentAccount", M_HAVE_ACCOUNT, M_UNLOCKED, M_HAVE_RETRIEVABLE_ACCOUNT);
-	FILL_TABLE("Menu/Message/Receive/AllAccounts", M_HAVE_ACCOUNT, M_UNLOCKED, M_HAVE_ANY_RETRIEVABLE_ACCOUNT);
-	FILL_TABLE("Menu/Message/Receive/CancelReceiving", M_INC_ACTIVE);
-	FILL_TABLE("Menu/Message/SendQueue", M_HAVE_ACCOUNT, M_HAVE_QUEUED_MAILS);
-	FILL_TABLE("Menu/Message/CancelSending", M_SEND_ACTIVE);
-	FILL_TABLE("Menu/Message/ComposeEmail", M_HAVE_ACCOUNT);
-	FILL_TABLE("Menu/Message/ComposeNews", M_HAVE_NEWS_ACCOUNT);
-	FILL_TABLE("Menu/Message/Reply", M_HAVE_ACCOUNT, M_TARGET_EXIST, M_SUMMARY_ISLIST);
-	FILL_TABLE("Menu/Message/ReplyTo", M_HAVE_ACCOUNT, M_TARGET_EXIST, M_SUMMARY_ISLIST);
-	FILL_TABLE("Menu/Message/FollowupReply", M_HAVE_ACCOUNT, M_TARGET_EXIST, M_NEWS, M_SUMMARY_ISLIST);
-	FILL_TABLE("Menu/Message/Forward", M_HAVE_ACCOUNT, M_TARGET_EXIST, M_SUMMARY_ISLIST);
-	FILL_TABLE("Menu/Message/ForwardAtt", M_HAVE_ACCOUNT, M_TARGET_EXIST, M_SUMMARY_ISLIST);
-	FILL_TABLE("Menu/Message/Redirect", M_HAVE_ACCOUNT, M_TARGET_EXIST, M_SUMMARY_ISLIST);
-	FILL_TABLE("Menu/Message/Move", M_TARGET_EXIST, M_ALLOW_DELETE, M_NOT_NEWS);
-	FILL_TABLE("Menu/Message/Copy", M_TARGET_EXIST, M_EXEC);
-	FILL_TABLE("Menu/Message/Trash", M_TARGET_EXIST, M_ALLOW_DELETE, M_NOT_NEWS, M_NOT_TRASH);
-	FILL_TABLE("Menu/Message/Delete", M_TARGET_EXIST, M_ALLOW_DELETE);
-	FILL_TABLE("Menu/Message/TrashThread", M_TARGET_EXIST, M_SUMMARY_ISLIST);
-	FILL_TABLE("Menu/Message/DeleteThread", M_TARGET_EXIST, M_SUMMARY_ISLIST);
-	FILL_TABLE("Menu/Message/CancelNews", M_TARGET_EXIST, M_ALLOW_DELETE, M_NEWS);
-	FILL_TABLE("Menu/Message/Mark", M_TARGET_EXIST, M_SUMMARY_ISLIST);
-	FILL_TABLE("Menu/Message/Mark/MarkSpam", M_TARGET_EXIST, M_CAN_LEARN_SPAM);
-	FILL_TABLE("Menu/Message/Mark/MarkHam", M_TARGET_EXIST, M_CAN_LEARN_SPAM);
-	FILL_TABLE("Menu/Message/Mark/IgnoreThread", M_TARGET_EXIST);
-	FILL_TABLE("Menu/Message/Mark/UnignoreThread", M_TARGET_EXIST);
-	FILL_TABLE("Menu/Message/Mark/Lock", M_TARGET_EXIST);
-	FILL_TABLE("Menu/Message/Mark/Unlock", M_TARGET_EXIST);
-	FILL_TABLE("Menu/Message/ColorLabel", M_TARGET_EXIST);
-	FILL_TABLE("Menu/Message/Tags", M_TARGET_EXIST);
-	FILL_TABLE("Menu/Message/Reedit", M_HAVE_ACCOUNT, M_ALLOW_REEDIT);
-	FILL_TABLE("Menu/Message/CheckSignature", M_SINGLE_TARGET_EXIST);
-
-	FILL_TABLE("Menu/Tools/AddSenderToAB", M_SINGLE_TARGET_EXIST);
-	FILL_TABLE("Menu/Tools/CollectAddresses", M_FOLDER_SELECTED);
-	FILL_TABLE("Menu/Tools/CollectAddresses/FromFolder", M_FOLDER_SELECTED);
-	FILL_TABLE("Menu/Tools/CollectAddresses/FromSelected", M_TARGET_EXIST);
-	FILL_TABLE("Menu/Tools/FilterFolder", M_MSG_EXIST, M_EXEC);
-	FILL_TABLE("Menu/Tools/FilterSelected", M_TARGET_EXIST, M_EXEC);
-	FILL_TABLE("Menu/Tools/RunProcessing", M_HAVE_PROCESSING);
-	FILL_TABLE("Menu/Tools/CreateFilterRule", M_SINGLE_TARGET_EXIST, M_UNLOCKED);
-	FILL_TABLE("Menu/Tools/CreateProcessingRule", M_SINGLE_TARGET_EXIST, M_UNLOCKED);
-	FILL_TABLE("Menu/Tools/ListUrls", M_TARGET_EXIST);
-	FILL_TABLE("Menu/Tools/Actions", M_TARGET_EXIST, M_ACTIONS_EXIST);
-	FILL_TABLE("Menu/Tools/Execute", M_DELAY_EXEC);
-	FILL_TABLE("Menu/Tools/Expunge", M_DELETED_EXISTS);
-	FILL_TABLE("Menu/Tools/ForgetSessionPasswords", M_SESSION_PASSWORDS);
-#ifndef PASSWORD_CRYPTO_OLD
-	FILL_TABLE("Menu/Tools/ForgetMasterPassphrase", M_MASTER_PASSPHRASE);
-#endif
-	FILL_TABLE("Menu/Tools/DeleteDuplicates/SelFolder", M_MSG_EXIST, M_ALLOW_DELETE);
-
-	FILL_TABLE("Menu/Configuration", M_UNLOCKED);
-	FILL_TABLE("Menu/Configuration/ChangeAccount", M_HAVE_MULTI_ACCOUNT);
-	FILL_TABLE("Menu/Configuration/AccountPrefs", M_UNLOCKED);
-	FILL_TABLE("Menu/Configuration/CreateAccount", M_UNLOCKED);
-	FILL_TABLE("Menu/Configuration/EditAccounts", M_UNLOCKED);
-	FILL_TABLE(NULL, -1);
-#undef FILL_TABLE
-	if (i > N_ENTRIES)
-		g_error("main window menu entry table overrun (%d/%d)", i, N_ENTRIES);
-#undef ENTRIES
-
 	state = main_window_get_current_state(mainwin);
 
-	for (i = 0; entry[i].entry != NULL; i++) {
-		sensitive = ((entry[i].cond & state) == entry[i].cond);
-		cm_menu_set_sensitive_full(mainwin->ui_manager, entry[i].entry, sensitive);
-	}
+#define SET_SENSITIVE(entry_str, ...) \
+{ \
+	SensitiveCondMask cond = main_window_get_mask(__VA_ARGS__, -1); \
+	cm_menu_set_sensitive_full(mainwin->ui_manager, \
+			(const gchar *) entry_str, \
+			((cond & state) == cond)); \
+}
+	SET_SENSITIVE("Menu/File/SaveAs", M_TARGET_EXIST);
+	SET_SENSITIVE("Menu/File/SavePartAs", M_SINGLE_TARGET_EXIST);
+	SET_SENSITIVE("Menu/File/Print", M_TARGET_EXIST);
+	SET_SENSITIVE("Menu/File/SynchroniseFolders", M_WANT_SYNC);
+	SET_SENSITIVE("Menu/File/Exit", M_UNLOCKED);
+
+	SET_SENSITIVE("Menu/Edit/SelectThread", M_TARGET_EXIST, M_SUMMARY_ISLIST);
+	SET_SENSITIVE("Menu/Edit/Find", M_SINGLE_TARGET_EXIST);
+	SET_SENSITIVE("Menu/Edit/QuickSearch", M_IN_MSGLIST);
+	SET_SENSITIVE("Menu/Edit/SearchFolder", M_TARGET_EXIST, M_SUMMARY_ISLIST);
+
+	SET_SENSITIVE("Menu/View/SetColumns/Folderlist", M_UNLOCKED, M_SUMMARY_ISLIST);
+	SET_SENSITIVE("Menu/View/Sort", M_EXEC, M_SUMMARY_ISLIST);
+	SET_SENSITIVE("Menu/View/ThreadView", M_EXEC, M_SUMMARY_ISLIST);
+	SET_SENSITIVE("Menu/View/ExpandThreads", M_MSG_EXIST, M_SUMMARY_ISLIST);
+	SET_SENSITIVE("Menu/View/CollapseThreads", M_MSG_EXIST, M_SUMMARY_ISLIST);
+	SET_SENSITIVE("Menu/View/HideReadThreads", M_HIDE_READ_THREADS, M_SUMMARY_ISLIST, M_NOT_DRAFT);
+	SET_SENSITIVE("Menu/View/HideReadMessages", M_HIDE_READ_MSG, M_SUMMARY_ISLIST, M_NOT_DRAFT);
+	SET_SENSITIVE("Menu/View/HideDelMessages", M_SUMMARY_ISLIST, M_NOT_DRAFT);
+	SET_SENSITIVE("Menu/View/Goto/Prev", M_MSG_EXIST);
+	SET_SENSITIVE("Menu/View/Goto/Next", M_MSG_EXIST);
+	SET_SENSITIVE("Menu/View/Goto/PrevUnread", M_MSG_EXIST);
+	SET_SENSITIVE("Menu/View/Goto/NextUnread", M_MSG_EXIST);
+	SET_SENSITIVE("Menu/View/Goto/PrevNew", M_MSG_EXIST);
+	SET_SENSITIVE("Menu/View/Goto/NextNew", M_MSG_EXIST);
+	SET_SENSITIVE("Menu/View/Goto/PrevMarked", M_MSG_EXIST);
+	SET_SENSITIVE("Menu/View/Goto/NextMarked", M_MSG_EXIST);
+	SET_SENSITIVE("Menu/View/Goto/PrevLabeled", M_MSG_EXIST);
+	SET_SENSITIVE("Menu/View/Goto/NextLabeled", M_MSG_EXIST);
+	SET_SENSITIVE("Menu/View/Goto/ParentMessage", M_SINGLE_TARGET_EXIST);
+	SET_SENSITIVE("Menu/View/Goto/NextPart", M_SINGLE_TARGET_EXIST);
+	SET_SENSITIVE("Menu/View/Goto/PrevPart", M_SINGLE_TARGET_EXIST);
+	SET_SENSITIVE("Menu/View/OpenNewWindow", M_SINGLE_TARGET_EXIST);
+	SET_SENSITIVE("Menu/View/MessageSource", M_SINGLE_TARGET_EXIST);
+	SET_SENSITIVE("Menu/View/Part", M_SINGLE_TARGET_EXIST);
+	SET_SENSITIVE("Menu/View/AllHeaders", M_SINGLE_TARGET_EXIST);
+	SET_SENSITIVE("Menu/View/Quotes", M_SINGLE_TARGET_EXIST);
+
+	SET_SENSITIVE("Menu/Message/Receive/CurrentAccount", M_HAVE_ACCOUNT, M_UNLOCKED, M_HAVE_RETRIEVABLE_ACCOUNT);
+	SET_SENSITIVE("Menu/Message/Receive/AllAccounts", M_HAVE_ACCOUNT, M_UNLOCKED, M_HAVE_ANY_RETRIEVABLE_ACCOUNT);
+	SET_SENSITIVE("Menu/Message/Receive/CancelReceiving", M_INC_ACTIVE);
+	SET_SENSITIVE("Menu/Message/SendQueue", M_HAVE_ACCOUNT, M_HAVE_QUEUED_MAILS);
+	SET_SENSITIVE("Menu/Message/CancelSending", M_SEND_ACTIVE);
+	SET_SENSITIVE("Menu/Message/ComposeEmail", M_HAVE_ACCOUNT);
+	SET_SENSITIVE("Menu/Message/ComposeNews", M_HAVE_NEWS_ACCOUNT);
+	SET_SENSITIVE("Menu/Message/Reply", M_HAVE_ACCOUNT, M_TARGET_EXIST, M_SUMMARY_ISLIST);
+	SET_SENSITIVE("Menu/Message/ReplyTo", M_HAVE_ACCOUNT, M_TARGET_EXIST, M_SUMMARY_ISLIST);
+	SET_SENSITIVE("Menu/Message/FollowupReply", M_HAVE_ACCOUNT, M_TARGET_EXIST, M_NEWS, M_SUMMARY_ISLIST);
+	SET_SENSITIVE("Menu/Message/Forward", M_HAVE_ACCOUNT, M_TARGET_EXIST, M_SUMMARY_ISLIST);
+	SET_SENSITIVE("Menu/Message/ForwardAtt", M_HAVE_ACCOUNT, M_TARGET_EXIST, M_SUMMARY_ISLIST);
+	SET_SENSITIVE("Menu/Message/Redirect", M_HAVE_ACCOUNT, M_TARGET_EXIST, M_SUMMARY_ISLIST);
+	SET_SENSITIVE("Menu/Message/Move", M_TARGET_EXIST, M_ALLOW_DELETE, M_NOT_NEWS);
+	SET_SENSITIVE("Menu/Message/Copy", M_TARGET_EXIST, M_EXEC);
+	SET_SENSITIVE("Menu/Message/Trash", M_TARGET_EXIST, M_ALLOW_DELETE, M_NOT_NEWS, M_NOT_TRASH);
+	SET_SENSITIVE("Menu/Message/Delete", M_TARGET_EXIST, M_ALLOW_DELETE);
+	SET_SENSITIVE("Menu/Message/TrashThread", M_TARGET_EXIST, M_SUMMARY_ISLIST);
+	SET_SENSITIVE("Menu/Message/DeleteThread", M_TARGET_EXIST, M_SUMMARY_ISLIST);
+	SET_SENSITIVE("Menu/Message/CancelNews", M_TARGET_EXIST, M_ALLOW_DELETE, M_NEWS);
+	SET_SENSITIVE("Menu/Message/Mark", M_TARGET_EXIST, M_SUMMARY_ISLIST);
+	SET_SENSITIVE("Menu/Message/Mark/MarkSpam", M_TARGET_EXIST, M_CAN_LEARN_SPAM);
+	SET_SENSITIVE("Menu/Message/Mark/MarkHam", M_TARGET_EXIST, M_CAN_LEARN_SPAM);
+	SET_SENSITIVE("Menu/Message/Mark/IgnoreThread", M_TARGET_EXIST);
+	SET_SENSITIVE("Menu/Message/Mark/UnignoreThread", M_TARGET_EXIST);
+	SET_SENSITIVE("Menu/Message/Mark/Lock", M_TARGET_EXIST);
+	SET_SENSITIVE("Menu/Message/Mark/Unlock", M_TARGET_EXIST);
+	SET_SENSITIVE("Menu/Message/ColorLabel", M_TARGET_EXIST);
+	SET_SENSITIVE("Menu/Message/Tags", M_TARGET_EXIST);
+	SET_SENSITIVE("Menu/Message/Reedit", M_HAVE_ACCOUNT, M_ALLOW_REEDIT);
+	SET_SENSITIVE("Menu/Message/CheckSignature", M_SINGLE_TARGET_EXIST);
+
+	SET_SENSITIVE("Menu/Tools/AddSenderToAB", M_SINGLE_TARGET_EXIST);
+	SET_SENSITIVE("Menu/Tools/CollectAddresses", M_FOLDER_SELECTED);
+	SET_SENSITIVE("Menu/Tools/CollectAddresses/FromFolder", M_FOLDER_SELECTED);
+	SET_SENSITIVE("Menu/Tools/CollectAddresses/FromSelected", M_TARGET_EXIST);
+	SET_SENSITIVE("Menu/Tools/FilterFolder", M_MSG_EXIST, M_EXEC);
+	SET_SENSITIVE("Menu/Tools/FilterSelected", M_TARGET_EXIST, M_EXEC);
+	SET_SENSITIVE("Menu/Tools/RunProcessing", M_HAVE_PROCESSING);
+	SET_SENSITIVE("Menu/Tools/CreateFilterRule", M_SINGLE_TARGET_EXIST, M_UNLOCKED);
+	SET_SENSITIVE("Menu/Tools/CreateProcessingRule", M_SINGLE_TARGET_EXIST, M_UNLOCKED);
+	SET_SENSITIVE("Menu/Tools/ListUrls", M_TARGET_EXIST);
+	SET_SENSITIVE("Menu/Tools/Actions", M_TARGET_EXIST, M_ACTIONS_EXIST);
+	SET_SENSITIVE("Menu/Tools/Execute", M_DELAY_EXEC);
+	SET_SENSITIVE("Menu/Tools/Expunge", M_DELETED_EXISTS);
+	SET_SENSITIVE("Menu/Tools/ForgetSessionPasswords", M_SESSION_PASSWORDS);
+#ifndef PASSWORD_CRYPTO_OLD
+	SET_SENSITIVE("Menu/Tools/ForgetMasterPassphrase", M_MASTER_PASSPHRASE);
+#endif
+	SET_SENSITIVE("Menu/Tools/DeleteDuplicates/SelFolder", M_MSG_EXIST, M_ALLOW_DELETE);
+
+	SET_SENSITIVE("Menu/Configuration", M_UNLOCKED);
+	SET_SENSITIVE("Menu/Configuration/ChangeAccount", M_HAVE_MULTI_ACCOUNT);
+	SET_SENSITIVE("Menu/Configuration/AccountPrefs", M_UNLOCKED);
+	SET_SENSITIVE("Menu/Configuration/CreateAccount", M_UNLOCKED);
+	SET_SENSITIVE("Menu/Configuration/EditAccounts", M_UNLOCKED);
+#undef SET_SENSITIVE
 
 	menu = gtk_menu_item_get_submenu(GTK_MENU_ITEM(
 		gtk_ui_manager_get_widget(mainwin->ui_manager, "/Menu/Message/Receive")));
diff --git a/src/summaryview.c b/src/summaryview.c
index 185ef5d6f..1157186b5 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -1801,97 +1801,77 @@ GSList *summary_get_selected_msg_list(SummaryView *summaryview)
 void summary_set_menu_sensitive(SummaryView *summaryview)
 {
 	SensitiveCondMask state;
-	gboolean sensitive;
-	gint i;
 
+	main_window_set_menu_sensitive(summaryview->mainwin);
+
+	state = main_window_get_current_state(summaryview->mainwin);
+
+#define SET_SENSITIVE(entry_str, ...) \
+{ \
+	SensitiveCondMask cond = main_window_get_mask(__VA_ARGS__, -1); \
+	cm_menu_set_sensitive_full(summaryview->mainwin->ui_manager, \
+			(const gchar *) entry_str, \
+			((cond & state) == cond)); \
+}
+	SET_SENSITIVE("Menus/SummaryViewPopup/Reedit", M_TARGET_EXIST, M_DRAFT);
+	SET_SENSITIVE("Menus/SummaryViewPopup/Reply", M_HAVE_ACCOUNT, M_TARGET_EXIST);
 #ifndef GENERIC_UMPC
-#define N_ENTRIES 40
-#else
-#define N_ENTRIES 29
-#endif
-	static struct {
-		const gchar *entry;
-		SensitiveCondMask cond;
-	} entry[N_ENTRIES];
-
-	i = 0;
-#define FILL_TABLE(entry_str, ...) \
-do { \
-	entry[i].entry = (const gchar *) entry_str; entry[i++].cond = main_window_get_mask(__VA_ARGS__, -1); \
-} while (0)
-
-	FILL_TABLE("Menus/SummaryViewPopup/Reedit", M_TARGET_EXIST, M_DRAFT);
-	FILL_TABLE("Menus/SummaryViewPopup/Reply", M_HAVE_ACCOUNT, M_TARGET_EXIST);
-#ifndef GENERIC_UMPC
-	FILL_TABLE("Menus/SummaryViewPopup/ReplyTo", M_HAVE_ACCOUNT, M_TARGET_EXIST);
-	FILL_TABLE("Menus/SummaryViewPopup/ReplyTo/All", M_HAVE_ACCOUNT, M_TARGET_EXIST);
-	FILL_TABLE("Menus/SummaryViewPopup/ReplyTo/Sender", M_HAVE_ACCOUNT, M_TARGET_EXIST);
-	FILL_TABLE("Menus/SummaryViewPopup/ReplyTo/MailingList", M_HAVE_ACCOUNT, M_TARGET_EXIST);
+	SET_SENSITIVE("Menus/SummaryViewPopup/ReplyTo", M_HAVE_ACCOUNT, M_TARGET_EXIST);
+	SET_SENSITIVE("Menus/SummaryViewPopup/ReplyTo/All", M_HAVE_ACCOUNT, M_TARGET_EXIST);
+	SET_SENSITIVE("Menus/SummaryViewPopup/ReplyTo/Sender", M_HAVE_ACCOUNT, M_TARGET_EXIST);
+	SET_SENSITIVE("Menus/SummaryViewPopup/ReplyTo/MailingList", M_HAVE_ACCOUNT, M_TARGET_EXIST);
 #endif
 
-	FILL_TABLE("Menus/SummaryViewPopup/Forward", M_HAVE_ACCOUNT, M_TARGET_EXIST);
+	SET_SENSITIVE("Menus/SummaryViewPopup/Forward", M_HAVE_ACCOUNT, M_TARGET_EXIST);
 #ifndef GENERIC_UMPC
-	FILL_TABLE("Menus/SummaryViewPopup/ForwardAtt", M_HAVE_ACCOUNT, M_TARGET_EXIST);
-	FILL_TABLE("Menus/SummaryViewPopup/Redirect", M_HAVE_ACCOUNT, M_TARGET_EXIST);
+	SET_SENSITIVE("Menus/SummaryViewPopup/ForwardAtt", M_HAVE_ACCOUNT, M_TARGET_EXIST);
+	SET_SENSITIVE("Menus/SummaryViewPopup/Redirect", M_HAVE_ACCOUNT, M_TARGET_EXIST);
 #endif
 
-	FILL_TABLE("Menus/SummaryViewPopup/Move", M_TARGET_EXIST, M_ALLOW_DELETE, M_NOT_NEWS);
-	FILL_TABLE("Menus/SummaryViewPopup/Copy", M_TARGET_EXIST, M_EXEC);
-	FILL_TABLE("Menus/SummaryViewPopup/Trash", M_TARGET_EXIST, M_ALLOW_DELETE, M_NOT_NEWS, M_NOT_TRASH);
+	SET_SENSITIVE("Menus/SummaryViewPopup/Move", M_TARGET_EXIST, M_ALLOW_DELETE, M_NOT_NEWS);
+	SET_SENSITIVE("Menus/SummaryViewPopup/Copy", M_TARGET_EXIST, M_EXEC);
+	SET_SENSITIVE("Menus/SummaryViewPopup/Trash", M_TARGET_EXIST, M_ALLOW_DELETE, M_NOT_NEWS, M_NOT_TRASH);
 #ifndef GENERIC_UMPC
-	FILL_TABLE("Menus/SummaryViewPopup/Delete", M_TARGET_EXIST, M_ALLOW_DELETE);
+	SET_SENSITIVE("Menus/SummaryViewPopup/Delete", M_TARGET_EXIST, M_ALLOW_DELETE);
 #endif
 
-	FILL_TABLE("Menus/SummaryViewPopup/Mark", M_TARGET_EXIST);
-	FILL_TABLE("Menus/SummaryViewPopup/Mark/Mark", M_TARGET_EXIST);
-	FILL_TABLE("Menus/SummaryViewPopup/Mark/Unmark", M_TARGET_EXIST);
-	FILL_TABLE("Menus/SummaryViewPopup/Mark/MarkRead", M_TARGET_EXIST);
-	FILL_TABLE("Menus/SummaryViewPopup/Mark/MarkUnread", M_TARGET_EXIST);
-	FILL_TABLE("Menus/SummaryViewPopup/Mark/MarkAllRead", M_TARGET_EXIST);
-	FILL_TABLE("Menus/SummaryViewPopup/Mark/MarkAllUnread", M_TARGET_EXIST);
-	FILL_TABLE("Menus/SummaryViewPopup/Mark/IgnoreThread", M_TARGET_EXIST);
-	FILL_TABLE("Menus/SummaryViewPopup/Mark/UnignoreThread", M_TARGET_EXIST);
-	FILL_TABLE("Menus/SummaryViewPopup/Mark/WatchThread", M_TARGET_EXIST);
-	FILL_TABLE("Menus/SummaryViewPopup/Mark/UnwatchThread", M_TARGET_EXIST);
-	FILL_TABLE("Menus/SummaryViewPopup/Mark/Lock", M_TARGET_EXIST);
-	FILL_TABLE("Menus/SummaryViewPopup/Mark/Unlock", M_TARGET_EXIST);
-	FILL_TABLE("Menus/SummaryViewPopup/Mark/MarkSpam", M_TARGET_EXIST, M_CAN_LEARN_SPAM);
-	FILL_TABLE("Menus/SummaryViewPopup/Mark/MarkHam", M_TARGET_EXIST, M_CAN_LEARN_SPAM);
-	FILL_TABLE("Menus/SummaryViewPopup/ColorLabel", M_TARGET_EXIST);
-	FILL_TABLE("Menus/SummaryViewPopup/Tags", M_TARGET_EXIST);
+	SET_SENSITIVE("Menus/SummaryViewPopup/Mark", M_TARGET_EXIST);
+	SET_SENSITIVE("Menus/SummaryViewPopup/Mark/Mark", M_TARGET_EXIST);
+	SET_SENSITIVE("Menus/SummaryViewPopup/Mark/Unmark", M_TARGET_EXIST);
+	SET_SENSITIVE("Menus/SummaryViewPopup/Mark/MarkRead", M_TARGET_EXIST);
+	SET_SENSITIVE("Menus/SummaryViewPopup/Mark/MarkUnread", M_TARGET_EXIST);
+	SET_SENSITIVE("Menus/SummaryViewPopup/Mark/MarkAllRead", M_TARGET_EXIST);
+	SET_SENSITIVE("Menus/SummaryViewPopup/Mark/MarkAllUnread", M_TARGET_EXIST);
+	SET_SENSITIVE("Menus/SummaryViewPopup/Mark/IgnoreThread", M_TARGET_EXIST);
+	SET_SENSITIVE("Menus/SummaryViewPopup/Mark/UnignoreThread", M_TARGET_EXIST);
+	SET_SENSITIVE("Menus/SummaryViewPopup/Mark/WatchThread", M_TARGET_EXIST);
+	SET_SENSITIVE("Menus/SummaryViewPopup/Mark/UnwatchThread", M_TARGET_EXIST);
+	SET_SENSITIVE("Menus/SummaryViewPopup/Mark/Lock", M_TARGET_EXIST);
+	SET_SENSITIVE("Menus/SummaryViewPopup/Mark/Unlock", M_TARGET_EXIST);
+	SET_SENSITIVE("Menus/SummaryViewPopup/Mark/MarkSpam", M_TARGET_EXIST, M_CAN_LEARN_SPAM);
+	SET_SENSITIVE("Menus/SummaryViewPopup/Mark/MarkHam", M_TARGET_EXIST, M_CAN_LEARN_SPAM);
+	SET_SENSITIVE("Menus/SummaryViewPopup/ColorLabel", M_TARGET_EXIST);
+	SET_SENSITIVE("Menus/SummaryViewPopup/Tags", M_TARGET_EXIST);
 
 #ifndef GENERIC_UMPC
-	FILL_TABLE("Menus/SummaryViewPopup/AddSenderToAB", M_SINGLE_TARGET_EXIST);
+	SET_SENSITIVE("Menus/SummaryViewPopup/AddSenderToAB", M_SINGLE_TARGET_EXIST);
 #endif
-	FILL_TABLE("Menus/SummaryViewPopup/CreateFilterRule", M_SINGLE_TARGET_EXIST, M_UNLOCKED);
+	SET_SENSITIVE("Menus/SummaryViewPopup/CreateFilterRule", M_SINGLE_TARGET_EXIST, M_UNLOCKED);
 #ifndef GENERIC_UMPC
-	FILL_TABLE("Menus/SummaryViewPopup/CreateProcessingRule", M_SINGLE_TARGET_EXIST, M_UNLOCKED);
+	SET_SENSITIVE("Menus/SummaryViewPopup/CreateProcessingRule", M_SINGLE_TARGET_EXIST, M_UNLOCKED);
 #endif
 
-	FILL_TABLE("Menus/SummaryViewPopup/View", M_SINGLE_TARGET_EXIST);
-	FILL_TABLE("Menus/SummaryViewPopup/View/OpenNewWindow", M_SINGLE_TARGET_EXIST);
-	FILL_TABLE("Menus/SummaryViewPopup/View/MessageSource", M_SINGLE_TARGET_EXIST);
+	SET_SENSITIVE("Menus/SummaryViewPopup/View", M_SINGLE_TARGET_EXIST);
+	SET_SENSITIVE("Menus/SummaryViewPopup/View/OpenNewWindow", M_SINGLE_TARGET_EXIST);
+	SET_SENSITIVE("Menus/SummaryViewPopup/View/MessageSource", M_SINGLE_TARGET_EXIST);
 #ifndef GENERIC_UMPC
-	FILL_TABLE("Menus/SummaryViewPopup/View/AllHeaders", M_SINGLE_TARGET_EXIST);
+	SET_SENSITIVE("Menus/SummaryViewPopup/View/AllHeaders", M_SINGLE_TARGET_EXIST);
 #endif
-	FILL_TABLE("Menus/SummaryViewPopup/SaveAs", M_TARGET_EXIST);
+	SET_SENSITIVE("Menus/SummaryViewPopup/SaveAs", M_TARGET_EXIST);
 #ifndef GENERIC_UMPC
-	FILL_TABLE("Menus/SummaryViewPopup/Print", M_TARGET_EXIST);
+	SET_SENSITIVE("Menus/SummaryViewPopup/Print", M_TARGET_EXIST);
 #endif
-	FILL_TABLE(NULL, -1);
-#undef FILL_TABLE
-	if (i != N_ENTRIES)
-		g_error("summaryview menu entry table size mismatch (%d/%d)", i, N_ENTRIES);
-#undef ENTRIES
-
-	main_window_set_menu_sensitive(summaryview->mainwin);
-
-	state = main_window_get_current_state(summaryview->mainwin);
-
-	for (i = 0; entry[i].entry != NULL; i++) {
-		sensitive = ((entry[i].cond & state) == entry[i].cond);
-		cm_menu_set_sensitive_full(summaryview->mainwin->ui_manager, entry[i].entry, sensitive);
-	}
+#undef SET_SENSITIVE
 
 	summary_lock(summaryview);
 #ifndef GENERIC_UMPC

commit 714ebee34cd950369f7f300090892447187817c8
Author: Paul <paul at claws-mail.org>
Date:   Tue Oct 1 17:22:11 2019 +0100

    add 'Re-edit' to the message context menu in the Drafts folder

diff --git a/src/gtk/menu.c b/src/gtk/menu.c
index beba6a62c..e5945945f 100644
--- a/src/gtk/menu.c
+++ b/src/gtk/menu.c
@@ -93,6 +93,10 @@ void cm_menu_set_sensitive_full(GtkUIManager *gui_manager, const gchar *menu, gb
 	}
 
 	gtk_widget_set_sensitive(widget, sensitive);
+
+	if (strcmp(menu, "Menus/SummaryViewPopup/Reedit") == 0)
+		(sensitive)? gtk_widget_show(widget) : gtk_widget_hide(widget);
+
 	g_free(path);
 }
 
diff --git a/src/mainwindow.c b/src/mainwindow.c
index a019dd726..d60ff637e 100644
--- a/src/mainwindow.c
+++ b/src/mainwindow.c
@@ -2999,6 +2999,10 @@ SensitiveCondMask main_window_get_current_state(MainWindow *mainwin)
 	    && mainwin->summaryview->folder_item->stype != F_DRAFT)
 		UPDATE_STATE(M_NOT_DRAFT);
 
+	if (mainwin->summaryview->folder_item &&
+	    mainwin->summaryview->folder_item->stype == F_DRAFT)
+		UPDATE_STATE(M_DRAFT);
+
 	if (prefs_common.actions_list && g_slist_length(prefs_common.actions_list))
 		UPDATE_STATE(M_ACTIONS_EXIST);
 
diff --git a/src/mainwindow.h b/src/mainwindow.h
index ce0b30cac..0d1ffb14a 100644
--- a/src/mainwindow.h
+++ b/src/mainwindow.h
@@ -70,6 +70,7 @@ typedef enum
 	M_HAVE_RETRIEVABLE_ACCOUNT,
 	M_HAVE_ANY_RETRIEVABLE_ACCOUNT,
 	M_NOT_DRAFT,
+	M_DRAFT,
 
 /* reserved */
     M_MAX_RESERVED
diff --git a/src/summaryview.c b/src/summaryview.c
index af10a86f6..185ef5d6f 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -415,12 +415,14 @@ GtkTargetEntry summary_drag_types[3] =
 	{"claws-mail/msg-path-list", 0, TARGET_MAIL_CM_PATH_LIST},
 };
 
+static void summary_reedit_cb(GtkAction *gaction, gpointer data);
 static void summary_reply_cb(GtkAction *gaction, gpointer data);
 
 /* Only submenus and specifically-handled menu entries here */
 static GtkActionEntry summary_popup_entries[] =
 {
 	{"SummaryViewPopup",                      NULL, "SummaryViewPopup", NULL, NULL, NULL },
+	{"SummaryViewPopup/Reedit",               NULL, N_("Re-edit"), NULL, NULL, G_CALLBACK(summary_reedit_cb) },
 	{"SummaryViewPopup/Reply",                NULL, N_("_Reply"), NULL, NULL, G_CALLBACK(summary_reply_cb) }, /* COMPOSE_REPLY */
 	{"SummaryViewPopup/ReplyTo",              NULL, N_("Repl_y to"), NULL, NULL, NULL },
 	{"SummaryViewPopup/ReplyTo/All",          NULL, N_("_All"), NULL, NULL, G_CALLBACK(summary_reply_cb) }, /* COMPOSE_REPLY_TO_ALL */
@@ -702,6 +704,7 @@ SummaryView *summary_create(MainWindow *mainwin)
 			G_N_ELEMENTS(summary_popup_entries), (gpointer)summaryview);
 
 	MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menus", "SummaryViewPopup", "SummaryViewPopup", GTK_UI_MANAGER_MENU)
+	MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menus/SummaryViewPopup", "Reedit", "SummaryViewPopup/Reedit", GTK_UI_MANAGER_MENUITEM)
 	MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menus/SummaryViewPopup", "Reply", "SummaryViewPopup/Reply", GTK_UI_MANAGER_MENUITEM)
 #ifndef GENERIC_UMPC
 	MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menus/SummaryViewPopup", "ReplyTo", "SummaryViewPopup/ReplyTo", GTK_UI_MANAGER_MENU)
@@ -1802,9 +1805,9 @@ void summary_set_menu_sensitive(SummaryView *summaryview)
 	gint i;
 
 #ifndef GENERIC_UMPC
-#define N_ENTRIES 39
+#define N_ENTRIES 40
 #else
-#define N_ENTRIES 28
+#define N_ENTRIES 29
 #endif
 	static struct {
 		const gchar *entry;
@@ -1817,6 +1820,7 @@ do { \
 	entry[i].entry = (const gchar *) entry_str; entry[i++].cond = main_window_get_mask(__VA_ARGS__, -1); \
 } while (0)
 
+	FILL_TABLE("Menus/SummaryViewPopup/Reedit", M_TARGET_EXIST, M_DRAFT);
 	FILL_TABLE("Menus/SummaryViewPopup/Reply", M_HAVE_ACCOUNT, M_TARGET_EXIST);
 #ifndef GENERIC_UMPC
 	FILL_TABLE("Menus/SummaryViewPopup/ReplyTo", M_HAVE_ACCOUNT, M_TARGET_EXIST);
@@ -8490,6 +8494,12 @@ void summaryview_unlock(SummaryView *summaryview, FolderItem *item)
 	gtk_widget_set_sensitive(summaryview->ctree, TRUE);
 }
 
+static void summary_reedit_cb(GtkAction *gaction, gpointer data)
+{
+	SummaryView *summaryview = (SummaryView *)data;
+	summary_reedit(summaryview);
+}
+
 #define DO_ACTION(name, act)	{ if (!strcmp(a_name, name)) action = act; }
 static void summary_reply_cb(GtkAction *gaction, gpointer data)
 {

commit 60c48df1ffb38fed0c2ebcc31c00abd097e50ecd
Author: Paul <paul at claws-mail.org>
Date:   Tue Oct 1 17:19:41 2019 +0100

    add UI for diff colours

diff --git a/src/prefs_msg_colors.c b/src/prefs_msg_colors.c
index cae08f342..5191ddadc 100644
--- a/src/prefs_msg_colors.c
+++ b/src/prefs_msg_colors.c
@@ -331,6 +331,37 @@ static void prefs_msg_colors_create_widget(PrefsPage *_page, GtkWindow *window,
 	COLOR_LABEL_PACK_START(hbox, COL_NEW,
 			       _("Folder containing new messages"));
 
+	vbox2 = gtkut_get_options_frame(vbox1, &frame_folder, _("Patch messages/attachments"));
+
+	hbox = gtk_hbox_new(FALSE, VBOX_BORDER);
+	gtk_widget_show (hbox);
+	gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, TRUE, 0);
+
+	COLOR_BUTTON_PACK_START(hbox, COL_DIFF_ADDED,
+				C_("Tooltip", "Pick color for inserted lines"));
+
+	COLOR_LABEL_PACK_START(hbox, COL_DIFF_ADDED, _("Inserted lines"));
+
+	hbox = gtk_hbox_new(FALSE, VBOX_BORDER);
+	gtk_widget_show (hbox);
+	gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
+
+	COLOR_BUTTON_PACK_START(hbox, COL_DIFF_DELETED,
+				C_("Tooltip", "Pick color for removed lines"));
+
+	COLOR_LABEL_PACK_START(hbox, COL_DIFF_DELETED,
+			       _("Removed lines"));
+
+	hbox = gtk_hbox_new(FALSE, VBOX_BORDER);
+	gtk_widget_show (hbox);
+	gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
+
+	COLOR_BUTTON_PACK_START(hbox, COL_DIFF_HUNK,
+				C_("Tooltip", "Pick color for hunk lines"));
+
+	COLOR_LABEL_PACK_START(hbox, COL_DIFF_HUNK,
+			       _("Hunk lines"));
+
 	/* custom colors */
 	vbox_custom_colors = gtk_vbox_new (FALSE, VSPACING_NARROW);
 	gtk_widget_show (vbox_custom_colors);
@@ -504,6 +535,12 @@ static void initialize_color_dialog_title()
 		C_("Dialog title", "Pick color for signatures");
 	color_dialog_title[COL_NEW] =
 		C_("Dialog title", "Pick color for folder");
+	color_dialog_title[COL_DIFF_ADDED] =
+		C_("Dialog title", "Pick color for inserted lines");
+	color_dialog_title[COL_DIFF_DELETED] =
+		C_("Dialog title", "Pick color for removed lines");
+	color_dialog_title[COL_DIFF_HUNK] =
+		C_("Dialog title", "Pick color for hunk lines");
 
 	color_dialog_title_init = TRUE;
 }

commit db38901ce27ee994e64b7baf98d9120e8d834c78
Author: Paul <paul at claws-mail.org>
Date:   Fri Sep 27 12:14:58 2019 +0100

    fixes to last 2 commits

diff --git a/src/gtk/authors.h b/src/gtk/authors.h
index acc4acad5..2ba1f57f8 100644
--- a/src/gtk/authors.h
+++ b/src/gtk/authors.h
@@ -195,6 +195,7 @@ static char *CONTRIBS_LIST[] = {
 "kazken3",
 "WAKAI Kazunao",
 "Fabian Keil",
+"Jakub Kiciński",
 "Martin Kluge",
 "IWAMOTO Kouichi",
 "Mikhail Kurinnoi",
@@ -207,7 +208,6 @@ static char *CONTRIBS_LIST[] = {
 "Thomas Link",
 "Reed Loden",
 "David Looney",
-"Jakub Kiciński",
 "Alessandro Maestri",
 "Maki",
 "Jindrich Makovicka",
diff --git a/src/textview.c b/src/textview.c
index 2e4b52c04..0b77404af 100644
--- a/src/textview.c
+++ b/src/textview.c
@@ -1586,7 +1586,7 @@ static void textview_write_line(TextView *textview, const gchar *str,
 				 strstr(&buf[3], " @@"))
 				fg_color = "diff-hunk";
 
-			if (account_signatures_matchlist_nchar_found(buf, "%s\n")
+			if (account_sigsep_matchlist_nchar_found(buf, "%s\n")) {
 				textview->is_in_git_patch = FALSE;
 				textview->is_in_signature = TRUE;
 				fg_color = "signature";

commit 46e97eac34b82e336d184bd081ccb473b663cb83
Author: wwp <subscript at free.fr>
Date:   Fri Sep 27 12:45:33 2019 +0200

    Complete the contributors list in AUTHORS and sort the contributors
    list in src/gtk/authors.h.

diff --git a/AUTHORS b/AUTHORS
index e530d7519..f132ad487 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -328,3 +328,5 @@ contributors (in addition to the above; based on Changelog)
 	Alex Smith
 	Florian Weimer
 	Alexander Lyons Harkness
+	Jakub Kiciński
+
diff --git a/src/gtk/authors.h b/src/gtk/authors.h
index 6c21c31bb..acc4acad5 100644
--- a/src/gtk/authors.h
+++ b/src/gtk/authors.h
@@ -207,6 +207,7 @@ static char *CONTRIBS_LIST[] = {
 "Thomas Link",
 "Reed Loden",
 "David Looney",
+"Jakub Kiciński",
 "Alessandro Maestri",
 "Maki",
 "Jindrich Makovicka",
@@ -328,6 +329,5 @@ static char *CONTRIBS_LIST[] = {
 "Gál Zoltán",
 "Marien Zwart",
 "Martin Zwickel",
-"Jakub Kiciński",
 NULL
 };

commit fafd8ff38834edb111b745f70af4c5a95fa80328
Author: wwp <subscript at free.fr>
Date:   Fri Sep 27 12:09:22 2019 +0200

    Syntax highlight improvements, patches by Jakub Kicinski (slightly
    adapted to make use of the account_sigsep_matchlist API):
    - when '-p' option is used ' @@' can be followed by function name.
    - detect git patch in body part.
    Added new contributor to authors list.
    Fix bug 4130.

diff --git a/src/gtk/authors.h b/src/gtk/authors.h
index 310d9fdf4..6c21c31bb 100644
--- a/src/gtk/authors.h
+++ b/src/gtk/authors.h
@@ -328,5 +328,6 @@ static char *CONTRIBS_LIST[] = {
 "Gál Zoltán",
 "Marien Zwart",
 "Martin Zwickel",
+"Jakub Kiciński",
 NULL
 };
diff --git a/src/textview.c b/src/textview.c
index d604dc04e..2e4b52c04 100644
--- a/src/textview.c
+++ b/src/textview.c
@@ -999,6 +999,7 @@ static void textview_write_body(TextView *textview, MimeInfo *mimeinfo)
 	textview->is_in_signature = FALSE;
 	textview->is_diff = FALSE;
 	textview->is_attachment = FALSE;;
+	textview->is_in_git_patch = FALSE;
 
 	procmime_decode_content(mimeinfo);
 
@@ -1572,7 +1573,7 @@ static void textview_write_line(TextView *textview, const gchar *str,
 	}
 
 	if (prefs_common.enable_color) {
-		if (textview->is_diff) {
+		if (textview->is_diff || textview->is_in_git_patch) {
 			if (strncmp(buf, "+++ ", 4) == 0)
 				fg_color = "diff-add-file";
 			else if (buf[0] == '+')
@@ -1582,13 +1583,21 @@ static void textview_write_line(TextView *textview, const gchar *str,
 			else if (buf[0] == '-')
 				fg_color = "diff-del";
 			else if (strncmp(buf, "@@ ", 3) == 0 &&
-					strcmp(buf+strlen(buf)-4, " @@\n") == 0)
+				 strstr(&buf[3], " @@"))
 				fg_color = "diff-hunk";
-		} else if (account_sigsep_matchlist_str_found(buf,"%s\n")
+
+			if (account_signatures_matchlist_nchar_found(buf, "%s\n")
+				textview->is_in_git_patch = FALSE;
+				textview->is_in_signature = TRUE;
+				fg_color = "signature";
+			}
+		} else if (account_sigsep_matchlist_str_found(buf, "%s\n")
 				|| account_sigsep_matchlist_str_found(buf, "- %s\n")
 				|| textview->is_in_signature) {
 			fg_color = "signature";
 			textview->is_in_signature = TRUE;
+		} else if (strncmp(buf, "diff --git ", 11) == 0) {
+			textview->is_in_git_patch = TRUE;
 		}
 	}
 
diff --git a/src/textview.h b/src/textview.h
index 35393a28b..71fc91422 100644
--- a/src/textview.h
+++ b/src/textview.h
@@ -67,7 +67,8 @@ struct _TextView
 	gboolean is_in_signature;
 	gboolean is_diff;
 	gboolean is_attachment;
-	
+	gboolean is_in_git_patch;
+
 	GSList *uri_list;
 	gint body_pos;
 

commit 019648163c7eb418488a35ec9d8e67b2f7755ee4
Author: wwp <subscript at free.fr>
Date:   Fri Sep 27 11:49:32 2019 +0200

    Rename badly named signatures separators matching API members
    (account_signatures_* -> account_sigsep_*).

diff --git a/src/account.c b/src/account.c
index 1ffe46495..d3d7d8241 100644
--- a/src/account.c
+++ b/src/account.c
@@ -1931,50 +1931,50 @@ gboolean password_get(const gchar *user,
 	return FALSE;
 }
 
-static GSList *account_signatures_list = NULL;
+static GSList *account_sigsep_list = NULL;
 
 /* create a list of unique signatures from accounts list */
-void account_signatures_matchlist_create(void)
+void account_sigsep_matchlist_create(void)
 {
 	GList *cur_ac = NULL;
 	PrefsAccount *ac_prefs = NULL;
 
-	if (account_signatures_list)
+	if (account_sigsep_list)
 		return;
 
-	account_signatures_list = g_slist_prepend(account_signatures_list, g_strdup("-- "));
+	account_sigsep_list = g_slist_prepend(account_sigsep_list, g_strdup("-- "));
 	for (cur_ac = account_get_list();
 		 cur_ac != NULL;
 		 cur_ac = g_list_next(cur_ac)) {
 		ac_prefs = (PrefsAccount *)cur_ac->data;
 
 		if (ac_prefs->sig_sep && *ac_prefs->sig_sep != '\0') {
-			if (!g_slist_find_custom(account_signatures_list, ac_prefs->sig_sep,
+			if (!g_slist_find_custom(account_sigsep_list, ac_prefs->sig_sep,
 					(GCompareFunc)g_strcmp0)) {
-				account_signatures_list = g_slist_prepend(account_signatures_list,
+				account_sigsep_list = g_slist_prepend(account_sigsep_list,
 						g_strdup(ac_prefs->sig_sep));
 			}
 		}
 	}
 }
 
-/* delete the list of signatures created by account_signatures_matchlist_create() */
-void account_signatures_matchlist_delete(void)
+/* delete the list of signatures created by account_sigsep_matchlist_create() */
+void account_sigsep_matchlist_delete(void)
 {
-	if (account_signatures_list) {
-		slist_free_strings_full(account_signatures_list);
-		account_signatures_list = NULL;
+	if (account_sigsep_list) {
+		slist_free_strings_full(account_sigsep_list);
+		account_sigsep_list = NULL;
 	}
 }
 
 /* match a string against all signatures in list, using the specified format */
-gboolean account_signatures_matchlist_str_found(const gchar *str, const gchar *format)
+gboolean account_sigsep_matchlist_str_found(const gchar *str, const gchar *format)
 {
 	gchar *tmp = NULL;
 	gboolean found = FALSE;
 	GSList *item;
 
-	for (item = account_signatures_list;
+	for (item = account_sigsep_list;
 		 item != NULL && !found;
 		 item = g_slist_next(item)) {
 		tmp = g_strdup_printf(format, (gchar *)item->data);
@@ -1982,7 +1982,7 @@ gboolean account_signatures_matchlist_str_found(const gchar *str, const gchar *f
 			found = (strcmp(tmp, str) == 0);
 			g_free(tmp);
 		} else {
-			g_warning("account_signatures_matchlist_str_found: g_strdup_printf failed, check format '%s'",
+			g_warning("account_sigsep_matchlist_str_found: g_strdup_printf failed, check format '%s'",
 				format);
 			return FALSE;
 		}
@@ -1991,14 +1991,14 @@ gboolean account_signatures_matchlist_str_found(const gchar *str, const gchar *f
 }
 
 /* match M first char of a string against all signatures in list, using the specified format */
-gboolean account_signatures_matchlist_nchar_found(const gchar *str, const gchar *format)
+gboolean account_sigsep_matchlist_nchar_found(const gchar *str, const gchar *format)
 {
 	gchar *tmp = NULL;
 	gboolean found = FALSE;
 	GSList *item;
 	gint len;
 
-	for (item = account_signatures_list;
+	for (item = account_sigsep_list;
 		 item != NULL && !found;
 		 item = g_slist_next(item)) {
 		tmp = g_strdup_printf(format, (gchar *)item->data);
@@ -2007,7 +2007,7 @@ gboolean account_signatures_matchlist_nchar_found(const gchar *str, const gchar
 			found = (strncmp(tmp, str, len) == 0);
 			g_free(tmp);
 		} else {
-			g_warning("account_signatures_matchlist_nchar_found: g_strdup_printf failed, check format '%s'",
+			g_warning("account_sigsep_matchlist_nchar_found: g_strdup_printf failed, check format '%s'",
 				format);
 			return FALSE;
 		}
diff --git a/src/account.h b/src/account.h
index 6d9319a3a..3c25dd04b 100644
--- a/src/account.h
+++ b/src/account.h
@@ -81,9 +81,9 @@ gboolean      password_get(const gchar *user,
 			   guint16 port,
 			   gchar **password);
 
-void		  account_signatures_matchlist_create		(void);
-void		  account_signatures_matchlist_delete		(void);
-gboolean	  account_signatures_matchlist_str_found	(const gchar *str, const gchar *format);
-gboolean	  account_signatures_matchlist_nchar_found	(const gchar *str, const gchar *format);
+void		  account_sigsep_matchlist_create	  (void);
+void		  account_sigsep_matchlist_delete	  (void);
+gboolean	  account_sigsep_matchlist_str_found  (const gchar *str, const gchar *format);
+gboolean	  account_sigsep_matchlist_nchar_found    (const gchar *str, const gchar *format);
 
 #endif /* __ACCOUNT_H__ */
diff --git a/src/procmime.c b/src/procmime.c
index 54b023d8d..616072432 100644
--- a/src/procmime.c
+++ b/src/procmime.c
@@ -262,7 +262,7 @@ const gchar *procmime_mimeinfo_get_parameter(MimeInfo *mimeinfo, const gchar *na
 		gint llen = 0;							\
 		strretchomp(lastline);						\
 		llen = strlen(lastline);					\
-		if (lastline[llen-1] == ' ' && !account_signatures_matchlist_str_found(lastline, "%s") &&	\
+		if (lastline[llen-1] == ' ' && !account_sigsep_matchlist_str_found(lastline, "%s") &&	\
 		    !(llen == 2 && lastline[1] == ' ' && strchr(prefs_common.quote_chars, lastline[0]))) {					\
 			/* this is flowed */					\
 			if (delsp)						\
@@ -348,7 +348,7 @@ gboolean procmime_decode_content(MimeInfo *mimeinfo)
 	tmp_file = TRUE;
 	readend = mimeinfo->offset + mimeinfo->length;
 
-	account_signatures_matchlist_create(); /* FLUSH_LASTLINE will use it */
+	account_sigsep_matchlist_create(); /* FLUSH_LASTLINE will use it */
 
 	*buf = '\0';
 	if (encoding == ENC_QUOTED_PRINTABLE) {
@@ -472,7 +472,7 @@ gboolean procmime_decode_content(MimeInfo *mimeinfo)
 	claws_fclose(outfp);
 	claws_fclose(infp);
 
-	account_signatures_matchlist_delete();
+	account_sigsep_matchlist_delete();
 
 	if (err == TRUE) {
 		return FALSE;
diff --git a/src/quote_fmt_parse.y b/src/quote_fmt_parse.y
index 7e29f34ad..663a9ed6b 100644
--- a/src/quote_fmt_parse.y
+++ b/src/quote_fmt_parse.y
@@ -488,11 +488,11 @@ static void quote_fmt_show_msg(MsgInfo *msginfo, const gchar *body,
 	if (fp == NULL)
 		g_warning("Can't get text part");
 	else {
-		account_signatures_matchlist_create();
+		account_sigsep_matchlist_create();
 		while (fgets(buf, sizeof(buf), fp) != NULL) {
 			strcrchomp(buf);
 
-			if (!signature && account_signatures_matchlist_nchar_found(buf, "%s\n"))
+			if (!signature && account_sigsep_matchlist_nchar_found(buf, "%s\n"))
 				break;
 		
 			if (quoted && quote_str)
@@ -500,7 +500,7 @@ static void quote_fmt_show_msg(MsgInfo *msginfo, const gchar *body,
 			
 			INSERT(buf);
 		}
-		account_signatures_matchlist_delete();
+		account_sigsep_matchlist_delete();
 		fclose(fp);
 	}
 }
diff --git a/src/textview.c b/src/textview.c
index d07f80ca1..d604dc04e 100644
--- a/src/textview.c
+++ b/src/textview.c
@@ -1002,7 +1002,7 @@ static void textview_write_body(TextView *textview, MimeInfo *mimeinfo)
 
 	procmime_decode_content(mimeinfo);
 
-	account_signatures_matchlist_create();
+	account_sigsep_matchlist_create();
 
 	if (!g_ascii_strcasecmp(mimeinfo->subtype, "html") &&
 	    prefs_common.render_html) {
@@ -1085,7 +1085,7 @@ static void textview_write_body(TextView *textview, MimeInfo *mimeinfo)
 				claws_fclose(tmpfp);
 				waitpid(pid, pfd, 0);
 				g_unlink(fname);
-				account_signatures_matchlist_delete();
+				account_sigsep_matchlist_delete();
 				return;
 			}
 		}
@@ -1115,13 +1115,13 @@ textview_default:
 			tmpfp = claws_fopen(mimeinfo->data.filename, "rb");
 		if (!tmpfp) {
 			FILE_OP_ERROR(mimeinfo->data.filename, "claws_fopen");
-			account_signatures_matchlist_delete();
+			account_sigsep_matchlist_delete();
 			return;
 		}
 		if (fseek(tmpfp, mimeinfo->offset, SEEK_SET) < 0) {
 			FILE_OP_ERROR(mimeinfo->data.filename, "fseek");
 			claws_fclose(tmpfp);
-			account_signatures_matchlist_delete();
+			account_sigsep_matchlist_delete();
 			return;
 		}
 		debug_print("Viewing text content of type: %s (length: %d)\n", mimeinfo->subtype, mimeinfo->length);
@@ -1131,7 +1131,7 @@ textview_default:
 			textview_write_line(textview, buf, conv, TRUE);
 			if (textview->stop_loading) {
 				claws_fclose(tmpfp);
-				account_signatures_matchlist_delete();
+				account_sigsep_matchlist_delete();
 				return;
 			}
 			wrote += ftell(tmpfp)-i;
@@ -1144,7 +1144,7 @@ textview_default:
 		claws_fclose(tmpfp);
 	}
 
-	account_signatures_matchlist_delete();
+	account_sigsep_matchlist_delete();
 
 	conv_code_converter_destroy(conv);
 	procmime_force_encoding(0);
@@ -1182,7 +1182,7 @@ static void textview_show_html(TextView *textview, FILE *fp,
 	parser = sc_html_parser_new(fp, conv);
 	cm_return_if_fail(parser != NULL);
 
-	account_signatures_matchlist_create();
+	account_sigsep_matchlist_create();
 
 	while ((str = sc_html_parse(parser)) != NULL) {
 	        if (parser->state == SC_HTML_HREF) {
@@ -1208,13 +1208,13 @@ static void textview_show_html(TextView *textview, FILE *fp,
 		if (lines % 500 == 0)
 			GTK_EVENTS_FLUSH();
 		if (textview->stop_loading) {
-			account_signatures_matchlist_delete();
+			account_sigsep_matchlist_delete();
 			return;
 		}
 	}
 	textview_write_line(textview, "\n", NULL, FALSE);
 
-	account_signatures_matchlist_delete();
+	account_sigsep_matchlist_delete();
 
 	sc_html_parser_destroy(parser);
 }
@@ -1229,7 +1229,7 @@ static void textview_show_ertf(TextView *textview, FILE *fp,
 	parser = ertf_parser_new(fp, conv);
 	cm_return_if_fail(parser != NULL);
 
-	account_signatures_matchlist_create();
+	account_sigsep_matchlist_create();
 
 	while ((str = ertf_parse(parser)) != NULL) {
 		textview_write_line(textview, str, NULL, FALSE);
@@ -1237,12 +1237,12 @@ static void textview_show_ertf(TextView *textview, FILE *fp,
 		if (lines % 500 == 0)
 			GTK_EVENTS_FLUSH();
 		if (textview->stop_loading) {
-			account_signatures_matchlist_delete();
+			account_sigsep_matchlist_delete();
 			return;
 		}
 	}
 	
-	account_signatures_matchlist_delete();
+	account_sigsep_matchlist_delete();
 
 	ertf_parser_destroy(parser);
 }
@@ -1584,8 +1584,8 @@ static void textview_write_line(TextView *textview, const gchar *str,
 			else if (strncmp(buf, "@@ ", 3) == 0 &&
 					strcmp(buf+strlen(buf)-4, " @@\n") == 0)
 				fg_color = "diff-hunk";
-		} else if (account_signatures_matchlist_str_found(buf,"%s\n")
-				|| account_signatures_matchlist_str_found(buf, "- %s\n")
+		} else if (account_sigsep_matchlist_str_found(buf,"%s\n")
+				|| account_sigsep_matchlist_str_found(buf, "- %s\n")
 				|| textview->is_in_signature) {
 			fg_color = "signature";
 			textview->is_in_signature = TRUE;

commit e85b2da5b040049c844b0998b76144781a05c7d0
Author: Paul <paul at claws-mail.org>
Date:   Wed Sep 25 08:31:55 2019 +0100

    fix crash caused by incomplete commit 47e9a6a807ab30baae05f4557f82d63c70108a59

diff --git a/src/summaryview.c b/src/summaryview.c
index 5bedb9c23..af10a86f6 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -3400,7 +3400,7 @@ static inline void summary_set_header(SummaryView *summaryview, gchar *text[],
 	static gchar date_modified[80];
 	static gchar col_score[11];
 	static gchar from_buf[BUFFSIZE], to_buf[BUFFSIZE];
-	static gchar tmp1[BUFFSIZE], tmp2[BUFFSIZE], tmp3[BUFFSIZE];
+	static gchar tmp1[BUFFSIZE], tmp2[BUFFSIZE+4], tmp3[BUFFSIZE];
 	gint *col_pos = summaryview->col_pos;
 	gchar *from_text = NULL, *to_text = NULL, *tags_text = NULL;
 	gboolean should_swap = FALSE;

commit e70e3cde6ffbbbcda7fc4a5cd355484aec6346e8
Author: Paul <paul at claws-mail.org>
Date:   Tue Sep 24 17:06:58 2019 +0100

    fix bug 4253, 'Claws metadata included in MBOX exports'

diff --git a/src/compose.c b/src/compose.c
index f070ead29..5640b7d36 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -2896,7 +2896,7 @@ static gint compose_parse_header(Compose *compose, MsgInfo *msginfo)
 
 	cm_return_val_if_fail(msginfo != NULL, -1);
 
-	if ((fp = procmsg_open_message(msginfo)) == NULL) return -1;
+	if ((fp = procmsg_open_message(msginfo, FALSE)) == NULL) return -1;
 	procheader_get_header_fields(fp, hentry);
 	claws_fclose(fp);
 
@@ -3021,7 +3021,7 @@ static gint compose_parse_manual_headers(Compose *compose, MsgInfo *msginfo, Hea
 
 	cm_return_val_if_fail(msginfo != NULL, -1);
 
-	if ((fp = procmsg_open_message(msginfo)) == NULL) return -1;
+	if ((fp = procmsg_open_message(msginfo, FALSE)) == NULL) return -1;
 	procheader_get_header_fields(fp, entries);
 	claws_fclose(fp);
 
diff --git a/src/mbox.c b/src/mbox.c
index 6375615a6..26fece154 100644
--- a/src/mbox.c
+++ b/src/mbox.c
@@ -568,7 +568,7 @@ gint export_list_to_mbox(GSList *mlist, const gchar *mbox)
 		gchar buft[BUFFSIZE];
 		msginfo = (MsgInfo *)cur->data;
 
-		msg_fp = procmsg_open_message(msginfo);
+		msg_fp = procmsg_open_message(msginfo, TRUE);
 		if (!msg_fp) {
 			continue;
 		}
diff --git a/src/plugins/spamassassin/spamassassin.c b/src/plugins/spamassassin/spamassassin.c
index e5a39b2e5..1c0cf4a42 100644
--- a/src/plugins/spamassassin/spamassassin.c
+++ b/src/plugins/spamassassin/spamassassin.c
@@ -228,7 +228,7 @@ static gboolean mail_filtering_hook(gpointer source, gpointer data)
 	if (message_callback != NULL)
 		message_callback(_("SpamAssassin: filtering message..."));
 
-	if ((fp = procmsg_open_message(msginfo)) == NULL) {
+	if ((fp = procmsg_open_message(msginfo, FALSE)) == NULL) {
 		debug_print("failed to open message file\n");
 		return FALSE;
 	}
diff --git a/src/procmsg.c b/src/procmsg.c
index 62f608346..fee027da9 100644
--- a/src/procmsg.c
+++ b/src/procmsg.c
@@ -479,7 +479,7 @@ void procmsg_message_file_list_free(MsgInfoList *file_list)
 	g_slist_free(file_list);
 }
 
-FILE *procmsg_open_message(MsgInfo *msginfo)
+FILE *procmsg_open_message(MsgInfo *msginfo, gboolean skip_special_headers)
 {
 	FILE *fp;
 	gchar *file;
@@ -504,7 +504,8 @@ FILE *procmsg_open_message(MsgInfo *msginfo)
 
 	g_free(file);
 
-	if (MSG_IS_QUEUED(msginfo->flags) || MSG_IS_DRAFT(msginfo->flags)) {
+	if (MSG_IS_QUEUED(msginfo->flags) || MSG_IS_DRAFT(msginfo->flags) ||
+	    skip_special_headers == TRUE) {
 		gchar buf[BUFFSIZE];
 
 		while (claws_fgets(buf, sizeof(buf), fp) != NULL) {
@@ -578,7 +579,7 @@ void procmsg_get_filter_keyword(MsgInfo *msginfo, gchar **header, gchar **key,
 	case FILTER_BY_NONE:
 		return;
 	case FILTER_BY_AUTO:
-		if ((fp = procmsg_open_message(msginfo)) == NULL)
+		if ((fp = procmsg_open_message(msginfo, FALSE)) == NULL)
 			return;
 		procheader_get_header_fields(fp, hentry);
 		claws_fclose(fp);
diff --git a/src/procmsg.h b/src/procmsg.h
index 1dda93dd8..66cccb58e 100644
--- a/src/procmsg.h
+++ b/src/procmsg.h
@@ -316,7 +316,8 @@ gchar  *procmsg_get_message_file_full	(MsgInfo	*msginfo,
 					 gboolean	 get_body);
 GSList *procmsg_get_message_file_list	(MsgInfoList	*mlist);
 void	procmsg_message_file_list_free	(MsgInfoList	*file_list);
-FILE   *procmsg_open_message		(MsgInfo	*msginfo);
+FILE   *procmsg_open_message		(MsgInfo	*msginfo,
+					 gboolean	skip_special_headers);
 gboolean procmsg_msg_exist		(MsgInfo	*msginfo);
 
 void	procmsg_get_filter_keyword	(MsgInfo	  *msginfo,

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list