summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Preining <preining@logic.at>2008-08-06 19:17:01 +0000
committerNorbert Preining <preining@logic.at>2008-08-06 19:17:01 +0000
commit75bae151c9c8080684670bb86d490878baea7770 (patch)
tree1b413862092ab849e6575079bb216a0c1451823d
parent14ad8f985194509cbe11e1ff86972bc0226399ad (diff)
install GUI:
- add spacing around buttons and make them all the same size - system integration (link generation) dialog: better layout git-svn-id: svn://tug.org/texlive/trunk@10111 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/tlpkg/installer/install-menu-perltk.pl75
1 files changed, 43 insertions, 32 deletions
diff --git a/Master/tlpkg/installer/install-menu-perltk.pl b/Master/tlpkg/installer/install-menu-perltk.pl
index 04eb4ef8a69..2dad77ca0f2 100644
--- a/Master/tlpkg/installer/install-menu-perltk.pl
+++ b/Master/tlpkg/installer/install-menu-perltk.pl
@@ -242,7 +242,7 @@ sub run_menu {
$fr->Label(-text => $labels{'binsys'}, -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
$bintextbutton = $fr->Label(-anchor => 'w');
$bintextbutton->grid(-row => $row, -column => 2, -padx => "2m");
- $fr->Button(-text => $text{'change'}, -command => sub { menu_select_binsystems(); })->grid(-row => $row, -column => 3);
+ $fr->Button(-text => $text{'change'}, -command => sub { menu_select_binsystems(); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
}
$row++;
@@ -251,7 +251,7 @@ sub run_menu {
$fr->Label(-text => $labels{'scheme'}, -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
$schemebutton = $fr->Label(-anchor => 'w');
$schemebutton->grid(-row => $row, -column => 2, -padx => "2m");
- $fr->Button(-text => $text{'change'}, -command => sub { menu_select_scheme(); })->grid(-row => $row, -column => 3);
+ $fr->Button(-text => $text{'change'}, -command => sub { menu_select_scheme(); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
$row++;
@@ -261,13 +261,13 @@ sub run_menu {
$row++;
# standard collection line
$fr->Label(-text => $labels{'stdcoll'}, -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
- $fr->Button(-text => $text{'change'}, -command => sub { menu_select_standard_collections(); })->grid(-row => $row, -column => 3);
+ $fr->Button(-text => $text{'change'}, -command => sub { menu_select_standard_collections(); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
$row++;
# lang collection line
$fr->Label(-text => $labels{'langcoll'}, -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
$langcoltext = $fr->Label(-anchor => 'w')->grid(-row => $row, -column => 2, -padx => "2m");
- $fr->Button( -text => $text{'change'}, -command => sub { menu_select_lang_collections(); })->grid(-row => $row, -column => 3);
+ $fr->Button( -text => $text{'change'}, -command => sub { menu_select_lang_collections(); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
$row++;
$collectionstext = $fr->Label();
@@ -281,31 +281,31 @@ sub run_menu {
# texdir line
$fr->Label(-text => $labels{'texdir'}, -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
$texdirtext = $fr->Label(-anchor => 'w')->grid(-row => $row, -column => 2, -padx => "2m");
- $fr->Button(-text => $text{'change'}, -command => sub { menu_edit_vars_value("TEXDIR"); })->grid(-row => $row, -column => 3);
+ $fr->Button(-text => $text{'change'}, -command => sub { menu_edit_vars_value("TEXDIR"); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
$row++;
# texmflocal line
$fr->Label(-text => $labels{'localdir'}, -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
$texmflocaltext = $fr->Label(-anchor => 'w')->grid(-row => $row, -column => 2, -padx => "2m");
- $fr->Button(-text => $text{'change'}, -command => sub { menu_edit_vars_value("TEXMFLOCAL"); })->grid(-row => $row, -column => 3);
+ $fr->Button(-text => $text{'change'}, -command => sub { menu_edit_vars_value("TEXMFLOCAL"); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
$row++;
# texmfsysvar line
$fr->Label(-text => $labels{'sysvardir'}, -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
$texmfsysvartext = $fr->Label(-anchor => 'w')->grid(-row => $row, -column => 2, -padx => "2m");
- $fr->Button(-text => $text{'change'}, -command => sub { menu_edit_vars_value("TEXMFSYSVAR"); })->grid(-row => $row, -column => 3);
+ $fr->Button(-text => $text{'change'}, -command => sub { menu_edit_vars_value("TEXMFSYSVAR"); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
$row++;
# texmfsysvar line
$fr->Label(-text => $labels{'sysconfigdir'}, -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
$texmfsysconfigtext = $fr->Label(-anchor => 'w')->grid(-row => $row, -column => 2, -padx => "2m");
- $fr->Button(-text => $text{'change'}, -command => sub { menu_edit_vars_value("TEXMFSYSCONFIG"); })->grid(-row => $row, -column => 3);
+ $fr->Button(-text => $text{'change'}, -command => sub { menu_edit_vars_value("TEXMFSYSCONFIG"); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
$row++;
# texmfhome line
$fr->Label(-text => $labels{'texmfhome'}, -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
$texmfhometext = $fr->Label(-anchor => 'w')->grid(-row => $row, -column => 2, -padx => "2m");
- $fr->Button(-text => $text{'change'}, -command => sub { menu_edit_vars_value("TEXMFHOME"); })->grid(-row => $row, -column => 3);
+ $fr->Button(-text => $text{'change'}, -command => sub { menu_edit_vars_value("TEXMFHOME"); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
$row++;
# Options
@@ -315,25 +315,25 @@ sub run_menu {
# optpaper
$fr->Label(-text => $labels{'optletter'}, -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 => $text{'toggle'}, -command => sub { toggle_and_set_opt_variable(\$vars{'option_letter'}, \$letteryesno); })->grid(-row => $row, -column => 3);
+ $fr->Button(-text => $text{'toggle'}, -command => sub { toggle_and_set_opt_variable(\$vars{'option_letter'}, \$letteryesno); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
$row++;
$fr->Label(-text => $labels{'optfmt'}, -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
$fr->Label(-anchor => 'w', -textvariable => \$fmtyesno)->grid(-row => $row, -column => 2, -padx => "2m");
- $fr->Button(-text => $text{'toggle'}, -command => sub { toggle_and_set_opt_variable(\$vars{'option_fmt'}, \$fmtyesno); })->grid(-row => $row, -column => 3);
+ $fr->Button(-text => $text{'toggle'}, -command => sub { toggle_and_set_opt_variable(\$vars{'option_fmt'}, \$fmtyesno); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
if ($vars{'doc_splitting_supported'}) {
$row++;
$fr->Label(-text => $labels{'optdoc'}, -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
$fr->Label(-anchor => 'w', -textvariable => \$docyesno)->grid(-row => $row, -column => 2, -padx => "2m");
- $fr->Button(-text => $text{'toggle'}, -command => sub { toggle_and_set_opt_variable(\$vars{'option_doc'}, \$docyesno); })->grid(-row => $row, -column => 3);
+ $fr->Button(-text => $text{'toggle'}, -command => sub { toggle_and_set_opt_variable(\$vars{'option_doc'}, \$docyesno); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
}
if ($vars{'src_splitting_supported'}) {
$row++;
$fr->Label(-text => $labels{'optsrc'}, -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
$fr->Label(-anchor => 'w', -textvariable => \$srcyesno)->grid(-row => $row, -column => 2, -padx => "2m");
- $fr->Button(-text => $text{'toggle'}, -command => sub { toggle_and_set_opt_variable(\$vars{'option_src'}, \$srcyesno); })->grid(-row => $row, -column => 3);
+ $fr->Button(-text => $text{'toggle'}, -command => sub { toggle_and_set_opt_variable(\$vars{'option_src'}, \$srcyesno); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
}
if (unix()) {
@@ -341,9 +341,10 @@ sub run_menu {
# Symlinks
$fr->Label(-text => "------- $text{'sysint'} -------")->grid(-row => $row, -column => 1,-columnspan => 3);
+ $row++;
$fr->Label(-text => $labels{'symlink'}, -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w');
$symlinktext = $fr->Label(-anchor => 'w')->grid(-row => $row, -column => 2, -padx => "2m");
- $fr->Button(-text => $text{'change'}, -command => sub { menu_select_symlink(); })->grid(-row => $row, -column => 3);
+ $fr->Button(-text => $text{'change'}, -command => sub { menu_select_symlink(); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m");
}
# install/cancel buttons
@@ -564,10 +565,26 @@ sub menu_select_lang_collections {
sub menu_select_symlink {
our ($lbin,$lman,$linfo);
our $osym = $vars{'option_symlinks'};
+ our ($binlab,$binb,$manlab,$manb,$infolab,$infob);
sub set_unset_buttons {
$lbin = ($osym ? $vars{'sys_bin'} : '');
$linfo = ($osym ? $vars{'sys_info'} : '');
$lman = ($osym ? $vars{'sys_man'} : '');
+ if ($osym) {
+ $binlab->grid(-row => 2, -column => 1, -sticky => "w", -padx => "2m");
+ $binb->grid(-row => 2, -column => 2, -sticky => "ew", -padx => "2m");
+ $manlab->grid(-row => 3, -column => 1, -sticky => "w", -padx => "2m");
+ $manb->grid(-row => 3, -column => 2, -sticky => "ew", -padx => "2m");
+ $infolab->grid(-row => 4, -column => 1, -sticky => "w", -padx => "2m");
+ $infob->grid(-row => 4, -column => 2, -sticky => "ew", -padx => "2m");
+ } else {
+ $infob->gridForget;
+ $infolab->gridForget;
+ $manb->gridForget;
+ $manlab->gridForget;
+ $binb->gridForget;
+ $binlab->gridForget;
+ }
}
sub return_callback {
if ($osym) {
@@ -584,29 +601,23 @@ sub menu_select_symlink {
$vars{'option_symlinks'} = $osym;
menu_update_texts();
}
- set_unset_buttons();
my $sw = $mainwindow->Toplevel(-title => $labels{'symlink'});
$sw->transient($mainwindow);
$sw->grab();
$sw->Checkbutton(-variable => \$osym,
-text => $text{'createsym'},
- -command => sub { set_unset_buttons(); } )->pack;
- my $fbin = $sw->Frame;
- $fbin->Label(-text => $text{'binto'})->pack(-side => 'left');
- my $binb = $fbin->Entry(-textvariable => \$lbin, -width => 30);
- $binb->pack(-side => 'right');
- $fbin->pack(-expand => 'x');
- my $fman = $sw->Frame;
- $fman->Label(-text => $text{'manto'})->pack(-side => 'left');
- my $manb = $fman->Entry(-textvariable => \$lman, -width => 30);
- $manb->pack(-side => 'right');
- $fman->pack(-expand => 'x');
- my $finfo = $sw->Frame;
- $finfo->Label(-text => $text{'infoto'})->pack(-side => 'left');
- my $infob = $finfo->Entry(-textvariable => \$linfo, -width => 30);
- $infob->pack(-side => 'right');
- $finfo->pack(-expand => 'x');
- my $f2 = $sw->Frame; $f2->pack(-expand => 'x');
+ -command => sub { set_unset_buttons(); } )->grid(-column => 1,
+ -row => 1,
+ -columnspan => 2,
+ -padx => "2m");
+ $binlab = $sw->Label(-text => $text{'binto'});
+ $binb = $sw->Entry(-textvariable => \$lbin);
+ $manlab = $sw->Label(-text => $text{'manto'});
+ $manb = $sw->Entry(-textvariable => \$lman);
+ $infolab = $sw->Label(-text => $text{'infoto'});
+ $infob = $sw->Entry(-textvariable => \$linfo);
+ set_unset_buttons();
+ my $f2 = $sw->Frame; $f2->grid(-column => 1, -columnspan => 2, -row => 5);
my $okbutton = $f2->Button(-text => $text{'ok'},
-command => sub { return_callback(); $sw->destroy })->pack(-side => 'left');
my $cancelbutton = $f2->Button(-text => $text{'cancel'},