diff options
author | Norbert Preining <preining@logic.at> | 2009-08-13 00:44:13 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2009-08-13 00:44:13 +0000 |
commit | 4cfe1e6b123875f985f4f6a8ddb333aed5657d9e (patch) | |
tree | 5a69d69148350a5067ba587890a9626348978d6d /Master | |
parent | 674a5dba8d0f7e43a3ee1f5967e59424734d4567 (diff) |
fix tlmgr gui configuration hickup, $key is not lexically scoped so only
the last definition was the counting one.
git-svn-id: svn://tug.org/texlive/trunk@14636 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf/scripts/texlive/tlmgrgui/gui-config.pl | 148 |
1 files changed, 67 insertions, 81 deletions
diff --git a/Master/texmf/scripts/texlive/tlmgrgui/gui-config.pl b/Master/texmf/scripts/texlive/tlmgrgui/gui-config.pl index 3481691ea0b..2fe9bacc729 100644 --- a/Master/texmf/scripts/texlive/tlmgrgui/gui-config.pl +++ b/Master/texmf/scripts/texlive/tlmgrgui/gui-config.pl @@ -46,36 +46,29 @@ push @config_set_r, -command => sub { menu_default_location(); }); -{ - my $key; - - $key = "create_formats"; - push @config_set_l, - $back_config_set->Label(-text => __("Create formats on installation"), -anchor => "w"); - push @config_set_m, - $back_config_set->Label(-textvariable => \$defaults{$key}); - push @config_set_r, - $back_config_set->Button(-text => __("Toggle"), - -command => sub { toggle_setting($key); }); +push @config_set_l, + $back_config_set->Label(-text => __("Create formats on installation"), -anchor => "w"); +push @config_set_m, + $back_config_set->Label(-textvariable => \$defaults{"create_formats"}); +push @config_set_r, + $back_config_set->Button(-text => __("Toggle"), + -command => sub { toggle_setting("create_formats"); }); - $key = "install_docfiles"; - push @config_set_l, - $back_config_set->Label(-text => __("Install macro/font sources"), -anchor => "w"); - push @config_set_m, - $back_config_set->Label(-textvariable => \$defaults{$key}); - push @config_set_r, - $back_config_set->Button(-text => __("Toggle"), - -command => sub { toggle_setting($key); }); +push @config_set_l, + $back_config_set->Label(-text => __("Install macro/font sources"), -anchor => "w"); +push @config_set_m, + $back_config_set->Label(-textvariable => \$defaults{"install_srcfiles"}); +push @config_set_r, + $back_config_set->Button(-text => __("Toggle"), + -command => sub { toggle_setting("install_srcfiles"); }); - $key = "install_srcfiles"; - push @config_set_l, - $back_config_set->Label(-text => __("Install macro/font docs"), -anchor => "w"); - push @config_set_m, - $back_config_set->Label(-textvariable => \$defaults{$key}); - push @config_set_r, - $back_config_set->Button(-text => __("Toggle"), - -command => sub { toggle_setting($key); }); -} +push @config_set_l, + $back_config_set->Label(-text => __("Install macro/font docs"), -anchor => "w"); +push @config_set_m, + $back_config_set->Label(-textvariable => \$defaults{"install_docfiles"}); +push @config_set_r, + $back_config_set->Button(-text => __("Toggle"), + -command => sub { toggle_setting("install_docfiles"); }); push @config_set_l, $back_config_set->Label(-text => __("Default backup directory"), -anchor => "w"); @@ -102,60 +95,53 @@ push @config_set_r, -command => sub { select_autobackup($p); }, -anchor => "w"); if (!win32()) { - { - my $key; + push @config_set_l, + $back_config_set->Label(-text => __("Link destination for programs"), -anchor => "w"); + push @config_set_m, + $back_config_set->Label(-textvariable => \$defaults{"sys_bin"}); + push @config_set_r, + $back_config_set->Button(-text => __("Change"), + -command => sub { + my $dir = $back_config->chooseDirectory(); + if (defined($dir) && ($defaults{"sys_bin"} ne $dir)) { + # see warning concerning UTF8 or other encoded dir names!! + $localtlpdb->option("sys_bin", $dir); + $defaults{"sys_bin"} = $dir; + $localtlpdb->save; + } + }); - $key = "sys_bin"; - push @config_set_l, - $back_config_set->Label(-text => __("Link destination for programs"), -anchor => "w"); - push @config_set_m, - $back_config_set->Label(-textvariable => \$defaults{$key}); - push @config_set_r, - $back_config_set->Button(-text => __("Change"), - -command => sub { - my $dir = $back_config->chooseDirectory(); - if (defined($dir) && ($defaults{$key} ne $dir)) { - # see warning concerning UTF8 or other encoded dir names!! - $localtlpdb->option($key, $dir); - $defaults{$key} = $dir; - $localtlpdb->save; - } - }); - - $key = "sys_info"; - push @config_set_l, - $back_config_set->Label(-text => __("Link destination for info docs"), -anchor => "w"); - push @config_set_m, - $back_config_set->Label(-textvariable => \$defaults{$key}); - push @config_set_r, - $back_config_set->Button(-text => __("Change"), - -command => sub { - my $dir = $back_config->chooseDirectory(); - if (defined($dir) && ($defaults{$key} ne $dir)) { - # see warning concerning UTF8 or other encoded dir names!! - $localtlpdb->option($key, $dir); - $defaults{$key} = $dir; - $localtlpdb->save; - } - }); - - $key = "sys_man"; - push @config_set_l, - $back_config_set->Label(-text => __("Link destination for man pages"), -anchor => "w"); - push @config_set_m, - $back_config_set->Label(-textvariable => \$defaults{$key}); - push @config_set_r, - $back_config_set->Button(-text => __("Change"), - -command => sub { - my $dir = $back_config->chooseDirectory(); - if (defined($dir) && ($defaults{$key} ne $dir)) { - # see warning concerning UTF8 or other encoded dir names!! - $localtlpdb->option($key, $dir); - $defaults{$key} = $dir; - $localtlpdb->save; - } - }); - } + push @config_set_l, + $back_config_set->Label(-text => __("Link destination for info docs"), -anchor => "w"); + push @config_set_m, + $back_config_set->Label(-textvariable => \$defaults{"sys_info"}); + push @config_set_r, + $back_config_set->Button(-text => __("Change"), + -command => sub { + my $dir = $back_config->chooseDirectory(); + if (defined($dir) && ($defaults{"sys_info"} ne $dir)) { + # see warning concerning UTF8 or other encoded dir names!! + $localtlpdb->option("sys_info", $dir); + $defaults{"sys_info"} = $dir; + $localtlpdb->save; + } + }); + + push @config_set_l, + $back_config_set->Label(-text => __("Link destination for man pages"), -anchor => "w"); + push @config_set_m, + $back_config_set->Label(-textvariable => \$defaults{"sys_man"}); + push @config_set_r, + $back_config_set->Button(-text => __("Change"), + -command => sub { + my $dir = $back_config->chooseDirectory(); + if (defined($dir) && ($defaults{"sys_man"} ne $dir)) { + # see warning concerning UTF8 or other encoded dir names!! + $localtlpdb->option("sys_man", $dir); + $defaults{"sys_man"} = $dir; + $localtlpdb->save; + } + }); } if (win32()) { |