diff options
author | Angelo Naselli <anaselli@linux.it> | 2014-07-08 12:09:59 +0200 |
---|---|---|
committer | Angelo Naselli <anaselli@linux.it> | 2014-07-08 12:09:59 +0200 |
commit | 339f2038ac6c1e43be7a15de6dcf3fd4acdf0688 (patch) | |
tree | 76455c37a78fe62dbecf4da803554aaf96af8a4c /lib | |
parent | 19b5ffb0b42208ff42b437e0b33a95311a1c0774 (diff) | |
download | manatools-339f2038ac6c1e43be7a15de6dcf3fd4acdf0688.tar manatools-339f2038ac6c1e43be7a15de6dcf3fd4acdf0688.tar.gz manatools-339f2038ac6c1e43be7a15de6dcf3fd4acdf0688.tar.bz2 manatools-339f2038ac6c1e43be7a15de6dcf3fd4acdf0688.tar.xz manatools-339f2038ac6c1e43be7a15de6dcf3fd4acdf0688.zip |
- label is already created in new, let's change the content instead
of creating a new one
- YUI progress bar works in a int range 0..100
Diffstat (limited to 'lib')
-rw-r--r-- | lib/AdminPanel/Rpmdragora/gurpm.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/AdminPanel/Rpmdragora/gurpm.pm b/lib/AdminPanel/Rpmdragora/gurpm.pm index 89dcec45..b5eb1b29 100644 --- a/lib/AdminPanel/Rpmdragora/gurpm.pm +++ b/lib/AdminPanel/Rpmdragora/gurpm.pm @@ -78,7 +78,7 @@ sub flush { sub label { my ($self, $label) = @_; - $self->{label} = $self->{factory}->createLabel($self->{vbox},$label); + $self->{label}->setValue($label) if $label; #select(undef, undef, undef, 0.1); #- hackish :-( $self->flush(); } @@ -87,8 +87,8 @@ sub progress { my ($self, $value) = @_; state $time; $time = 0 if(!defined($time)); - $value = 0 if $value < 0; - $value = 100 if 1 < $value; + $value = 0 if !defined($value) || $value < 0; + $value = 100 if 100 < $value; $self->{progressbar}->setValue($value); return if Time::HiRes::clock_gettime() - $time < 0.333; $time = Time::HiRes::clock_gettime(); |