summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2010-07-10 14:02:54 +0000
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2010-07-10 14:02:54 +0000
commitfbbc1b658be3216436ea8b48a625ddf240439f4e (patch)
tree9cb1381142b2034b340298f4df215ac25b6b2d8f /Master
parentb679e6d34a52ba5796ec09a1a7866fd92e8d2b62 (diff)
More explicit text for paper size in perltk installer.
git-svn-id: svn://tug.org/texlive/trunk@19340 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/tlpkg/installer/install-menu-perltk.pl18
1 files changed, 11 insertions, 7 deletions
diff --git a/Master/tlpkg/installer/install-menu-perltk.pl b/Master/tlpkg/installer/install-menu-perltk.pl
index 7420160ad98..dce28f675ac 100644
--- a/Master/tlpkg/installer/install-menu-perltk.pl
+++ b/Master/tlpkg/installer/install-menu-perltk.pl
@@ -55,6 +55,9 @@ $::fileassocdesc[0] = __("None");
$::fileassocdesc[1] = __("Only new");
$::fileassocdesc[2] = __("All");
+$::letterdesc[0] = __('A4');
+$::letterdesc[1] = __('letter');
+
my $mw;
my $subframe;
my $mainwindow;
@@ -71,7 +74,7 @@ my $optletterstate;
my $optfmtstate;
my $optsrcstate;
my $optdocstate;
-my $letteryesno = ( $vars{'option_letter'} ? __("Yes") : __("No") );
+my $letteryesno = $::letterdesc[$vars{'option_letter'}];
my $fmtyesno = ( $vars{'option_fmt'} ? __("Yes") : __("No") );
my $srcyesno = ( $vars{'option_src'} ? __("Yes") : __("No") );
my $deskintyesno = ( $vars{'option_desktop_integration'} ? __("Yes") : __("No") );
@@ -251,9 +254,9 @@ sub run_menu_perltk {
$row++;
# optpaper
- $fr->Label(-text => __('Use letter size instead of A4 by default'), -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
+ $fr->Label(-text => __('Default paper size'), -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
$fr->Label(-anchor => 'w', -textvariable => \$letteryesno)->grid(-row => $row, -column => 2, -padx => "2m");
- $fr->Button(-text => __("Toggle"), -command => sub { toggle_and_set_opt_variable(\$vars{'option_letter'}, \$letteryesno); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
+ $fr->Button(-text => __("Toggle"), -command => sub { toggle_and_set_opt_variable(\$vars{'option_letter'}, \$letteryesno, \@::letterdesc); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
$row++;
$fr->Label(-text => __('Allow execution of restricted list of programs via \write18'), -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
@@ -836,7 +839,7 @@ sub menu_update_texts {
menu_set_collections_text;
menu_set_binbutton_text;
menu_set_schemebutton_text;
- $optletterstate = ($vars{'option_letter'} ? __("Yes") : __("No"));
+ $optletterstate = $::letterdesc[$vars{'option_letter'}];
$optfmtstate = ($vars{'option_fmt'} ? __("Yes") : __("No"));
$optsrcstate = ($vars{'option_src'} ? __("Yes") : __("No"));
$optdocstate = ($vars{'option_doc'} ? __("Yes") : __("No"));
@@ -911,10 +914,11 @@ sub dump_vars_stdout {
}
sub toggle_and_set_opt_variable {
- my ($varsref, $toggleref) = @_;
- $$toggleref = ($$toggleref eq __("Yes")) ? __("No") : __("Yes");
+ my ($varsref, $toggleref, $choicesref) = @_;
+ my ($no, $yes) = $choicesref ? @$choicesref : (__('No'), __('Yes'));
+ $$toggleref = ($$toggleref eq $yes) ? $no : $yes;
$$varsref = 0;
- $$varsref = 1 if ($$toggleref eq __("Yes"));
+ $$varsref = 1 if ($$toggleref eq $yes);
calc_depends();
menu_update_texts();
}