diff options
author | Thierry Vignaud <tv@mandriva.org> | 2008-09-04 13:18:52 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2008-09-04 13:18:52 +0000 |
commit | f1cfca44fa44c460366e424700b964ae68120ea1 (patch) | |
tree | 0df2e94a50f8bee8a2a08bc58673ff0ba09c49b2 /mdkapplet | |
parent | 775783f5e0f88b2a50d9c804846e2447755c2697 (diff) | |
download | mgaonline-f1cfca44fa44c460366e424700b964ae68120ea1.tar mgaonline-f1cfca44fa44c460366e424700b964ae68120ea1.tar.gz mgaonline-f1cfca44fa44c460366e424700b964ae68120ea1.tar.bz2 mgaonline-f1cfca44fa44c460366e424700b964ae68120ea1.tar.xz mgaonline-f1cfca44fa44c460366e424700b964ae68120ea1.zip |
(add_media) factorize code
Diffstat (limited to 'mdkapplet')
-rwxr-xr-x | mdkapplet | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -211,8 +211,8 @@ $icon->signal_connect(popup_menu => sub { }); $icon->signal_connect(activate => sub { 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') }, + no_update_medium => \&add_media, + no_enabled_medium => \&add_media, updates => \&installUpdates, new_distribution => \&upgrade, ); @@ -372,6 +372,10 @@ sub upgrade() { $mdv_update_pid = fork_exec('gurpmi', '--auto', '--auto-select', '--silent-success', if_($root, "--urpmi-root=$root")); } +sub add_media() { + fork_exec('/usr/sbin/edit-urpm-sources.pl'); +} + sub installUpdates() { my $binfile = $0; return if $mdv_update_pid; |