[Commits] [SCM] claws branch, master, updated. 3.18.0-51-g5c71c190d
wwp at claws-mail.org
wwp at claws-mail.org
Wed Sep 1 10:35:31 UTC 2021
The branch, master has been updated
via 5c71c190d17e465b96cd1da53197ec7dfa1b88b0 (commit)
from 57ea92fc713e8d9a4305ad0addbda25761dd5c96 (commit)
Summary of changes:
src/prefs_actions.c | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
- Log -----------------------------------------------------------------
commit 5c71c190d17e465b96cd1da53197ec7dfa1b88b0
Author: wwp <subscript at free.fr>
Date: Wed Sep 1 12:34:05 2021 +0200
Action prefs: be smarter about detecting what's been modified when cancelling
an action edit (warn if action type has changed whereas a command-line was
set before).
diff --git a/src/prefs_actions.c b/src/prefs_actions.c
index 5ee39d766..adde9ba68 100644
--- a/src/prefs_actions.c
+++ b/src/prefs_actions.c
@@ -1110,7 +1110,7 @@ static GtkWidget *prefs_actions_popup_menu = NULL;
static GtkActionEntry prefs_actions_popup_entries[] =
{
{"PrefsActionsPopup", NULL, "PrefsActionsPopup", NULL, NULL, NULL },
- {"PrefsActionsPopup/Delete", NULL, N_("_Delete"), NULL, NULL, G_CALLBACK(prefs_actions_delete_cb) },
+ {"PrefsActionsPopup/Delete", NULL, N_("_Delete"), NULL, NULL, G_CALLBACK(prefs_actions_delete_cb) },
{"PrefsActionsPopup/DeleteAll", NULL, N_("Delete _all"), NULL, NULL, G_CALLBACK(prefs_actions_delete_all_cb) },
{"PrefsActionsPopup/Duplicate", NULL, N_("D_uplicate"), NULL, NULL, G_CALLBACK(prefs_actions_duplicate_cb) },
};
@@ -1316,16 +1316,15 @@ static void prefs_action_filterbtn_cb(GtkWidget *widget, gpointer data)
gchar *action_str, **tokens;
GSList *action_list = NULL, *cur;
-/* I think this warning is useless - it's logical to clear the field when
- changing its type.
-
- if(modified && alertpanel(_("Entry was modified"),
+ action_str = gtk_editable_get_chars(GTK_EDITABLE(actions.cmd_entry), 0, -1);
+ if(modified &&
+ *action_str != '\0' &&
+ alertpanel(_("Entry was modified"),
_("Opening the filter action dialog will clear current modifications "
- "of the command line."),
- GTK_STOCK_CANCEL, _("_Continue editing"), NULL, ALERTFOCUS_SECOND) != G_ALERTDEFAULT)
+ "of the command-line."),
+ GTK_STOCK_CANCEL, _("_Continue editing"), NULL, ALERTFOCUS_SECOND) != G_ALERTDEFAULT) {
return;
-*/
- action_str = gtk_editable_get_chars(GTK_EDITABLE(actions.cmd_entry), 0, -1);
+ }
tokens = g_strsplit_set(action_str, "{}", 5);
if (tokens[0] && tokens[1] && *tokens[1] != '\0') {
@@ -1338,8 +1337,8 @@ static void prefs_action_filterbtn_cb(GtkWidget *widget, gpointer data)
if (action_list != NULL) {
for(cur = action_list ; cur != NULL ; cur = cur->next)
- filteringaction_free(cur->data);
- }
+ filteringaction_free(cur->data);
+ }
g_free(action_str);
g_strfreev(tokens);
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list