diff options
author | Thierry Vignaud <tv@mandriva.org> | 2007-03-13 11:48:20 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2007-03-13 11:48:20 +0000 |
commit | fa852721326c2c8e445264c2cf8ed76e62cbe206 (patch) | |
tree | fb715af239ae96d291846cf937a4617fbdd91b2b /mdkapplet | |
parent | b82d60ba4664dbea66fa742728f9f7e1ad574094 (diff) | |
download | mgaonline-fa852721326c2c8e445264c2cf8ed76e62cbe206.tar mgaonline-fa852721326c2c8e445264c2cf8ed76e62cbe206.tar.gz mgaonline-fa852721326c2c8e445264c2cf8ed76e62cbe206.tar.bz2 mgaonline-fa852721326c2c8e445264c2cf8ed76e62cbe206.tar.xz mgaonline-fa852721326c2c8e445264c2cf8ed76e62cbe206.zip |
store update frequency in /etc/sysconfig/mdkapplet (default is 3h)
Diffstat (limited to 'mdkapplet')
-rwxr-xr-x | mdkapplet | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -68,6 +68,10 @@ my $localfile = "$localdir/mdkonline"; my $release = mdkonline::get_release(); + +my %config = getVarsFromSh('/etc/sysconfig/mdkapplet'); +$config{UPDATE_FREQUENCY} ||= 3*60*60; # default to 3hours + sub my_sprintf_fixutf8 { mdkonline::get_release() < 2006.0 ? common::sprintf_fixutf8(@_) : @_; } @@ -392,7 +396,7 @@ sub setup_cyclic_check() { checkConfig(); 1; }); - $timeout = Glib::Timeout->add(3*60*60*1000, sub { + $timeout = Glib::Timeout->add($config{UPDATE_FREQUENCY}*1000, sub { checkUpdates(); 1; }); |