summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mandriva.org>2008-12-09 06:33:13 +0000
committerThierry Vignaud <tv@mandriva.org>2008-12-09 06:33:13 +0000
commit2d9a805c87efe985092fd91b50a2510c5a1cbe80 (patch)
treeb2cbbc7c4d24447586924aae1d84d96d9d81d1ef
parent1297d2b2eb89deabf175c2ac539049ffe5a083df (diff)
downloadmgaonline-2d9a805c87efe985092fd91b50a2510c5a1cbe80.tar
mgaonline-2d9a805c87efe985092fd91b50a2510c5a1cbe80.tar.gz
mgaonline-2d9a805c87efe985092fd91b50a2510c5a1cbe80.tar.bz2
mgaonline-2d9a805c87efe985092fd91b50a2510c5a1cbe80.tar.xz
mgaonline-2d9a805c87efe985092fd91b50a2510c5a1cbe80.zip
(add_restricted_medium,no_rigths_dialog) warn if user's rigths have
expired or he's not subscribed
-rw-r--r--NEWS3
-rwxr-xr-xmdkapplet-restricted-helper19
2 files changed, 22 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 1eefa367..72dd961f 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+- mdkapplet-restricted-helper
+ o warn if user's rigths have expired or he's not subscribed
+
Version 2.71.1 - 4 December 2008
- mdkapplet-restricted-helper
diff --git a/mdkapplet-restricted-helper b/mdkapplet-restricted-helper
index 95da3234..bbf5284c 100755
--- a/mdkapplet-restricted-helper
+++ b/mdkapplet-restricted-helper
@@ -120,6 +120,8 @@ sub add_restricted_medium {
my $in = interactive->vnew;
$in->ask_warn(N("Error"), N("An error occurred") . "\n" . $ref->{message});
goto &get_restricted_authentication;
+ } elsif ($ref->{data}{'can-access-restricted-repositories'} ne 'YES') {
+ no_rigths_dialog();
} else {
$error = 0;
my $arch = urpm::cfg::get_arch();
@@ -139,6 +141,23 @@ sub add_restricted_medium {
}
}
+sub no_rigths_dialog {
+ my $w = ugtk2->new(N("Adding an additional package medium"), width => $width + 20);
+
+ fill_n_run_portable_dialog(
+ $w,
+ [
+ get_banner(N("Adding an additional package medium")),
+ gtknew('Label_Left', text => N("Your Mandriva account does not have Powerpack download subscription enabled."),
+ @common),
+ gtknew('HButtonBox', layout => 'start', children_tight => [
+ interactive::gtk::add_padding(
+ new_link_button('https://my.mandriva.com/powerpack/', N("More information")))
+ ]),
+ create_okcancel($w, N("Close"), undef),
+ ]);
+}
+
sub adding_media_failed {
$error = 1;
interactive->vnew->ask_warn(N("Error"), N("An error occurred while adding medium"));