2007-08-23 [wwp] 2.10.0cvs158
authorTristan Chabredier <wwp@claws-mail.org>
Thu, 23 Aug 2007 16:55:40 +0000 (16:55 +0000)
committerTristan Chabredier <wwp@claws-mail.org>
Thu, 23 Aug 2007 16:55:40 +0000 (16:55 +0000)
* src/action.c
* src/prefs_actions.c
Allow literal % chars in action commands (use %%).
Add a missing p++ to the action parser in action_get_type(),
which was missing it, even if it was neutral.
Fix a pango markup warning at runtime.

ChangeLog
PATCHSETS
configure.ac
src/action.c
src/prefs_actions.c

index 6ac483dcff0c7d568c4c093536296fe9d6832459..f7494d2b9a9bacdff0e30dff68138c6445e8d5ef 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2007-08-23 [wwp]       2.10.0cvs158
+
+       * src/action.c
+       * src/prefs_actions.c
+               Allow literal % chars in action commands (use %%).
+               Add a missing p++ to the action parser in action_get_type(),
+               which was missing it, even if it was neutral.
+               Fix a pango markup warning at runtime.
+
 2007-08-23 [wwp]       2.10.0cvs157
 
        * src/addressbook.c
index f4c103ceab9e5df4b3f7b5424f56f55c21698442..2b82a3a848c81c4e5a172b51f947a75a7484ee9b 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.179.2.184 -r 1.179.2.185 src/imap.c;  ) > 2.10.0cvs155.patchset
 ( cvs diff -u -r 1.179.2.185 -r 1.179.2.186 src/imap.c;  ) > 2.10.0cvs156.patchset
 ( cvs diff -u -r 1.60.2.95 -r 1.60.2.96 src/addressbook.c;  ) > 2.10.0cvs157.patchset
+( cvs diff -u -r 1.12.2.47 -r 1.12.2.48 src/action.c;  cvs diff -u -r 1.60.2.47 -r 1.60.2.48 src/prefs_actions.c;  ) > 2.10.0cvs158.patchset
index de2024e359415913806c07e349f329da404e47ce..bfb33fed48b2905926b3139083b565c53e413a61 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=10
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=157
+EXTRA_VERSION=158
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index a3bb7ddb643702d6bc9701d43b204909cbd21bad..24374fb1d844a07bddfc3b5e1885cd0318f28e5d 100644 (file)
@@ -236,10 +236,14 @@ ActionType action_get_type(const gchar *action_str)
                        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;
@@ -321,6 +325,10 @@ static gchar *parse_action_cmd(gchar *action, MsgInfo *msginfo,
                                        g_string_append(cmd, user_hidden_str);
                                p++;
                                break;
+                       case '%':
+                               g_string_append_c(cmd, p[1]);
+                               p++;
+                               break;
                        default:
                                g_string_append_c(cmd, p[0]);
                                g_string_append_c(cmd, p[1]);
index 891159ad282f5fd3192530fb4f26a23f13f6aed6..a9aaa620b6c12a82a9f231add93c36d0019a44eb 100644 (file)
@@ -568,8 +568,11 @@ static gint prefs_actions_clist_set_row(GtkTreeIter *row)
        }
 
        if (action_get_type(entry_text) == ACTION_ERROR) {
-               alertpanel_error(_("The command\n%s\nhas a syntax error."), 
-                                entry_text);
+               gchar *message;
+               message = g_markup_printf_escaped(_("The command\n%s\nhas a syntax error."),
+                                               entry_text);
+               alertpanel_error(message);
+               g_free(message);
                return -1;
        }
 
@@ -823,6 +826,7 @@ static gchar *actions_desc_strings[] = {
        "     %h",  N_("for a user provided hidden argument (e.g. password)"),
        "     %s",  N_("for the text selection"),
        "  %as{}",  N_("apply filtering actions between {} to selected messages"),
+       "     %%",  N_("for a literal % sign"),
        NULL, NULL
 };