fix a bug about filtering and bounce, be careful, filtering or bouncing action can...
authorHoà Viêt Dinh <dinh.viet.hoa@free.fr>
Wed, 16 Jan 2002 22:25:21 +0000 (22:25 +0000)
committerHoà Viêt Dinh <dinh.viet.hoa@free.fr>
Wed, 16 Jan 2002 22:25:21 +0000 (22:25 +0000)
ChangeLog.claws
src/matcher_parser_parse.y
src/prefs_filtering.c

index a6ee638..3fb0afe 100644 (file)
@@ -1,3 +1,11 @@
+2001-12-08 [hoa]       0.7.0claws10
+
+       * src/matcher_parser_parse.y
+               fixed some bugs
+
+       * src/prefs_filtering.c
+               now, we can use bounce action in the dialog box.
+
 2002-01-16 [carsten]   0.7.0claws9
        * src/gtkstext.c
                removed the <control> and <alt> shortcuts because they're
index 55ac707..685bbd9 100644 (file)
@@ -769,7 +769,7 @@ MATCHER_EXECUTE MATCHER_STRING
        gint account_id = 0;
 
        action_type = MATCHACTION_FORWARD;
-       account_id = $2;
+       account_id = atoi($2);
        destination = $3;
        action = filteringaction_new(action_type, account_id, destination, 0);
 }
@@ -780,7 +780,7 @@ MATCHER_EXECUTE MATCHER_STRING
        gint account_id = 0;
 
        action_type = MATCHACTION_FORWARD_AS_ATTACHMENT;
-       account_id = $2;
+       account_id = atoi($2);
        destination = $3;
        action = filteringaction_new(action_type, account_id, destination, 0);
 }
@@ -791,7 +791,7 @@ MATCHER_EXECUTE MATCHER_STRING
        gint account_id = 0;
 
        action_type = MATCHACTION_BOUNCE;
-       account_id = $2;
+       account_id = atoi($2);
        destination = $3;
        action = filteringaction_new(action_type, account_id, destination, 0);
 }
index 055b457..f50407c 100644 (file)
@@ -203,6 +203,8 @@ static gint prefs_filtering_get_matching_from_action(gint action_id)
                return MATCHACTION_FORWARD;
        case ACTION_FORWARD_AS_ATTACHMENT:
                return MATCHACTION_FORWARD_AS_ATTACHMENT;
+       case ACTION_BOUNCE:
+               return MATCHACTION_BOUNCE;
        case ACTION_EXECUTE:
                return MATCHACTION_EXECUTE;
        case ACTION_COLOR:
@@ -939,9 +941,9 @@ static void prefs_filtering_select_set(FilteringProp * prop)
                                     ACTION_MARK_AS_UNREAD);
                break;
        case MATCHACTION_FORWARD:
+               list_id = get_list_id_from_account_id(action->account_id);
                gtk_list_select_item(GTK_LIST(filtering.action_list),
                                     ACTION_FORWARD);
-               list_id = get_list_id_from_account_id(action->account_id);
                gtk_list_select_item(GTK_LIST(filtering.account_list),
                                     list_id);
                break;
@@ -953,9 +955,9 @@ static void prefs_filtering_select_set(FilteringProp * prop)
                                     list_id);
                break;
        case MATCHACTION_BOUNCE:
+               list_id = get_list_id_from_account_id(action->account_id);
                gtk_list_select_item(GTK_LIST(filtering.action_list),
                                     ACTION_BOUNCE);
-               list_id = get_list_id_from_account_id(action->account_id);
                gtk_list_select_item(GTK_LIST(filtering.account_list),
                                     list_id);
                break;