diff options
-rw-r--r-- | NEWS | 3 | ||||
-rwxr-xr-x | mdkapplet-restricted-helper | 19 |
2 files changed, 22 insertions, 0 deletions
@@ -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")); |