diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-11-22 08:33:15 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2005-11-22 08:33:15 +0000 |
commit | 5160f092433264a840703291f90daee43e409ad8 (patch) | |
tree | 5800ff5758ce3fdc098abed2147f0227ade58edf /src/compose.c | |
parent | 848b4a5395260d1fb90407fe2ceec1c48485dafa (diff) |
modified 'filter sent messages'.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@773 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/compose.c')
-rw-r--r-- | src/compose.c | 42 |
1 files changed, 24 insertions, 18 deletions
diff --git a/src/compose.c b/src/compose.c index d8e7b67b..0e35f5ca 100644 --- a/src/compose.c +++ b/src/compose.c @@ -2677,28 +2677,34 @@ static gint compose_send(Compose *compose) /* save message to outbox */ if (prefs_common.savemsg) { FolderItem *outbox; + gboolean drop_done = FALSE; - outbox = account_get_special_folder - (compose->account, F_OUTBOX); - if (procmsg_save_to_outbox(outbox, tmp) < 0) - alertpanel_error - (_("Can't save the message to outbox.")); - else - folderview_update_item(outbox, TRUE); - } - /* filter sent message */ - if (prefs_common.filter_sent) { - FilterInfo *fltinfo; + /* filter sent message */ + if (prefs_common.filter_sent) { + FilterInfo *fltinfo; - fltinfo = filter_info_new(); - fltinfo->account = compose->account; - fltinfo->flags.perm_flags = 0; - fltinfo->flags.tmp_flags = MSG_RECEIVED; + fltinfo = filter_info_new(); + fltinfo->account = compose->account; + fltinfo->flags.perm_flags = 0; + fltinfo->flags.tmp_flags = MSG_RECEIVED; - filter_apply(prefs_common.fltlist, tmp, fltinfo); + filter_apply(prefs_common.fltlist, tmp, + fltinfo); - folderview_update_all_updated(TRUE); - filter_info_free(fltinfo); + drop_done = fltinfo->drop_done; + folderview_update_all_updated(TRUE); + filter_info_free(fltinfo); + } + + if (!drop_done) { + outbox = account_get_special_folder + (compose->account, F_OUTBOX); + if (procmsg_save_to_outbox(outbox, tmp) < 0) + alertpanel_error + (_("Can't save the message to outbox.")); + else + folderview_update_item(outbox, TRUE); + } } } |