diff options
author | Thierry Vignaud <tv@mandriva.org> | 2008-12-04 14:23:23 +0000 |
---|---|---|
committer | Thierry Vignaud <tv@mandriva.org> | 2008-12-04 14:23:23 +0000 |
commit | 2d7c0c7ad703c69ee212b410f7fef22eb172343f (patch) | |
tree | d5e5fd813e7640bebe2fd35407df29093ac643bd /mdkapplet-restricted-helper | |
parent | 93b0c74f5328ae138689075ca0d1ea837ac50aba (diff) | |
download | mgaonline-2d7c0c7ad703c69ee212b410f7fef22eb172343f.tar mgaonline-2d7c0c7ad703c69ee212b410f7fef22eb172343f.tar.gz mgaonline-2d7c0c7ad703c69ee212b410f7fef22eb172343f.tar.bz2 mgaonline-2d7c0c7ad703c69ee212b410f7fef22eb172343f.tar.xz mgaonline-2d7c0c7ad703c69ee212b410f7fef22eb172343f.zip |
(add_restricted_medium) display a success message when media were successfully added
Diffstat (limited to 'mdkapplet-restricted-helper')
-rwxr-xr-x | mdkapplet-restricted-helper | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/mdkapplet-restricted-helper b/mdkapplet-restricted-helper index 11ac2a22..2db5afd3 100755 --- a/mdkapplet-restricted-helper +++ b/mdkapplet-restricted-helper @@ -108,6 +108,7 @@ sub get_from { $response; } +my $error; sub add_restricted_medium { my ($email, $password) = @_; @@ -119,6 +120,7 @@ sub add_restricted_medium { $in->ask_warn(N("Error"), N("An error occurred") . "\n" . $ref->{message}); goto &get_restricted_authentication; } else { + $error = 0; my $arch = urpm::cfg::get_arch(); actually_add_restricted_medium($ref, $password, $arch) or adding_media_failed(); @@ -127,10 +129,17 @@ sub add_restricted_medium { actually_add_restricted_medium($ref, $password, 'i586') or adding_media_failed(); } + if (!$error) { + #interactive->vnew->ask_okcancel(N("Error"), N("An error occurred while adding medium")); + my $w = ugtk2->new(N("Successfully added media %s.", 'Restricted'), grab => 1); + $w->_ask_okcancel(N("Successfully added media %s.", 'Restricted'), N("Ok"), undef); + ugtk2::main($w); + } } } sub adding_media_failed { + $error = 1; interactive->vnew->ask_warn(N("Error"), N("An error occurred while adding medium")); goto &get_restricted_authentication; } |