summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaouda Lo <daouda@mandriva.com>2004-03-03 17:40:10 +0000
committerDaouda Lo <daouda@mandriva.com>2004-03-03 17:40:10 +0000
commitdf3da863ee4e9d6985d3682ee92a5bea0f35a74d (patch)
treecd7ff5e3db46321a53c2c84ee1eb1760950a3a30
parentcf9ce2423a0560e39beeb7e811f54860a6baf490 (diff)
downloadmgaonline-df3da863ee4e9d6985d3682ee92a5bea0f35a74d.tar
mgaonline-df3da863ee4e9d6985d3682ee92a5bea0f35a74d.tar.gz
mgaonline-df3da863ee4e9d6985d3682ee92a5bea0f35a74d.tar.bz2
mgaonline-df3da863ee4e9d6985d3682ee92a5bea0f35a74d.tar.xz
mgaonline-df3da863ee4e9d6985d3682ee92a5bea0f35a74d.zip
- hash typo
-rwxr-xr-xmdkapplet15
1 files changed, 13 insertions, 2 deletions
diff --git a/mdkapplet b/mdkapplet
index 19f88d0d..eb2bead3 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -38,7 +38,7 @@ my $nowindow = 1;
my $arch = arch();
my $av_pkgs;
my $need_update = 0;
-
+my $confpers = "$ENV{HOME}/.mdkonline";
my $conffile = '/etc/sysconfig/mdkonline';
my %state = (
@@ -108,6 +108,7 @@ $eventbox->signal_connect(button_press_event => sub {
$_[1]->button == 3 && $menu and $menu->popup(undef, undef, undef, undef, $_[1]->button, $_[1]->time);
});
+shouldStart();
checkUpdates();
cronUpdate();
@@ -264,6 +265,10 @@ sub browser {
sub displayLogs {
system "/usr/sbin/logdrake --explain=drakxtools &"
}
+sub shouldStart() {
+ my %p = getVarsFromSh($confpers);
+ $p{AUTOSTART} eq 'FALSE' and mainQuit();
+}
sub setState {
my $state_type = shift;
my $arr = $state{$state_type}{menu};
@@ -278,10 +283,16 @@ sub setState {
}
$menu->append(gtkshow(Gtk2::SeparatorMenuItem->new));
$menu->append(gtksignal_connect(gtkshow(Gtk2::MenuItem->new_with_label(N("About.."))), activate => sub { about() }));
- $menu->append(gtksignal_connect(gtkshow(Gtk2::MenuItem->new_with_label(N("Quit"))), activate => sub { Gtk2->main_quit }));
+ $menu->append(gtksignal_connect(gtkshow(Gtk2::MenuItem->new_with_label(N("Quit"))), activate => sub { mainQuit() }));
$menu
}
sub about {
my $b = browser();
system("$b " . "https://mandrakeonline.net/info.php" . "&")
}
+sub mainQuit() {
+ output_with_perm $confpers, 644,
+ qq(AUTOSTART=false
+);
+ Gtk2->main_quit
+}