diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2010-07-12 09:33:27 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2010-07-12 09:33:27 +0000 |
commit | ec14e81935047bd2b2182595b76650b5f2fef893 (patch) | |
tree | d87f0c546859b5ef9a8f49a4f9abcdbd75ac63e7 /src | |
parent | af81f08052caa5dd3bf88b31d9eed3cf6158e9df (diff) |
implemented concatenation of partial messages (RFC 2046).
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2608 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r-- | src/mainwindow.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/mainwindow.c b/src/mainwindow.c index 3ee6b8a7..4d85b7a0 100644 --- a/src/mainwindow.c +++ b/src/mainwindow.c @@ -426,6 +426,9 @@ static void attract_by_subject_cb(MainWindow *mainwin, static void delete_duplicated_cb (MainWindow *mainwin, guint action, GtkWidget *widget); +static void concat_partial_cb (MainWindow *mainwin, + guint action, + GtkWidget *widget); static void filter_cb (MainWindow *mainwin, guint action, GtkWidget *widget); @@ -854,6 +857,8 @@ static GtkItemFactoryEntry mainwin_entries[] = #endif {N_("/_Tools/Delete du_plicated messages"), NULL, delete_duplicated_cb, 0, NULL}, + {N_("/_Tools/Concatenate separated messages"), + NULL, concat_partial_cb, 0, NULL}, {N_("/_Tools/---"), NULL, NULL, 0, "<Separator>"}, {N_("/_Tools/E_xecute marked process"), "X", execute_summary_cb, 0, NULL}, {N_("/_Tools/---"), NULL, NULL, 0, "<Separator>"}, @@ -3712,6 +3717,35 @@ static void delete_duplicated_cb(MainWindow *mainwin, guint action, summary_delete_duplicated(mainwin->summaryview); } +static void concat_partial_cb(MainWindow *mainwin, guint action, + GtkWidget *widget) +{ + GSList *mlist; + gchar *file; + FolderItem *item; + + g_print("concat_partial_cb\n"); + + if (summary_is_locked(mainwin->summaryview)) + return; + + item = mainwin->summaryview->folder_item; + if (!item) + return; + mlist = summary_get_selected_msg_list(mainwin->summaryview); + if (!mlist) + return; + + file = get_tmp_file(); + if (procmsg_concat_partial_messages(mlist, file) == 0) { + folder_item_add_msg(item, file, NULL, TRUE); + summary_show_queued_msgs(mainwin->summaryview); + } + g_free(file); + + g_slist_free(mlist); +} + static void filter_cb(MainWindow *mainwin, guint action, GtkWidget *widget) { summary_filter(mainwin->summaryview, (gboolean)action); |