diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-04-17 07:06:07 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-04-17 07:06:07 +0800 |
commit | fa748c3bdcbc344dec8c1ddb03707661adecce3a (patch) | |
tree | 0f0cbdf59522c8849d626ab1d5901ce21fcb5708 /camel/providers | |
parent | 2c9c9695d6fb330577da4bf1f7b33353f64e4cf6 (diff) | |
download | gsoc2013-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
Diffstat (limited to 'camel/providers')
-rw-r--r-- | camel/providers/local/camel-mbox-summary.c | 10 |
1 files changed, 5 insertions, 5 deletions
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); |