summaryrefslogtreecommitdiff
path: root/Master/tlpkg/installer
diff options
context:
space:
mode:
authorManuel Pégourié-Gonnard <mpg@elzevir.fr>2010-07-05 11:51:35 +0000
committerManuel Pégourié-Gonnard <mpg@elzevir.fr>2010-07-05 11:51:35 +0000
commitc4a2d6947cdfbd692cc0a3ff4807b9d4404768c6 (patch)
treef39d836a5361a83e1eb8290503bdd14a93b3da2e /Master/tlpkg/installer
parentd0b1f83adcb8c0f0296db5262b3f8bc93df00141 (diff)
Use "native" slashes for display in wizard too.
git-svn-id: svn://tug.org/texlive/trunk@19244 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/installer')
-rw-r--r--Master/tlpkg/installer/install-menu-wizard.pl23
1 files changed, 19 insertions, 4 deletions
diff --git a/Master/tlpkg/installer/install-menu-wizard.pl b/Master/tlpkg/installer/install-menu-wizard.pl
index 8e92cf77e0e..3626047b38f 100644
--- a/Master/tlpkg/installer/install-menu-wizard.pl
+++ b/Master/tlpkg/installer/install-menu-wizard.pl
@@ -61,6 +61,7 @@ my $prv;
my $nxt;
my $img;
my $dest;
+my $dest_display;
my $warning;
my $mw;
my $usedfont;
@@ -91,6 +92,18 @@ $::run_menu = \&run_menu_wizard;
# From here on only function definitions
# ####################################################################
+sub native_slashify {
+ my ($r) = @_;
+ $r =~ s/\//\\/g if win32();
+ return $r;
+}
+
+sub forward_slashify {
+ my ($r) = @_;
+ $r =~ s/\\/\//g if win32();
+ return $r;
+}
+
sub setup_hooks_wizard {
@::info_hook = ();
push @::info_hook,
@@ -130,6 +143,7 @@ sub run_menu_wizard {
setup_hooks_wizard();
$dest = $vars{'TEXDIR'};
+ $dest_display = native_slashify($dest);
my $img = $mw->Photo(-format => 'png', -file => "$::installerdir/tlpkg/installer/texlive.png");
$mw->Label(-image => $img, -background => "#0078b8")->place(-x => 0, -y => 0);
@@ -198,7 +212,7 @@ sub ask_path {
}
$counter->configure(-text => "2/5");
my $lab = $fmain->Label(-text => __('Destination folder:'));
- my $val = $fmain->Label(-textvar => \$dest);
+ my $val = $fmain->Label(-textvar => \$dest_display);
my $but = $fmain->Button(-text => __("Change"), -command => \&change_path,
-relief => "ridge", -width => 10);
@@ -273,12 +287,12 @@ sub change_path {
$sw->transient($mw);
$sw->grab();
$sw->Label(-text => __('Enter path for') . " TEXDIR: ")->pack(-padx => "2m", -pady => "2m");
- my $entry = $sw->Entry(-textvariable => $val, -width => 60);
+ my $entry = $sw->Entry(-textvariable => native_slashify($val), -width => 60);
$entry->pack(-padx => "2m", -pady => "2m")->focus();
my $f = $sw->Frame;
my $okbutton = $f->Button(-text => __('Ok'), -width => 10,
-relief => "ridge",
- -command => sub { $val = $entry->get; callback_change_texdir($val) ; $sw->destroy })->pack(-side => 'left', -padx => "2m", -pady => "2m");
+ -command => sub { $val = forward_slashify($entry->get); callback_change_texdir($val) ; $sw->destroy })->pack(-side => 'left', -padx => "2m", -pady => "2m");
my $cancelbutton = $f->Button(-text => __('Cancel'), -relief => "ridge",
-width => 10,
-command => sub { $sw->destroy })->pack(-side => 'right', -padx => "2m", -pady => "2m");
@@ -314,6 +328,7 @@ sub callback_change_texdir {
}
$vars{'TEXDIRW'}=$vars{'TEXDIR'};
$dest = $vars{'TEXDIR'};
+ $dest_display = native_slashify($dest); # useful as -textvar value in Labels
check_show_warning();
}
@@ -395,7 +410,7 @@ sub ask_go {
my $ytmp = 170;
$fmain->Label(-justify => "left",
- -text => __("Destination folder:") . "\t $dest")->place(-x => 0, -y => $ytmp);
+ -text => __("Destination folder:") . "\t $dest_display")->place(-x => 0, -y => $ytmp);
$ytmp += 20;
for my $o (@opts_list) {