diff options
author | Thierry Vignaud <tv@mandriva.org> | 2007-03-20 15:21:06 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2007-03-20 15:21:06 +0000 |
commit | 1caa8d5bdfd75dd6b272c190e1c92d84bed18d17 (patch) | |
tree | 1f533a43e2d2aaf7b0a7d90f74b4377f40b0550a /mdkapplet | |
parent | d29cf6995bbd5bddbf1334466f92f4f80c6bb2da (diff) | |
download | mgaonline-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
Diffstat (limited to 'mdkapplet')
-rwxr-xr-x | mdkapplet | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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); } |