talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 35333cc0e93d16fd21d605cdfc36e4a1f6bb8049
parent a0623d9247ff1c3ecbf5b81b554071889125fc64
Author: Salvatore De Paolis <iwkse@claws-mail.org>
Date:   Thu, 24 Sep 2009 12:52:13 +0000

2009-09-24 [iwkse]	3.7.2cvs36

	* src/action.c
            Fix issue with filtering actions and
            parsed parameters

Diffstat:
MChangeLog | 6++++++
MPATCHSETS | 1+
Mconfigure.ac | 6+++---
Msrc/action.c | 100++++++++++++++++++++++++++++++++++++++++++-------------------------------------
4 files changed, 63 insertions(+), 50 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,9 @@ +2009-09-24 [iwkse] 3.7.2cvs36 + + * src/action.c + Fix issue with filtering actions and + parsed parameters + 2009-09-20 [mones] 3.7.2cvs35 * tools/convert_mbox.pl diff --git a/PATCHSETS b/PATCHSETS @@ -3860,3 +3860,4 @@ ( cvs diff -u -r 1.49.2.130 -r 1.49.2.131 src/procmime.c; ) > 3.7.2cvs33.patchset ( cvs diff -u -r 1.115.2.222 -r 1.115.2.223 src/main.c; ) > 3.7.2cvs34.patchset ( cvs diff -u -r 1.3.2.2 -r 1.3.2.3 tools/convert_mbox.pl; cvs diff -u -r 1.1.2.3 -r 1.1.2.4 tools/popfile-link.sh; ) > 3.7.2cvs35.patchset +( cvs diff -u -r 1.12.2.57 -r 1.12.2.58 src/action.c; ) > 3.7.2cvs36.patchset diff --git a/configure.ac b/configure.ac @@ -12,7 +12,7 @@ MINOR_VERSION=7 MICRO_VERSION=2 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=35 +EXTRA_VERSION=36 EXTRA_RELEASE= EXTRA_GTK2_VERSION= @@ -140,7 +140,7 @@ AM_CONDITIONAL(CYGWIN, test x"$env_cygwin" = x"yes") if test "$GCC" = "yes" then - CFLAGS="$CFLAGS -Wno-unused-function" + CFLAGS="$CFLAGS -march=native -Wno-unused-function" fi AC_MSG_CHECKING([if gcc supports -Wno-pointer-sign]) @@ -156,7 +156,7 @@ fi CFLAGS="$CFLAGS -Wall" if test $USE_MAINTAINER_MODE = yes; then - CFLAGS="$CFLAGS -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DG_DISABLE_DEPRECATED -DGTK_DISABLE_SINGLE_INCLUDES" + CFLAGS="$CFLAGS -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DG_DISABLE_DEPRECATED -DGTK_DISABLE_SINGLE_INCLUDES -DWARN_INCOMPLETE_UNDO" fi pthread_name= diff --git a/src/action.c b/src/action.c @@ -194,6 +194,7 @@ static gchar *get_user_string (const gchar *action, ActionType action_get_type(const gchar *action_str) { const gchar *p; + gboolean in_filtering_action = FALSE; ActionType action_type = ACTION_NONE; cm_return_val_if_fail(action_str, ACTION_ERROR); @@ -216,55 +217,60 @@ ActionType action_get_type(const gchar *action_str) return ACTION_ERROR; while (*p && action_type != ACTION_ERROR) { - if (p[0] == '%' && p[1]) { - switch (p[1]) { - case 'a': - /* CLAWS: filtering action is a mutually exclusive - * action. we can enable others if needed later. we - * add ACTION_SINGLE | ACTION_MULTIPLE so it will - * only be executed from the main window toolbar */ - if (p[2] == 's') /* source messages */ - action_type = ACTION_FILTERING_ACTION - | ACTION_SINGLE - | ACTION_MULTIPLE; - break; - case 'f': - action_type |= ACTION_SINGLE; - break; - case 'F': - action_type |= ACTION_MULTIPLE; - break; - case 'p': - action_type |= ACTION_SINGLE; - break; - case 's': - action_type |= ACTION_SELECTION_STR; - break; - case 'u': - action_type |= ACTION_USER_STR; - break; - case 'h': - action_type |= ACTION_USER_HIDDEN_STR; - break; - case '%': - /* literal '%' */ - break; - default: - action_type = ACTION_ERROR; - break; + if (!in_filtering_action) { + if (p[0] == '%' && p[1]) { + switch (p[1]) { + case 'a': + /* CLAWS: filtering action is a mutually exclusive + * action. we can enable others if needed later. we + * add ACTION_SINGLE | ACTION_MULTIPLE so it will + * only be executed from the main window toolbar */ + if (p[2] == 's') /* source messages */ + action_type = ACTION_FILTERING_ACTION + | ACTION_SINGLE + | ACTION_MULTIPLE; + in_filtering_action = TRUE; + break; + case 'f': + action_type |= ACTION_SINGLE; + break; + case 'F': + action_type |= ACTION_MULTIPLE; + break; + case 'p': + action_type |= ACTION_SINGLE; + break; + case 's': + action_type |= ACTION_SELECTION_STR; + break; + case 'u': + action_type |= ACTION_USER_STR; + break; + case 'h': + action_type |= ACTION_USER_HIDDEN_STR; + break; + case '%': + /* literal '%' */ + break; + default: + action_type = ACTION_ERROR; + break; + } + p++; + } else if (p[0] == '|') { + if (p[1] == '\0') + action_type |= ACTION_PIPE_OUT; + } else if (p[0] == '>') { + if (p[1] == '\0') + action_type |= ACTION_INSERT; + } else if (p[0] == '&') { + if (p[1] == '\0') + action_type |= ACTION_ASYNC; + } else if (p[0] == '}') { + in_filtering_action = FALSE; } - p++; - } else if (p[0] == '|') { - if (p[1] == '\0') - action_type |= ACTION_PIPE_OUT; - } else if (p[0] == '>') { - if (p[1] == '\0') - action_type |= ACTION_INSERT; - } else if (p[0] == '&') { - if (p[1] == '\0') - action_type |= ACTION_ASYNC; } - p++; + p++; } return action_type;