From 1caa8d5bdfd75dd6b272c190e1c92d84bed18d17 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Tue, 20 Mar 2007 15:21:06 +0000 Subject: when there's no media at all or when all update media are disabled, run source media manager on right click --- mdkapplet | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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); } -- cgit v1.2.1