diff options
| -rw-r--r-- | CHANGELOG | 8 | ||||
| -rwxr-xr-x | loadbars | 39 |
2 files changed, 35 insertions, 12 deletions
@@ -2,12 +2,14 @@ * Remove --width option * Add --barwidth option, each bar is barwidth pixels now * Add --maxwidth option, which represents the max total window width -* Key right increases window width by 100px and left decreases by 100px -* Key down increases window height by 100px and up decreases by 100px * Auto disable text display if text does not fit into window (maxwidth) pixels * Auto re-enable text display if text does fit again into window -* No sporadic crashes on shutdown anymore +* Key right increases window width by 100px and left decreases by 100px +* Key down increases window height by 100px and up decreases by 100px * Set 'samples' default values from 1000 down to 500. +* No sporadic crashes on shutdown anymore +* Some internal tweaks, no separate event thread needed anymore. This fixes + some sporadic bugs. Sun Jan 21 14:16:37 CET 2012 * Released v0.4.0 @@ -261,15 +261,26 @@ sub display_info ($) { sub set_dimensions ($$) { my ($width, $height) = @_; + my $display_info = 0; if ($width < 1) { - $C{width} = 1; + if ($C{width} != 1) { + $C{width} = 1; + $display_info = 1; + } } elsif ($width > $C{maxwidth}) { - $C{width} = $C{maxwidth}; - display_info 'Disabling text display, text does not fit into window. Use \'t\' to re-enable.'; - $C{displaytxt} = 0; - $C{displaytxtoff} = 1; + if ($C{width} != $C{maxwidth}) { + $C{width} = $C{maxwidth}; + $display_info = 1; + } + + if ($C{displaytxtoff} == 0 || $C{displaytxt}) { + display_info 'Disabling text display, text does not fit into window. Use \'t\' to re-enable.'; + $C{displaytxtoff} = 1; + $C{displaytxt} = 0; + } + } else { if ($C{displaytxtoff}) { @@ -278,17 +289,27 @@ sub set_dimensions ($$) { $C{displaytxtoff} = 0; } - $C{width} = $width; + if ($C{width} != $width) { + $C{width} = $width; + $display_info = 1; + } } if ($height < 1) { - $C{height} = 1; + if ($C{height} != 1) { + $C{height} = 1; + $display_info = 1; + } } else { - $C{height} = $height; + if ($C{height} != $height) { + $C{height} = $height; + $display_info = 1; + } } - display_info "Resizing to $C{width}x$C{height}"; + display_info "Resizing to $C{width}x$C{height}" + if $display_info; } sub main_loop ($@) { |
