2006-02-08 [colin] 2.0.0cvs35
authorColin Leroy <colin@colino.net>
Wed, 8 Feb 2006 17:23:34 +0000 (17:23 +0000)
committerColin Leroy <colin@colino.net>
Wed, 8 Feb 2006 17:23:34 +0000 (17:23 +0000)
* src/filtering.c
* src/matcher.c
* src/matcher.h
* src/matcher_parser_parse.y
* src/prefs_filtering_action.c
* src/prefs_matcher.c
Add the "Ignore thread" filtering
action

ChangeLog
PATCHSETS
configure.ac
src/filtering.c
src/matcher.c
src/matcher.h
src/matcher_parser_parse.y
src/prefs_filtering_action.c
src/prefs_matcher.c

index bee8beeb6a0f3a319d8eded34cf295c031c6c919..1bb187a23de35a7155403b6c3c1c63889b7cc403 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2006-02-08 [colin]     2.0.0cvs35
+
+       * src/filtering.c
+       * src/matcher.c
+       * src/matcher.h
+       * src/matcher_parser_parse.y
+       * src/prefs_filtering_action.c
+       * src/prefs_matcher.c
+               Add the "Ignore thread" filtering
+               action
+
 2006-02-08 [colin]     2.0.0cvs34
 
        * src/compose.c
index e6d09596d321f1dc55d8838baf741d2b3c7cb638..c016c8264d3acf96a75f826c635d4f63a315b6de 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.382.2.237 -r 1.382.2.238 src/compose.c;  cvs diff -u -r 1.50.2.19 -r 1.50.2.20 src/compose.h;  ) > 2.0.0cvs32.patchset
 ( cvs diff -u -r 1.395.2.166 -r 1.395.2.167 src/summaryview.c;  ) > 2.0.0cvs33.patchset
 ( cvs diff -u -r 1.382.2.238 -r 1.382.2.239 src/compose.c;  cvs diff -u -r 1.49.2.70 -r 1.49.2.71 src/procmime.c;  cvs diff -u -r 1.17.2.13 -r 1.17.2.14 src/procmime.h;  ) > 2.0.0cvs34.patchset
+( cvs diff -u -r 1.60.2.12 -r 1.60.2.13 src/filtering.c;  cvs diff -u -r 1.75.2.15 -r 1.75.2.16 src/matcher.c;  cvs diff -u -r 1.39.2.6 -r 1.39.2.7 src/matcher.h;  cvs diff -u -r 1.25.2.12 -r 1.25.2.13 src/matcher_parser_parse.y;  cvs diff -u -r 1.1.4.24 -r 1.1.4.25 src/prefs_filtering_action.c;  cvs diff -u -r 1.43.2.34 -r 1.43.2.35 src/prefs_matcher.c;  ) > 2.0.0cvs35.patchset
index aee9b092c798211fd746e253eebbaf824f7be539..3e3b57ec6ee60c368151067a35c4efa71d01799a 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=0
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=34
+EXTRA_VERSION=35
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 9096197d00571ec7633ceb18bc661dddbcf2a065..94cde4d96cddfb32e0cd649e3c93a5a77d350217 100644 (file)
@@ -370,6 +370,10 @@ static gboolean filteringaction_apply(FilteringAction * action, MsgInfo * info)
                 info->hidden = TRUE;
                 return TRUE;
 
+       case MATCHACTION_IGNORE:
+                procmsg_msginfo_set_flags(info, MSG_IGNORE_THREAD, 0);
+                return TRUE;
+
        default:
                break;
        }
@@ -528,6 +532,7 @@ gchar *filteringaction_to_string(gchar *dest, gint destlen, FilteringAction *act
        case MATCHACTION_MARK_AS_UNREAD:
        case MATCHACTION_STOP:
        case MATCHACTION_HIDE:
+       case MATCHACTION_IGNORE:
                g_snprintf(dest, destlen, "%s", command_str);
                return dest;
 
index c353e006906f7ad171dc339b3865e0d8aa04c0d1..7991d0febeb6abfd47a151ce2c77ac0c8fc7e0bd 100644 (file)
@@ -137,6 +137,7 @@ static const MatchParser matchparser_tab[] = {
        {MATCHACTION_SET_SCORE, "set_score"},
        {MATCHACTION_STOP, "stop"},
        {MATCHACTION_HIDE, "hide"},
+       {MATCHACTION_IGNORE, "ignore"},
 };
 
 /*!
index 329ad76c6ac4257a5cf889717e85fef076d3b2bb..17e93f622b761e42b52c9d22e0c07a16aadda00f 100644 (file)
@@ -128,6 +128,7 @@ enum {
        MA_(SET_SCORE),
        MA_(STOP),
        MA_(HIDE),
+       MA_(IGNORE),
        /* boolean operations */
        MB_(OR),
        MB_(AND)
index 0448532af3fb2d158cf0e43c06e75a68a5dd67a9..e29ffff287ec6465c4b8fd9aa6709045601f2e50 100644 (file)
@@ -275,7 +275,7 @@ int matcher_parserwrap(void)
 %token MATCHER_COLORLABEL MATCHER_NOT_COLORLABEL
 %token MATCHER_IGNORE_THREAD MATCHER_NOT_IGNORE_THREAD
 %token MATCHER_CHANGE_SCORE MATCHER_SET_SCORE
-%token MATCHER_STOP MATCHER_HIDE
+%token MATCHER_STOP MATCHER_HIDE MATCHER_IGNORE
 
 %start file
 
@@ -1112,6 +1112,10 @@ MATCHER_EXECUTE MATCHER_STRING
 {
        action = filteringaction_new(MATCHACTION_HIDE, 0, NULL, 0, 0);
 }
+| MATCHER_IGNORE
+{
+       action = filteringaction_new(MATCHACTION_IGNORE, 0, NULL, 0, 0);
+}
 | MATCHER_STOP
 {
        action = filteringaction_new(MATCHACTION_STOP, 0, NULL, 0, 0);
index 9904a956edab8d08ce678edc8e46a3b1bb4a1907..92ce188f3beafb0aa7d0deeac5a2ca21fec37a88 100644 (file)
@@ -138,6 +138,7 @@ typedef enum Action_ {
        ACTION_CHANGE_SCORE,
        ACTION_SET_SCORE,
        ACTION_HIDE,
+       ACTION_IGNORE,
        ACTION_STOP,
        /* add other action constants */
 } Action;
@@ -163,6 +164,7 @@ static struct {
        { N_("Change score"),           ACTION_CHANGE_SCORE},
        { N_("Set score"),              ACTION_SET_SCORE},
        { N_("Hide"),                   ACTION_HIDE     },
+       { N_("Ignore thread"),          ACTION_IGNORE   },
        { N_("Stop filter"),            ACTION_STOP     },
 };
 
@@ -739,6 +741,8 @@ static gint prefs_filtering_action_get_matching_from_action(Action action_id)
                return MATCHACTION_COLOR;
        case ACTION_HIDE:
                return MATCHACTION_HIDE;
+       case ACTION_IGNORE:
+               return MATCHACTION_IGNORE;
        case ACTION_STOP:
                return MATCHACTION_STOP;
        case ACTION_CHANGE_SCORE:
@@ -820,6 +824,7 @@ static FilteringAction * prefs_filtering_action_dialog_to_action(gboolean alert)
                 break;
        case ACTION_STOP:
        case ACTION_HIDE:
+       case ACTION_IGNORE:
         case ACTION_DELETE:
         case ACTION_MARK:
         case ACTION_UNMARK:
@@ -1206,6 +1211,7 @@ static void prefs_filtering_action_type_select(GtkList *list,
        case ACTION_MARK_AS_UNREAD:
         case ACTION_STOP:
         case ACTION_HIDE:
+       case ACTION_IGNORE:
                gtk_widget_show(filtering_action.account_label);
                gtk_widget_set_sensitive(filtering_action.account_label, FALSE);
                gtk_widget_set_sensitive(filtering_action.account_combo, FALSE);
@@ -1528,6 +1534,10 @@ static gboolean prefs_filtering_actions_selected
                gtk_list_select_item(GTK_LIST(filtering_action.action_type_list),
                                     ACTION_HIDE);
                break;
+       case MATCHACTION_IGNORE:
+               gtk_list_select_item(GTK_LIST(filtering_action.action_type_list),
+                                    ACTION_IGNORE);
+               break;
        }
 
        filteringaction_free(action); /* XXX: memleak */
index 8ce723561c9f40bc087c1b4ce3999f20c5929ed6..2e775090f6a99947ced6a4bca125a59d5a5bd86c 100644 (file)
@@ -158,7 +158,7 @@ static const gchar *criteria_text [] = {
        N_("Replied flag"), N_("Forwarded flag"),
        N_("Locked flag"),
        N_("Color label"),
-       N_("Ignore thread"),
+       N_("Ignored thread"),
        N_("Score greater than"), N_("Score lower than"),
        N_("Score equal to"),
        N_("Test"),