[Commits] [SCM] claws branch, master, updated. 3.16.0-57-ga99a6bc

wwp at claws-mail.org wwp at claws-mail.org
Fri Feb 9 22:38:09 CET 2018


The branch, master has been updated
       via  a99a6bc52c2006c6910e2fb472c3cac2e714586b (commit)
      from  5e764f0ee0da00251920c37b9c16bd4d339b38ff (commit)

Summary of changes:
 src/compose.c       |   19 ++++---------------
 src/prefs_actions.c |    2 +-
 2 files changed, 5 insertions(+), 16 deletions(-)


- Log -----------------------------------------------------------------
commit a99a6bc52c2006c6910e2fb472c3cac2e714586b
Author: wwp <wwp at free.fr>
Date:   Fri Feb 9 22:36:41 2018 +0100

    Update few occurrences to the new alertpanel() API (and by the way,
    solve a leaking button_label strinc allocation).

diff --git a/src/compose.c b/src/compose.c
index 0c96739..6508ebf 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -5136,22 +5136,16 @@ static gboolean compose_check_entries(Compose *compose, gboolean check_everythin
 		if (*str == '\0' && check_everything == TRUE &&
 		    compose->mode != COMPOSE_REDIRECT) {
 			AlertValue aval;
-			gchar *button_label;
 			gchar *message;
 
-			if (compose->sending)
-				button_label = g_strconcat("+", _("_Send"), NULL);
-			else
-				button_label = g_strconcat("+", _("_Queue"), NULL);
 			message = g_strdup_printf(_("Subject is empty. %s"),
 					compose->sending?_("Send it anyway?"):
 					_("Queue it anyway?"));
 
 			aval = alertpanel_full(compose->sending?_("Send"):_("Send later"), message,
-					       GTK_STOCK_CANCEL, button_label, NULL, ALERTFOCUS_FIRST,
-								 TRUE, NULL, ALERT_QUESTION);
+					       GTK_STOCK_CANCEL, compose->sending?_("_Send"):_("_Queue"), NULL,
+					       ALERTFOCUS_FIRST, TRUE, NULL, ALERT_QUESTION);
 			g_free(message);
-			g_free(button_label);
 			if (aval & G_ALERTDISABLE) {
 				aval &= ~G_ALERTDISABLE;
 				prefs_common.warn_empty_subj = FALSE;
@@ -5185,20 +5179,15 @@ static gboolean compose_check_entries(Compose *compose, gboolean check_everythin
 		}
 		if (cnt > prefs_common.warn_sending_many_recipients_num) {
 			AlertValue aval;
-			gchar *button_label;
 			gchar *message;
 
-			if (compose->sending)
-				button_label = g_strconcat("+", _("_Send"), NULL);
-			else
-				button_label = g_strconcat("+", _("_Queue"), NULL);
 			message = g_strdup_printf(_("Sending to %d recipients. %s"), cnt,
 					compose->sending?_("Send it anyway?"):
 					_("Queue it anyway?"));
 
 			aval = alertpanel_full(compose->sending?_("Send"):_("Send later"), message,
-					       GTK_STOCK_CANCEL, button_label, NULL, ALERTFOCUS_FIRST,
-								 TRUE, NULL, ALERT_QUESTION);
+					       GTK_STOCK_CANCEL, compose->sending?_("_Send"):_("_Queue"), NULL,
+					       ALERTFOCUS_FIRST, TRUE, NULL, ALERT_QUESTION);
 			g_free(message);
 			if (aval & G_ALERTDISABLE) {
 				aval &= ~G_ALERTDISABLE;
diff --git a/src/prefs_actions.c b/src/prefs_actions.c
index b4e4198..61b8151 100644
--- a/src/prefs_actions.c
+++ b/src/prefs_actions.c
@@ -1293,7 +1293,7 @@ static void prefs_action_filterbtn_cb(GtkWidget *widget, gpointer data)
 	if(modified && alertpanel(_("Entry was modified"),
 			_("Opening the filter action dialog will clear current modifications "
 			"of the command line."),
-			GTK_STOCK_CANCEL, _("+_Continue editing"), NULL) != G_ALERTDEFAULT)
+			GTK_STOCK_CANCEL, _("_Continue editing"), NULL, ALERTFOCUS_SECOND) != G_ALERTDEFAULT)
 		return;
 */
 	action_str = gtk_editable_get_chars(GTK_EDITABLE(actions.cmd_entry), 0, -1);

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list