summaryrefslogtreecommitdiffstats
path: root/mdkapplet
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-03-13 11:48:20 +0000
committerThierry Vignaud <tv@mandriva.org>2007-03-13 11:48:20 +0000
commitfa852721326c2c8e445264c2cf8ed76e62cbe206 (patch)
treefb715af239ae96d291846cf937a4617fbdd91b2b /mdkapplet
parentb82d60ba4664dbea66fa742728f9f7e1ad574094 (diff)
downloadmgaonline-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-xmdkapplet6
1 files changed, 5 insertions, 1 deletions
diff --git a/mdkapplet b/mdkapplet
index 28ad85a1..ec76c1ae 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -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;
});