summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2013-05-06 21:01:12 +0100
committerdakkar <dakkar@thenautilus.net>2013-05-06 21:01:12 +0100
commiteda6c4546c661b04c2d83477b14521754909503f (patch)
tree052139f984a91326664159cba756b5fe73390e2e /lib
parentgui (diff)
downloadbattery-eda6c4546c661b04c2d83477b14521754909503f.tar.gz
battery-eda6c4546c661b04c2d83477b14521754909503f.tar.bz2
battery-eda6c4546c661b04c2d83477b14521754909503f.zip
fix timeout frequency
Diffstat (limited to 'lib')
-rw-r--r--lib/Battery.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Battery.pm b/lib/Battery.pm
index 3936b9b..cc2257a 100644
--- a/lib/Battery.pm
+++ b/lib/Battery.pm
@@ -23,14 +23,14 @@ sub new {
my $bar = Gtk2::ProgressBar->new();
$bar->set_orientation('left-to-right');
- $bar->set_pulse_step(0.01);
+ $bar->set_pulse_step(10);
$self->{b}=$bar;
$window->add($bar);
$window->signal_connect(delete_event => \&quit);
- Glib::Timeout->add(1,\&update,$self);
+ Glib::Timeout->add(1000,\&update,$self);
return $self;
}
@@ -76,6 +76,8 @@ sub update {
100*$e
);
$self->{b}->set_fraction($t/$tot);
+
+ return 1;
}
1;