From f05af80ee931b477fde2a6118125d8a4b28c1b8e Mon Sep 17 00:00:00 2001 From: Pierre Pronchery Date: Sun, 6 Sep 2009 22:02:07 +0000 Subject: [PATCH] The progress bar for the arguments count was wrong --- src/copy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/copy.c b/src/copy.c index b738c99..1a1b63e 100644 --- a/src/copy.c +++ b/src/copy.c @@ -79,7 +79,7 @@ static void _copy_on_closex(GtkWidget * widget, GdkEvent * event, gpointer data); static gboolean _copy_idle_first(gpointer data); -static int _copy(Prefs * prefs, int filec, char * filev[]) +static int _copy(Prefs * prefs, unsigned int filec, char * filev[]) { static Copy copy; GtkWidget * vbox; @@ -172,7 +172,7 @@ static void _copy_refresh(Copy * copy) snprintf(buf, sizeof(buf), "File %u of %u", copy->cur + 1, copy->filec - 1); fraction = copy->cur; - fraction /= copy->filec; + fraction /= copy->filec - 1; gtk_progress_bar_set_text(GTK_PROGRESS_BAR(copy->progress), buf); gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(copy->progress), fraction);