aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2012-07-27 06:53:27 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2012-07-27 06:53:27 +0000
commit78cab195cc01779ed0fd11d0d10aa81555b4bbd9 (patch)
tree5a827d21c9882152a24ae7e3ac027c0be9f340fc /src
parentd04a449d2ffef1e80af681ef1493d98eee88e22b (diff)
src/export.c: pass the opened FolderItem when 'Export only selected messages' is enabled.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@3143 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src')
-rw-r--r--src/export.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/export.c b/src/export.c
index e4500a02..73ede0d6 100644
--- a/src/export.c
+++ b/src/export.c
@@ -207,14 +207,23 @@ static gint export_do(void)
mbox = g_strdup(utf8mbox);
}
- src = folder_find_item_from_identifier(srcdir);
+ selected_only = gtk_toggle_button_get_active
+ (GTK_TOGGLE_BUTTON(selected_only_chkbtn));
+
+ if (selected_only) {
+ mainwin = main_window_get();
+ src = mainwin->summaryview->folder_item;
+ mlist = summary_get_selected_msg_list(mainwin->summaryview);
+ } else
+ src = folder_find_item_from_identifier(srcdir);
+
if (!src) {
g_warning("Can't find the folder.");
g_free(mbox);
return -1;
}
- msg = g_strdup_printf(_("Exporting %s ..."), g_basename(srcdir));
+ msg = g_strdup_printf(_("Exporting %s ..."), src->name);
progress = progress_dialog_simple_create();
gtk_window_set_title(GTK_WINDOW(progress->window), _("Exporting"));
progress_dialog_set_label(progress, msg);
@@ -228,13 +237,6 @@ static gint export_do(void)
gtk_widget_show(progress->window);
ui_update();
- selected_only = gtk_toggle_button_get_active
- (GTK_TOGGLE_BUTTON(selected_only_chkbtn));
- if (selected_only) {
- mainwin = main_window_get();
- mlist = summary_get_selected_msg_list(mainwin->summaryview);
- }
-
progress_cancel = FALSE;
if (type == EXPORT_MBOX) {