aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-04-17 07:06:07 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-04-17 07:06:07 +0800
commitfa748c3bdcbc344dec8c1ddb03707661adecce3a (patch)
tree0f0cbdf59522c8849d626ab1d5901ce21fcb5708
parent2c9c9695d6fb330577da4bf1f7b33353f64e4cf6 (diff)
downloadgsoc2013-evolution-fa748c3bdcbc344dec8c1ddb03707661adecce3a.tar
gsoc2013-evolution-fa748c3bdcbc344dec8c1ddb03707661adecce3a.tar.gz
gsoc2013-evolution-fa748c3bdcbc344dec8c1ddb03707661adecce3a.tar.bz2
gsoc2013-evolution-fa748c3bdcbc344dec8c1ddb03707661adecce3a.tar.lz
gsoc2013-evolution-fa748c3bdcbc344dec8c1ddb03707661adecce3a.tar.xz
gsoc2013-evolution-fa748c3bdcbc344dec8c1ddb03707661adecce3a.tar.zst
gsoc2013-evolution-fa748c3bdcbc344dec8c1ddb03707661adecce3a.zip
Don't we want to tell where we are by using the start of the message? I
2001-04-16 Jeffrey Stedfast <fejj@ximian.com> * providers/local/camel-mbox-summary.c (summary_rebuild): Don't we want to tell where we are by using the start of the message? I think this should be using camel_mime_parser_tell_start_from() instead. Also divide by the size *before* multiplying by 100 so that we don't overflow the int which was giving us negative values for our progress status (oops). svn path=/trunk/; revision=9394
-rw-r--r--camel/ChangeLog9
-rw-r--r--camel/providers/local/camel-mbox-summary.c10
2 files changed, 14 insertions, 5 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 73cc838bb1..f319cd813f 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,14 @@
2001-04-16 Jeffrey Stedfast <fejj@ximian.com>
+ * providers/local/camel-mbox-summary.c (summary_rebuild): Don't we
+ want to tell where we are by using the start of the message? I
+ think this should be using camel_mime_parser_tell_start_from()
+ instead. Also divide by the size *before* multiplying by 100 so
+ that we don't overflow the int which was giving us negative values
+ for our progress status (oops).
+
+2001-04-16 Jeffrey Stedfast <fejj@ximian.com>
+
* camel-operation.c: Added a prototype for stamp().
* camel-charset-map.c (camel_charset_locale_name): #include
diff --git a/camel/providers/local/camel-mbox-summary.c b/camel/providers/local/camel-mbox-summary.c
index 389b1f356c..5f3691834f 100644
--- a/camel/providers/local/camel-mbox-summary.c
+++ b/camel/providers/local/camel-mbox-summary.c
@@ -286,10 +286,10 @@ summary_rebuild(CamelMboxSummary *mbs, off_t offset, CamelException *ex)
while (camel_mime_parser_step(mp, NULL, NULL) == HSCAN_FROM) {
CamelMessageInfo *info;
- int pc = (camel_mime_parser_tell(mp)+1) * 100/size;
-
- camel_operation_progress(NULL, pc);
-
+ off_t pc = camel_mime_parser_tell_start_from (mp) + 1;
+
+ camel_operation_progress (NULL, (int) (((float) pc / size) * 100));
+
info = camel_folder_summary_add_from_parser(s, mp);
if (info == NULL) {
camel_exception_setv(ex, 1, _("Fatal mail parser error near position %ld in folder %s"),
@@ -526,7 +526,7 @@ mbox_summary_sync_full(CamelLocalSummary *cls, gboolean expunge, CamelFolderChan
count = camel_folder_summary_count(s);
for (i = 0; i < count; i++) {
- int pc = (i+1)*100/count;
+ int pc = (i + 1) * 100 / count;
camel_operation_progress(NULL, pc);