#include "main.h"
#include "msgcache.h"
#include "privacy.h"
+#include "prefs_common.h"
+#include "prefs_migration.h"
/* Dependecies to be removed ?! */
-#include "prefs_common.h"
#include "prefs_account.h"
/* Define possible missing constants for Windows. */
GNode *node, *cur;
XMLNode *xmlnode;
gchar *path;
+ GList *list;
+ gint config_version = -1;
path = folder_get_list_path();
if (!is_file_exist(path)) return -1;
cur = cur->next;
}
+ for (list = xmlnode->tag->attr; list != NULL; list = list->next) {
+ XMLAttr *attr = list->data;
+
+ if (!attr || !attr->name || !attr->value) continue;
+ if (!strcmp(attr->name, "config_version")) {
+ config_version = atoi(attr->value);
+ debug_print("Found folderlist config_version %d\n", config_version);
+ }
+ }
+
xml_free_tree(node);
+
+ if (prefs_update_config_version_folderlist(config_version) < 0) {
+ debug_print("Folderlist configuration file version upgrade failed\n");
+ return -2;
+ }
+
if (folder_list || folder_unloaded_list)
return 0;
else
return;
}
tag = xml_tag_new("folderlist");
+ xml_tag_add_attr(tag, xml_attr_new_int("config_version",
+ CLAWS_CONFIG_VERSION));
xmlnode = xml_node_new(tag, NULL);
if (!item)
return;
if (item->prefs->offlinesync && item->folder->klass->synchronise) {
- statuswindow_print_all(_("Synchronising %s for offline use...\n"), item->path ? item->path : "(null)");
+ statusbar_print_all(_("Synchronising %s for offline use...\n"), item->path ? item->path : "(null)");
item->folder->klass->synchronise(item,
item->prefs->offlinesync_days);
if (item->prefs->offlinesync_days > 0 &&
item->prefs->remove_old_bodies)
folder_item_clean_local_files(item, item->prefs->offlinesync_days);
- statuswindow_pop_all();
+ statusbar_pop_all();
}
}
}
processed_count++;
+ procmsg_msginfo_free(&msg);
+
if (progress_cb != NULL
&& !progress_cb(progress_data, FALSE, processed_count,
matched_count, msgcount))