diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2011-01-17 02:07:11 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2011-01-17 02:07:11 +0000 |
commit | 9f7138a0d75b5d30bf2daf12252bb19ec5b773ef (patch) | |
tree | 8163265b80504865b8f1d363be20567b388aaa2e | |
parent | 35835dc2086397c710132730db84a80f160ccbb4 (diff) |
optimized tmp flags preservation.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2795 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | src/summaryview.c | 16 |
2 files changed, 16 insertions, 5 deletions
@@ -1,3 +1,8 @@ +2011-01-17 + + * src/summaryview.c: summary_get_tmp_marked_msg_list(): don't use + full copy for saving flags. + 2011-01-16 * src/summaryview.c: summary_restore_tmp_marks(): optimized. diff --git a/src/summaryview.c b/src/summaryview.c index 2f0bc284..5eeb5444 100644 --- a/src/summaryview.c +++ b/src/summaryview.c @@ -1278,15 +1278,21 @@ GSList *summary_get_flagged_msg_list(SummaryView *summaryview, /* return list of copied MsgInfo */ static GSList *summary_get_tmp_marked_msg_list(SummaryView *summaryview) { - MsgInfo *msginfo; + MsgInfo *msginfo, *markinfo; GSList *mlist = NULL; GSList *cur; for (cur = summaryview->all_mlist; cur != NULL; cur = cur->next) { msginfo = (MsgInfo *)cur->data; - if (MSG_IS_MOVE(msginfo->flags) || MSG_IS_COPY(msginfo->flags)) - mlist = g_slist_prepend - (mlist, procmsg_msginfo_copy(msginfo)); + if (MSG_IS_MOVE(msginfo->flags) || + MSG_IS_COPY(msginfo->flags)) { + markinfo = g_new0(MsgInfo, 1); + markinfo->msgnum = msginfo->msgnum; + markinfo->flags = msginfo->flags; + markinfo->folder = msginfo->folder; + markinfo->to_folder = msginfo->to_folder; + mlist = g_slist_prepend(mlist, markinfo); + } } return g_slist_reverse(mlist); @@ -1310,7 +1316,7 @@ static void summary_restore_tmp_marks(SummaryView *summaryview, msginfo->to_folder = markinfo->to_folder; save_mark_mlist = g_slist_remove (save_mark_mlist, markinfo); - procmsg_msginfo_free(markinfo); + g_free(markinfo); if (!save_mark_mlist) return; break; |