(_("New folder"),
_("Input the name of new folder:\n"
"(if you want to create a folder to store subfolders\n"
- "and no mails, append '/' at the end of the name)"),
+ "only and no mail, append '/' to the folder name)"),
_("NewFolder"));
if (!new_folder) return;
AUTORELEASE_STR(new_folder, {g_free(new_folder); return;});
g_free(old_id);
g_free(new_id);
- folder_item_prefs_save_config(item);
+ folder_item_prefs_save_config_recursive(item);
folder_write_list();
}
folder_synchronise(item->folder);
}
-void imap_gtk_synchronise(FolderItem *item)
+void imap_gtk_synchronise(FolderItem *item, gint days)
{
MainWindow *mainwin = mainwindow_get_mainwindow();
FolderView *folderview = mainwin->folderview;
GSList *cur;
gint num = 0;
gint total = item->total_msgs;
+ time_t t = time(NULL);
mlist = folder_item_get_msg_list(item);
for (cur = mlist; cur != NULL; cur = cur->next) {
MsgInfo *msginfo = (MsgInfo *)cur->data;
- imap_cache_msg(msginfo->folder, msginfo->msgnum);
+ gint age = (t - msginfo->date_t) / (60*60*24);
+ if (days == 0 || age <= days)
+ imap_cache_msg(msginfo->folder, msginfo->msgnum);
statusbar_progress_all(num++,total, 100);
if (num % 100 == 0)
GTK_EVENTS_FLUSH();
main_window_unlock(mainwin);
inc_unlock();
main_window_cursor_normal(mainwin);
-
}
static void chk_update_val(GtkWidget *widget, gpointer data)
item->name);
gchar *child_folder = input_dialog_combo(_("Subscribe"),
msg,
- child_list->next?_("All of them"):child_list->data, child_list, TRUE);
+ child_list->next?_("All of them"):child_list->data, child_list);
g_free(msg);
if (child_folder && strcmp(child_folder, _("All of them"))) {
r = imap_subscribe(item->folder, NULL, child_folder, TRUE);
if (!folderview->selected) return;
item = gtk_ctree_node_get_row_data(ctree, folderview->selected);
- imap_gtk_synchronise(item);
+ imap_gtk_synchronise(item, 0);
}