summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-12-04 14:23:23 +0000
committerThierry Vignaud <tv@mandriva.org>2008-12-04 14:23:23 +0000
commit2d7c0c7ad703c69ee212b410f7fef22eb172343f (patch)
treed5e5fd813e7640bebe2fd35407df29093ac643bd
parent93b0c74f5328ae138689075ca0d1ea837ac50aba (diff)
downloadmgaonline-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
-rw-r--r--NEWS3
-rwxr-xr-xmdkapplet-restricted-helper9
2 files changed, 12 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 4ca422b8..9e012d71 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+- mdkapplet-restricted-helper
+ o display a success message when media were successfully added
+
Version 2.71 - 3 December 2008
- mdkapplet
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;
}