summaryrefslogtreecommitdiffstats
path: root/mdkapplet-restricted-helper
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 /mdkapplet-restricted-helper
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
Diffstat (limited to 'mdkapplet-restricted-helper')
-rwxr-xr-xmdkapplet-restricted-helper19
1 files changed, 19 insertions, 0 deletions
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"));