summaryrefslogtreecommitdiffstats
path: root/mdkapplet
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2006-04-06 16:11:56 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2006-04-06 16:11:56 +0000
commit0f0c062d2c0a35d78093f349c3d2d965b0a99724 (patch)
treecd0787e6bf7d27b0fdeb0e03e954f87b62560a7b /mdkapplet
parente2b36c18ef59a8a69d5c492b930d9ed6b3db1e45 (diff)
downloadmgaonline-0f0c062d2c0a35d78093f349c3d2d965b0a99724.tar
mgaonline-0f0c062d2c0a35d78093f349c3d2d965b0a99724.tar.gz
mgaonline-0f0c062d2c0a35d78093f349c3d2d965b0a99724.tar.bz2
mgaonline-0f0c062d2c0a35d78093f349c3d2d965b0a99724.tar.xz
mgaonline-0f0c062d2c0a35d78093f349c3d2d965b0a99724.zip
(restart_applet) factorize some code
Diffstat (limited to 'mdkapplet')
-rwxr-xr-xmdkapplet8
1 files changed, 7 insertions, 1 deletions
diff --git a/mdkapplet b/mdkapplet
index ac101007..4c3fcd01 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -264,6 +264,12 @@ sub refresh_contents {
$contents;
}
sub configNetwork() { logIt(N("Launching drakconnect\n")); refresh_gui(0); fork_exec("/usr/sbin/drakconnect") }
+
+sub restart_applet {
+ logIt(N("Mandriva Online seems to be reinstalled, reloading applet ...."));
+ exec($0);
+}
+
sub installUpdates() {
my $binfile = $0;
my $oldmd5 = $release <= 10.2 ? mdkonline::md5file($binfile) : common::md5file($binfile);
@@ -271,7 +277,7 @@ sub installUpdates() {
refresh_gui(0);
fork_exec("/usr/sbin/mdkupdate --applet");
my $newmd5 = $release <= 10.2 ? mdkonline::md5file($binfile) : common::md5file($binfile);
- if ($newmd5 ne $oldmd5) { logIt(N("Mandriva Online seems to be reinstalled, reloading applet ....")); exec($binfile) }
+ restart_applet if $newmd5 ne $oldmd5;
#my $w = $in->wait_message(N("Please wait"), N("Check updates"));
silentCheck(); gtkflush();
#undef $w;