summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2007-03-20 15:21:06 +0000
committerThierry Vignaud <tv@mandriva.org>2007-03-20 15:21:06 +0000
commit1caa8d5bdfd75dd6b272c190e1c92d84bed18d17 (patch)
tree1f533a43e2d2aaf7b0a7d90f74b4377f40b0550a
parentd29cf6995bbd5bddbf1334466f92f4f80c6bb2da (diff)
downloadmgaonline-1caa8d5bdfd75dd6b272c190e1c92d84bed18d17.tar
mgaonline-1caa8d5bdfd75dd6b272c190e1c92d84bed18d17.tar.gz
mgaonline-1caa8d5bdfd75dd6b272c190e1c92d84bed18d17.tar.bz2
mgaonline-1caa8d5bdfd75dd6b272c190e1c92d84bed18d17.tar.xz
mgaonline-1caa8d5bdfd75dd6b272c190e1c92d84bed18d17.zip
when there's no media at all or when all update media are disabled,
run source media manager on right click
-rwxr-xr-xmdkapplet7
1 files changed, 6 insertions, 1 deletions
diff --git a/mdkapplet b/mdkapplet
index de2b7fc8..af4f79b7 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -177,7 +177,12 @@ gtkadd(my $icon = Gtk2::TrayIcon->new("MdkApplet"),
#$icon->shape_combine_mask($img, 0, 0);
$eventbox->signal_connect(button_press_event => sub {
if ($_[1]->button == 1) {
- installUpdates() if $state_global eq 'updates';
+ my %actions = (
+ no_update_medium => sub { fork_exec('/usr/sbin/edit-urpm-sources.pl') },
+ no_enabled_medium => sub { fork_exec('/usr/sbin/edit-urpm-sources.pl') },
+ updates => \&installUpdates,
+ );
+ $actions{$state_global}->() if ref $actions{$state_global};
} elsif ($_[1]->button == 3) {
$menu and $menu->popup(undef, undef, undef, undef, $_[1]->button, $_[1]->time);
}