Permalink
Browse files

Merge remote-tracking branch 'sebnow/progress'

  • Loading branch information...
2 parents bda92c0 + 445e3ae commit 4aed5d021bf669021d36ed4caf80fefcc2ef0160 @juster juster committed Jun 25, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 clydelib/callback.lua
View
@@ -204,7 +204,7 @@ function cb_dl_total(total)
end
function cb_dl_progress(filename, file_xfered, file_total)
- local infolen = 50
+ local infolen = getcols() * 6 / 10
local filenamelen = infolen - 27
local fname, len, wclen, padwid, wcfname
@@ -215,6 +215,10 @@ function cb_dl_progress(filename, file_xfered, file_total)
local eta_h, eta_m, eta_s = 0, 0, 0
local rate_size, xfered_size = "K", "K"
+ if (infolen < 50) then
+ infolen = 50
+ end
+
if (config.noprogressbar or file_total == -1) then
if (file_xfered == 0) then
printf(g("downloading %s...\n"), filename)

0 comments on commit 4aed5d0

Please sign in to comment.