From d1eb4bc8d639579607fade69a89665fbdd8c72f9 Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Wed, 16 Jan 2008 02:19:15 +0000 Subject: [PATCH] use pieces wanted instead of total pieces to draw adv progress bar --- src/tab_details.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tab_details.py b/src/tab_details.py index cd96ecc4d..aae9f1f0d 100644 --- a/src/tab_details.py +++ b/src/tab_details.py @@ -93,7 +93,7 @@ class DetailsTabManager(object): if state != None: gc.set_foreground(colormap.alloc_color('#2020FF')) progress_window.draw_rectangle(gc, True, 0, top, int(size[0] * state['progress']), 4) - num_pieces = state["num_pieces"] + num_pieces = state["total_wanted"] / state["piece_length"] for pieces_range in state['pieces']: range_first = pieces_range[0] * size[0] / num_pieces range_length = ((pieces_range[1] - pieces_range[0] + 1) * size[0] / num_pieces)