2009-09-24 [iwkse] 3.7.2cvs36
authorSalvatore De Paolis <iwkse@claws-mail.org>
Thu, 24 Sep 2009 12:52:13 +0000 (12:52 +0000)
committerSalvatore De Paolis <iwkse@claws-mail.org>
Thu, 24 Sep 2009 12:52:13 +0000 (12:52 +0000)
* src/action.c
            Fix issue with filtering actions and
            parsed parameters

ChangeLog
PATCHSETS
configure.ac
src/action.c

index 701c876..9a0b3e9 100644 (file)
--- 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
index e84df08..34b30b5 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( 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
index cadbf7f..2253b8a 100644 (file)
@@ -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=
index e2abbab..42b5c5d 100644 (file)
@@ -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;