# # # patch "ChangeLog" # from [266efcda42a432970195893dd10c4612c4db0af1] # to [65b9901f6a15ef0a7ade28f75e72cbb22b010a6d] # # patch "ui.cc" # from [745a3861497007c7b45e3fc44ec8145b3036ba32] # to [416f27bf8eab5d3c36b4185cf452b43354f93e26] # # patch "ui.hh" # from [cd2bcd9e2ed7fbe5e4e93c784659e951496013a7] # to [787e857b22e3c7e6572eabf8fda7eac643537b24] # ============================================================ --- ChangeLog 266efcda42a432970195893dd10c4612c4db0af1 +++ ChangeLog 65b9901f6a15ef0a7ade28f75e72cbb22b010a6d @@ -1,5 +1,15 @@ 2006-05-19 Richard Levitte + * ui.hh (struct ticker), ui.cc (ticker::ticker, + ticker::write_ticks): Keep track of the last total we were given + and recalculate the counter width each time we detect a change in + total. The reason is that the counter is sometimes display even + though the real total isn't figured out yet, which gives the old + stepwise increase of counter size instead of doing it in one go + when we have the real total. + +2006-05-19 Richard Levitte + * tests/t_quiet.at: Test that --quiet doesn't suppress warnings. * tests/t_reallyquiet.at: New file. Test that --reallyquiet suppresses progress meters and warnings. ============================================================ --- ui.cc 745a3861497007c7b45e3fc44ec8145b3036ba32 +++ ui.cc 416f27bf8eab5d3c36b4185cf452b43354f93e26 @@ -31,6 +31,7 @@ ticks(0), mod(mod), total(0), + previous_total(0), kilocount(kilocount), use_total(false), keyname(tickname), @@ -153,7 +154,10 @@ { ticker * tick = i->second; - if (tick->count_size == 0 && (tick->kilocount || tick->use_total)) + if ((tick->count_size == 0 && tick->kilocount) + || + ((tick->count_size == 0 || tick->previous_total == 0) + && tick->use_total)) { if (!tick->kilocount && tick->use_total) { @@ -164,6 +168,7 @@ // the goal. tick->set_count_size(display_width(utf8(compose_count(tick, tick->total)))); + tick->previous_total = tick->total; } else { ============================================================ --- ui.hh cd2bcd9e2ed7fbe5e4e93c784659e951496013a7 +++ ui.hh 787e857b22e3c7e6572eabf8fda7eac643537b24 @@ -24,6 +24,7 @@ size_t ticks; size_t mod; size_t total; + size_t previous_total; bool kilocount; bool use_total; std::string keyname;