aboutsummaryrefslogtreecommitdiffstats
path: root/lib/AdminPanel
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AdminPanel')
-rw-r--r--lib/AdminPanel/Rpmdragora/gurpm.pm6
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();