diff options
author | Norbert Preining <preining@logic.at> | 2009-07-05 02:16:49 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2009-07-05 02:16:49 +0000 |
commit | 1af4b36938af7564436742938138fc12446283f7 (patch) | |
tree | 4b4ae3caa4bcdc269fd92200a185401fa4e0205c | |
parent | 023d6777e67772f6fa772d5d174010399643f4ba (diff) |
support setting file_assocs to 0,1,2 in perltk installer
git-svn-id: svn://tug.org/texlive/trunk@14111 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Master/tlpkg/installer/install-menu-perltk.pl | 30 | ||||
-rw-r--r-- | Master/tlpkg/installer/install-translations.pl | 3 | ||||
-rw-r--r-- | Master/tlpkg/installer/installer-options.txt | 6 |
3 files changed, 33 insertions, 6 deletions
diff --git a/Master/tlpkg/installer/install-menu-perltk.pl b/Master/tlpkg/installer/install-menu-perltk.pl index e2ab24f0083..da4daf3aaf2 100644 --- a/Master/tlpkg/installer/install-menu-perltk.pl +++ b/Master/tlpkg/installer/install-menu-perltk.pl @@ -24,6 +24,7 @@ require Tk::DialogBox; require Tk::PNG; require Tk::ROText; require Tk::ProgressBar; +require Tk::BrowseEntry; if ($::alternative_selector) { require Tk::DirTree; @@ -72,7 +73,7 @@ my $fmtyesno = ( $vars{'option_fmt'} ? $text{'yes'} : $text{'no'} ); my $srcyesno = ( $vars{'option_src'} ? $text{'yes'} : $text{'no'} ); my $deskintyesno = ( $vars{'option_desktop_integration'} ? $text{'yes'} : $text{'no'} ); my $pathadjyesno = ( $vars{'option_path'} ? $text{'yes'} : $text{'no'} ); -my $fileassocsyesno = ( $vars{'option_file_assocs'} ? $text{'yes'} : $text{'no'} ); +my $fileassocsyesno = $vars{'option_file_assocs'}; my $editoryesno = ( $vars{'addon_editor'} ? $text{'yes'} : $text{'no'} ); my $adminallyesno = ( $vars{'option_w32_multi_user'} ? $text{'yes'} : $text{'no'} ); my $docyesno = ( $vars{'option_doc'} ? $text{'yes'} : $text{'no'} ); @@ -281,8 +282,8 @@ sub run_menu_perltk { $row++; $fr->Label(-text => $labels{'fileassocs'}, -anchor => 'w')->grid(-row => $row, -column => 1, -sticky => 'w'); - $fr->Label(-anchor => 'w', -textvariable => \$fileassocsyesno)->grid(-row => $row, -column => 2, -padx => "2m"); - $fr->Button(-text => $text{'toggle'}, -command => sub { toggle_and_set_opt_variable(\$vars{'option_file_assocs'}, \$fileassocsyesno); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m"); + $fr->Label(-anchor => 'w', -textvariable => \$vars{'option_file_assocs'})->grid(-row => $row, -column => 2, -padx => "2m"); + $fr->Button(-text => $text{'change'}, -command => sub { menu_edit_file_assocs(); })->grid(-row => $row, -column => 3, -sticky => "ew", -padx => "2m"); if (admin()) { $row++; @@ -475,6 +476,29 @@ sub menu_edit_vars_value { $sw->bind('<Escape>' => [ $cancelbutton, 'Invoke']); } +sub menu_edit_file_assocs { + my $sw = $mainwindow->Toplevel(-title => $labels{'fileassocs'}); + $sw->transient($mainwindow); + $sw->grab(); + my $key = 'option_file_assocs'; + my $var = $vars{$key}; + $sw->Label(-text => $labels{"fileassocs"})->pack(-padx => "2m", -pady => "2m"); + my $opt = $sw->BrowseEntry(-autolistwidth => 1, + -variable => \$var); + $opt->insert("end", "0 -- $text{fa_dontchange}"); + $opt->insert("end", "1 -- $text{fa_onlynew}"); + $opt->insert("end", "2 -- $text{fa_all}"); + + $opt->pack(-padx => "2m", -pady => "2m"); + my $f = $sw->Frame; + my $okbutton = $f->Button(-text => $text{"ok"}, + -command => sub { $vars{$key} = substr($var,0,1); $sw->destroy; })->pack(-side => "left", -padx => "2m", -pady => "2m"); + my $cancelbutton = $f->Button(-text => $text{"cancel"}, -command => sub { $sw->destroy; })->pack(-side => "left", -padx => "2m", -pady => "2m"); + $f->pack; + $sw->bind('<Return>', [ $okbutton, 'Invoke' ]); + $sw->bind('<Escape>', [ $cancelbutton, 'Invoke' ]); +} + sub menu_select_scheme { my $sw = $mainwindow->Toplevel(-title => $labels{'scheme'}); diff --git a/Master/tlpkg/installer/install-translations.pl b/Master/tlpkg/installer/install-translations.pl index 93331015e2f..d31f7597440 100644 --- a/Master/tlpkg/installer/install-translations.pl +++ b/Master/tlpkg/installer/install-translations.pl @@ -105,6 +105,9 @@ our %text = (title => 'TeX Live 2009 Installation', instshort => 'Install', wizard => 'Go to Wizard', optiontitle => 'This screen allows you to configure some options', + fa_dontchange => "Don't change any file association", + fa_onlynew => "Create only new file associations", + fa_all => 'Create all file associatons', ); diff --git a/Master/tlpkg/installer/installer-options.txt b/Master/tlpkg/installer/installer-options.txt index abf279dff03..495c358b032 100644 --- a/Master/tlpkg/installer/installer-options.txt +++ b/Master/tlpkg/installer/installer-options.txt @@ -23,7 +23,7 @@ option_fmt 1 x x install-tl: sub do_postinst_stuff tlmgr: sub handle_execute_actions -option_file_assocs 0 w32 w32 +option_file_assocs 1 w32 w32 option("file_assocs") file associations and file type file type is always done @@ -34,7 +34,7 @@ option_file_assocs 0 w32 w32 install-tl: sub do_tlpdb_postactions TLMedia: remove_package, install_package -option_desktop_integration 0 (1 w32) w32 w32 w32 +option_desktop_integration 1 w32 w32 w32 option("desktop_integration") shortcuts etc currently effects w32 only @@ -65,7 +65,7 @@ option_letter 0 x x x use letter install-tl: sub do_postinst_stuff -option_path 0 x x +option_path 0 unix/1 win x x path adjustment not saved into the local TLPDB only for install time setting |