#include "remotefolder.h"
#include "main.h"
#include "account.h"
+#include "statusbar.h"
#define DISABLE_LOG_DURING_LOGIN
-#define NNTP_BATCH_SIZE 4999
+#define NNTP_BATCH_SIZE 5000
static struct etpan_thread_manager * thread_manager = NULL;
static chash * nntp_hash = NULL;
* and to allow updating any progress indicators while we work. */
cbeg = beg;
while (cbeg <= end && cend <= end) {
- cend = cbeg + NNTP_BATCH_SIZE;
+ cend = cbeg + (NNTP_BATCH_SIZE - 1);
if (cend > end)
cend = end;
+ statusbar_progress_all(cbeg - beg, end - beg, 1);
+ GTK_EVENTS_FLUSH();
+
param.nntp = get_nntp(folder);
param.beg = cbeg;
param.end = cend;
if (l != NULL)
newsnntp_xover_resp_list_free(l);
newsnntp_xover_resp_list_free(h);
+ statusbar_progress_all(0, 0, 0);
return result.error;
}
l = NULL;
}
- cbeg += NNTP_BATCH_SIZE + 1;
+ cbeg += NNTP_BATCH_SIZE;
}
+
+ statusbar_progress_all(0, 0, 0);
debug_print("nntp xover - end\n");
* and to allow updating any progress indicators while we work. */
cbeg = beg;
while (cbeg <= end && cend <= end) {
- cend = cbeg + NNTP_BATCH_SIZE;
+ cend = cbeg + NNTP_BATCH_SIZE - 1;
if (cend > end)
cend = end;
+ statusbar_progress_all(cbeg - beg, end - beg, 1);
+ GTK_EVENTS_FLUSH();
+
param.nntp = get_nntp(folder);
param.header = header;
param.beg = cbeg;
if (l != NULL)
newsnntp_xhdr_free(l);
newsnntp_xhdr_free(h);
+ statusbar_progress_all(0, 0, 0);
return result.error;
}
l = NULL;
}
- cbeg += NNTP_BATCH_SIZE + 1;
+ cbeg += NNTP_BATCH_SIZE;
}
+
+ statusbar_progress_all(0, 0, 0);
debug_print("nntp xhdr %s - end (%d-%d)\n", header, beg, end);