summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Master/tlpkg/installer/install-menu-perltk.pl16
1 files changed, 15 insertions, 1 deletions
diff --git a/Master/tlpkg/installer/install-menu-perltk.pl b/Master/tlpkg/installer/install-menu-perltk.pl
index 6a9cb99ef68..d7ef1029bbb 100644
--- a/Master/tlpkg/installer/install-menu-perltk.pl
+++ b/Master/tlpkg/installer/install-menu-perltk.pl
@@ -844,7 +844,9 @@ sub menu_select_binsystems {
$f2 = $sw->Frame;
my $f2l = $f2->Frame;
foreach my $sys (sort @diskarchs) {
- $f2l->Checkbutton(-variable => \$vars{"binary_$sys"}, -text => platform_desc($sys))->pack(-anchor => 'w');
+ $f2l->Checkbutton(-variable => \$vars{"binary_$sys"},
+ -command => sub { check_on_removal($sw, $sys); },
+ -text => platform_desc($sys))->pack(-anchor => 'w');
}
$f2l->pack(-side => 'left');
$f2->pack(-padx => "2m", -pady => "2m");
@@ -858,6 +860,18 @@ sub menu_select_binsystems {
$sw->bind('<Escape>' => [ $cancelbutton, 'Invoke']);
}
+sub check_on_removal {
+ my $arch_frame = shift;
+ my $a = shift;
+ if (!$vars{"binary_$a"} && $a eq $vars{'this_platform'}) {
+ # removal not supported
+ $vars{"binary_$a"} = 1;
+ $arch_frame->Dialog(-title => __("Warning"),
+ -text => __("Removals of the main platform not possible!"),
+ -buttons => [ __("Ok") ])->Show;
+ }
+}
+
sub menu_set_text {
my $w = shift;