diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-08-18 17:52:21 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-08-18 17:52:21 +0000 |
commit | 3c449c259f3c6325a00bf542511bb1ccbce55054 (patch) | |
tree | 31ff76977b035edd10a498a43cd3abd2ed1861d9 | |
parent | 42a56d315a86b9fa19d9330583a26a86c7453ab0 (diff) | |
download | drakx-backup-do-not-use-3c449c259f3c6325a00bf542511bb1ccbce55054.tar drakx-backup-do-not-use-3c449c259f3c6325a00bf542511bb1ccbce55054.tar.gz drakx-backup-do-not-use-3c449c259f3c6325a00bf542511bb1ccbce55054.tar.bz2 drakx-backup-do-not-use-3c449c259f3c6325a00bf542511bb1ccbce55054.tar.xz drakx-backup-do-not-use-3c449c259f3c6325a00bf542511bb1ccbce55054.zip |
big renaming of ask_from_entries_refH in ask_from and ask_from_entries_refH_powered in ask_from_
-rw-r--r-- | perl-install/Xconfigurator.pm | 6 | ||||
-rw-r--r-- | perl-install/any.pm | 26 | ||||
-rw-r--r-- | perl-install/install_interactive.pm | 4 | ||||
-rw-r--r-- | perl-install/install_steps_interactive.pm | 82 | ||||
-rw-r--r-- | perl-install/interactive.pm | 32 | ||||
-rw-r--r-- | perl-install/interactive_gtk.pm | 2 | ||||
-rw-r--r-- | perl-install/interactive_http.pm | 2 | ||||
-rw-r--r-- | perl-install/interactive_newt.pm | 4 | ||||
-rw-r--r-- | perl-install/network/ethernet.pm | 4 | ||||
-rw-r--r-- | perl-install/network/modem.pm | 2 | ||||
-rw-r--r-- | perl-install/network/netconnect.pm | 40 | ||||
-rw-r--r-- | perl-install/network/network.pm | 93 | ||||
-rw-r--r-- | perl-install/network/tools.pm | 40 | ||||
-rw-r--r-- | perl-install/printerdrake.pm | 30 | ||||
-rw-r--r-- | perl-install/proxy.pm | 98 | ||||
-rwxr-xr-x | perl-install/standalone/drakautoinst | 11 |
16 files changed, 239 insertions, 237 deletions
diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm index 9349a8e4e..f42131a67 100644 --- a/perl-install/Xconfigurator.pm +++ b/perl-install/Xconfigurator.pm @@ -479,7 +479,7 @@ sub optionsConfiguration($) { } @l = @l[0..9] if @l > 9; #- reduce list size to 10 for display - $in->ask_from_entries_refH('', _("Choose options for server"), \@l); + $in->ask_from('', _("Choose options for server"), \@l); } sub monitorConfiguration(;$$) { @@ -498,7 +498,7 @@ sub monitorConfiguration(;$$) { ($::auto_install ? $low_default_monitor : $in->ask_from_treelist(_("Monitor"), _("Choose a monitor"), '|', ['Custom', keys %monitors], $good_default)); if ($monitor->{type} eq 'Custom') { - $in->ask_from_entries_refH('', + $in->ask_from('', _("The two critical parameters are the vertical refresh rate, which is the rate at which the whole screen is refreshed, and most importantly the horizontal sync rate, which is the rate at which scanlines are displayed. @@ -1401,7 +1401,7 @@ sub main { $in->set_help('configureXmain') unless $::isStandalone; my $f; - $in->ask_from_entries_refH_powered( + $in->ask_from_( { title => 'XFdrake', messages => _("What do you want to do?"), diff --git a/perl-install/any.pm b/perl-install/any.pm index ffcc309a8..86abdcb70 100644 --- a/perl-install/any.pm +++ b/perl-install/any.pm @@ -146,7 +146,7 @@ sub setupBootloader { $b->{vga} ||= 'Normal'; if (arch !~ /ppc/) { - $in->ask_from_entries_refH('', _("Bootloader main options"), [ + $in->ask_from('', _("Bootloader main options"), [ { label => _("Bootloader to use"), val => \$bootloader, list => [ keys(%bootloaders) ], format => \&translate }, arch() =~ /sparc/ ? ( { label => _("Bootloader installation"), val => \$silo_install_lang, list => \@silo_install_lang }, @@ -178,7 +178,7 @@ sub setupBootloader { ) or return 0; } else { $b->{boot} = $partition_table_mac::bootstrap_part; - $in->ask_from_entries_refH('', _("Bootloader main options"), [ + $in->ask_from('', _("Bootloader main options"), [ { label => _("Bootloader to use"), val => \$bootloader, list => [ keys(%bootloaders) ], format => \&translate }, { label => _("Init Message"), val => \$b->{initmsg} }, { label => _("Boot device"), val => \$b->{boot}, list => [ map { "/dev/$_" } (map { $_->{device} } (grep { isAppleBootstrap($_) } @$fstab))], not_edit => !$::expert }, @@ -205,7 +205,7 @@ sub setupBootloader { while ($::expert || $more > 1) { $in->set_help(arch() =~ /sparc/ ? 'setupSILOAddEntry' : arch() =~ /ppc/ ? 'setupYabootAddEntry' : 'setupBootloaderAddEntry') unless $::isStandalone; my ($c, $e); - eval { $in->ask_from_entries_refH_powered( + eval { $in->ask_from_( { messages => _("Here are the different entries. @@ -287,7 +287,7 @@ if (arch() !~ /ppc/) { } } - if ($in->ask_from_entries_refH_powered( + if ($in->ask_from_( { if_($c ne "Add", cancel => _("Remove entry")), callbacks => { @@ -712,7 +712,7 @@ sub ask_users { member($u->{name}, map { $_->{name} } @$users) and $in->ask_warn('', _("This user name is already added")), return (1,0); return 0; }; - my $ret = $in->ask_from_entries_refH_powered( + my $ret = $in->ask_from_( { title => _("Add user"), messages => _("Enter a user\n%s", $names), ok => _("Accept user"), @@ -753,15 +753,15 @@ sub autologin { if (@wm && @users && !$o->{authentication}{NIS} && $o->{security} <= 2) { add2hash_($o, { autologin => $users[0] }); - $in->ask_from_entries_refH_powered( - { title => _("Autologin"), - messages => _('I can set up your computer to automatically log on one user. + $in->ask_from_( + { title => _("Autologin"), + messages => _('I can set up your computer to automatically log on one user. Do you want to use this feature?'), - ok => _("Yes"), - cancel => _("No") }, - [ { label => _("Choose the default user:"), val => \$o->{autologin}, list => [ '', @users ] }, - { label => _("Choose the window manager to run:"), val => \$o->{desktop}, list => \@wm } ] - ) + ok => _("Yes"), + cancel => _("No") }, + [ { label => _("Choose the default user:"), val => \$o->{autologin}, list => [ '', @users ] }, + { label => _("Choose the window manager to run:"), val => \$o->{desktop}, list => \@wm } ] + ) or delete $o->{autologin}; } } diff --git a/perl-install/install_interactive.pm b/perl-install/install_interactive.pm index e38adabb1..b63c3a0cf 100644 --- a/perl-install/install_interactive.pm +++ b/perl-install/install_interactive.pm @@ -94,7 +94,7 @@ sub partitionWizardSolutions { my ($s_root, $s_swap); my $part = $o->ask_from_listf('', _("Which partition do you want to use for Linux4Win?"), \&partition_table::description, \@ok_forloopback) or return; $max_swap = $min_swap + 1 if $part->{free} - $max_swap < $min_linux; - $o->ask_from_entries_refH('', _("Choose the sizes"), [ + $o->ask_from('', _("Choose the sizes"), [ { label => _("Root partition size in MB: "), val => \$s_root, min => $min_linux >> 11, max => min($part->{free} - $max_swap, $max_linux) >> 11, type => 'range' }, { label => _("Swap partition size in MB: "), val => \$s_swap, min => $min_swap >> 11, max => $max_swap >> 11, type => 'range' }, ]) or return; @@ -125,7 +125,7 @@ restart the installation. You should also backup your data. When sure, press Ok.")) or return; my $size = $part->{size}; - $o->ask_from_entries_refH('', _("Which size do you want to keep for windows on"), [ + $o->ask_from('', _("Which size do you want to keep for windows on"), [ { label => _("partition %s", partition_table::description($part)), val => \$size, min => $min_win >> 11, max => ($part->{size} - $min_linux - $min_swap) >> 11, type => 'range' }, ]) or return; $size <<= 11; diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index cd0e2f919..dcbd19c7b 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -51,7 +51,7 @@ sub charsetChanged {} sub selectLanguage { my ($o) = @_; - $o->ask_from_entries_refH_powered( + $o->ask_from_( { messages => _("Please, choose a language to use."), advanced_messages => _("You can choose other languages that will be available after install"), callbacks => { @@ -179,7 +179,7 @@ sub selectKeyboard { my $format = sub { translate(keyboard::keyboard2text($_[0])) }; my $other; my $ext_keyboard = $o->{keyboard}; - $o->ask_from_entries_refH_powered( + $o->ask_from_( { title => _("Keyboard"), messages => _("Please, choose your keyboard layout."), advanced_messages => _("Here is the full list of keyboards available"), @@ -251,7 +251,7 @@ sub selectMouse { #- set a sane default F11/F12 $o->{mouse}{button2_key} = 87; $o->{mouse}{button3_key} = 88; - $o->ask_from_entries_refH('', _("Buttons emulation"), + $o->ask_from('', _("Buttons emulation"), [ { label => _("Button 2 Emulation"), val => \$o->{mouse}{button2_key}, list => [ mouse::ppc_one_button_keys() ], format => \&mouse::ppc_one_button_key2text }, { label => _("Button 3 Emulation"), val => \$o->{mouse}{button3_key}, list => [ mouse::ppc_one_button_keys() ], format => \&mouse::ppc_one_button_key2text }, @@ -303,7 +303,7 @@ sub ask_mntpoint_s { if (@fstab == 1) { $fstab[0]{mntpoint} = '/'; } else { - $o->ask_from_entries_refH('', + $o->ask_from('', _("Choose the mount points"), [ map { { label => partition_table::description($_), val => \$_->{mntpoint}, not_edit => 0, list => [ '', fsedit::suggestions_mntpoint(fsedit::empty_all_hds()) ] } @@ -402,7 +402,7 @@ sub choosePartitionsToFormat { #- keep it temporary until the guy has accepted $_->{toFormatTmp} = $_->{toFormat} || $_->{toFormatUnsure} foreach @l; - $o->ask_from_entries_refH_powered( + $o->ask_from_( { messages => _("Choose the partitions you want to format"), advanced_messages => _("Check bad blocks?"), }, @@ -630,23 +630,23 @@ sub reallyChooseGroups { my $size_text = &$size_to_display; my ($path, $all); - $o->ask_from_entries_refH('', _("Package Group Selection"), [ - { val => \$size_text, type => 'label' }, {}, - (map {; - my $old = $path; - $path = $o->{compssUsers}{$_}{path}; - if_($old ne $path, { val => translate($path) }), - { - val => \$val->{$_}, - type => 'bool', - disabled => sub { $all }, - text => translate($o->{compssUsers}{$_}{label}), - help => translate($o->{compssUsers}{$_}{descr}), - } - } @{$o->{compssUsersSorted}}), - if_($o->{meta_class} eq 'desktop', { text => _("All"), val => \$all, type => 'bool' }), - if_($individual, { text => _("Individual package selection"), val => $individual, advanced => 1, type => 'bool' }), - ], changed => sub { $size_text = &$size_to_display }) or return; + $o->ask_from('', _("Package Group Selection"), [ + { val => \$size_text, type => 'label' }, {}, + (map {; + my $old = $path; + $path = $o->{compssUsers}{$_}{path}; + if_($old ne $path, { val => translate($path) }), + { + val => \$val->{$_}, + type => 'bool', + disabled => sub { $all }, + text => translate($o->{compssUsers}{$_}{label}), + help => translate($o->{compssUsers}{$_}{descr}), + } + } @{$o->{compssUsersSorted}}), + if_($o->{meta_class} eq 'desktop', { text => _("All"), val => \$all, type => 'bool' }), + if_($individual, { text => _("Individual package selection"), val => $individual, advanced => 1, type => 'bool' }), + ], changed => sub { $size_text = &$size_to_display }) or return; if ($all) { $val->{$_} = 1 foreach keys %$val; @@ -823,7 +823,7 @@ sub configureTimezone { $o->set_help('configureTimezoneGMT'); my $ntp = to_bool($o->{timezone}{ntp}); - $o->ask_from_entries_refH('', '', [ + $o->ask_from('', '', [ { text => _("Hardware clock set to GMT"), val => \$o->{timezone}{UTC}, type => 'bool' }, { text => _("Automatic time synchronization (using NTP)"), val => \$ntp, type => 'bool' }, ]) or goto &configureTimezone @@ -831,7 +831,7 @@ sub configureTimezone { if ($ntp) { my @servers = split("\n", $timezone::ntp_servers); - $o->ask_from_entries_refH('', '', + $o->ask_from('', '', [ { label => _("NTP Server"), val => \$o->{timezone}{ntp}, list => \@servers, not_edit => 0 } ] ) or goto &configureTimezone; $o->{timezone}{ntp} =~ s/.*\((.+)\)/$1/; @@ -873,10 +873,10 @@ sub summary { return "$entry->{'make'} $entry->{'model'}"; }; - $o->ask_from_entries_refH_powered({ - messages => _("Summary"), - cancel => '', - }, [ + $o->ask_from_({ + messages => _("Summary"), + cancel => '', + }, [ { label => _("Mouse"), val => \$mouse_name, clicked => sub { $o->selectMouse(1); mouse::write($o->{prefix}, $o->{mouse}); &$format_mouse } }, { label => _("Keyboard"), val => \$o->{keyboard}, clicked => sub { $o->selectKeyboard(1) }, format => sub { translate(keyboard::keyboard2text($_[0])) } }, { label => _("Timezone"), val => \$o->{timezone}{timezone}, clicked => sub { $o->configureTimezone(1) } }, @@ -935,7 +935,7 @@ sub setRootPassword { $::isInstall and $o->set_help("setRootPassword", if_($::expert, "setRootPasswordAuth")); - $o->ask_from_entries_refH_powered( + $o->ask_from_( { title => _("Set root password"), messages => _("Set root password"), @@ -957,19 +957,19 @@ sub setRootPassword { if ($auth eq __("LDAP")) { $o->{authentication}{LDAP} ||= "localhost"; #- any better solution ? $o->{netc}{LDAPDOMAIN} ||= join (',', map { "dc=$_" } split /\./, $o->{netc}{DOMAINNAME}); - $o->ask_from_entries_refH('', - _("Authentication LDAP"), - [ { label => _("LDAP Base dn"), val => \$o->{netc}{LDAPDOMAIN} }, - { label => _("LDAP Server"), val => \$o->{authentication}{LDAP} }, - ]); + $o->ask_from('', + _("Authentication LDAP"), + [ { label => _("LDAP Base dn"), val => \$o->{netc}{LDAPDOMAIN} }, + { label => _("LDAP Server"), val => \$o->{authentication}{LDAP} }, + ]); } else { $o->{authentication}{LDAP} = '' } if ($auth eq __("NIS")) { $o->{authentication}{NIS} ||= 'broadcast'; - $o->ask_from_entries_refH('', - _("Authentication NIS"), - [ { label => _("NIS Domain"), val => \ ($o->{netc}{NISDOMAIN} ||= $o->{netc}{DOMAINNAME}) }, - { label => _("NIS Server"), val => \$o->{authentication}{NIS}, list => ["broadcast"], not_edit => 0 }, - ]); + $o->ask_from('', + _("Authentication NIS"), + [ { label => _("NIS Domain"), val => \ ($o->{netc}{NISDOMAIN} ||= $o->{netc}{DOMAINNAME}) }, + { label => _("NIS Server"), val => \$o->{authentication}{NIS}, list => ["broadcast"], not_edit => 0 }, + ]); } else { $o->{authentication}{NIS} = '' } install_steps::setRootPassword($o); } @@ -1037,7 +1037,7 @@ failures. Would you like to create a bootdisk for your system?")), } else { @l or die _("Sorry, no floppy drive available"); - $o->ask_from_entries_refH_powered( + $o->ask_from_( { messages => _("Choose the floppy drive you want to use to make the bootdisk"), }, [ { val => \$o->{mkbootdisk}, list => \@l, format => sub { $l{$_[0]} || $_[0] } } ] @@ -1162,7 +1162,7 @@ Do you really want to quit now?"), 0); $o->exit unless $alldone; - $o->ask_from_entries_refH_powered_no_check( + $o->ask_from_no_check( { messages => _("Congratulations, installation is complete. diff --git a/perl-install/interactive.pm b/perl-install/interactive.pm index 0f5aabc22..5a6d6df97 100644 --- a/perl-install/interactive.pm +++ b/perl-install/interactive.pm @@ -115,7 +115,7 @@ sub ask_okcancel { if ($::isWizard) { $::no_separator = 1; - $o->ask_from_entries_refH_powered_no_check({ title => $title, messages => $message, focus_cancel => !$def }); + $o->ask_from_no_check({ title => $title, messages => $message, focus_cancel => !$def }); } else { ask_from_list_($o, $title, $message, [ __("Ok"), __("Cancel") ], $def ? "Ok" : "Cancel", $help) eq "Ok"; } @@ -156,7 +156,7 @@ sub ask_from_listf_no_check { if (@$l <= 2 && !$::isWizard) { my $ret = eval { - ask_from_entries_refH_powered_no_check($o, + ask_from_no_check($o, { title => $title, messages => $message, ok => $l->[0] && may_apply($f, $l->[0]), if_($l->[1], cancel => may_apply($f, $l->[1]), focus_cancel => $def eq $l->[1]) }, [] ) ? $l->[0] : $l->[1]; @@ -164,7 +164,7 @@ sub ask_from_listf_no_check { die if $@ && $@ !~ /^wizcancel/; $@ ? undef : $ret; } else { - ask_from_entries_refH($o, $title, $message, [ { val => \$def, type => 'list', list => $l, help => $help, format => $f } ]) && $def; + ask_from($o, $title, $message, [ { val => \$def, type => 'list', list => $l, help => $help, format => $f } ]) && $def; } } @@ -179,7 +179,7 @@ sub ask_from_treelist_ { } sub ask_from_treelistf { my ($o, $title, $message, $separator, $f, $l, $def) = @_; - ask_from_entries_refH($o, $title, $message, [ { val => \$def, separator => $separator, list => $l, format => $f, sort => 1 } ]) or return; + ask_from($o, $title, $message, [ { val => \$def, separator => $separator, list => $l, format => $f, sort => 1 } ]) or return; $def; } @@ -203,7 +203,7 @@ sub ask_many_from_list { $h->{list} = [ sort { $h->{e}{$a}{text} cmp $h->{e}{$b}{text} } @{$h->{list}} ]; } } - $o->ask_from_entries_refH($title, $message, [ map { my $h = $_; map { $h->{e}{$_} } @{$h->{list}} } @l ]) or return; + $o->ask_from($title, $message, [ map { my $h = $_; map { $h->{e}{$_} } @{$h->{list}} } @l ]) or return; @l = map { my $h = $_; @@ -221,7 +221,7 @@ sub ask_from_entries { my @l = map { my $i = ''; { label => $_, val => \$i } } @$l; - $o->ask_from_entries_refH($title, $message, \@l, %callback) ? + $o->ask_from($title, $message, \@l, %callback) ? map { ${$_->{val}} } @l : undef; } @@ -229,13 +229,13 @@ sub ask_from_entries { #- can get a hash of callback: focus_out changed and complete #- moreove if you pass a hash with a field list -> combo #- if you pass a hash with a field hidden -> emulate stty -echo -sub ask_from_entries_refH { +sub ask_from { my ($o, $title, $message, $l, %callback) = @_; - ask_from_entries_refH_powered($o, { title => $title, messages => $message, callbacks => \%callback }, $l); + ask_from_($o, { title => $title, messages => $message, callbacks => \%callback }, $l); } -sub ask_from_entries_refH_powered_normalize { +sub ask_from_normalize { my ($o, $common, $l) = @_; foreach my $e (@$l) { @@ -270,7 +270,7 @@ sub ask_from_entries_refH_powered_normalize { if (@{$_->{list}} == ()) { eval { require log; - log::l("ask_from_entries_refH_powered_normalize: empty list for $_->{label}\n" . common::backtrace()); + log::l("ask_from_normalize: empty list for $_->{label}\n" . common::backtrace()); }; } @{$_->{list}} > 1; @@ -285,17 +285,17 @@ sub ask_from_entries_refH_powered_normalize { add2hash_($common->{callbacks} ||= {}, { changed => sub {}, focus_out => sub {}, complete => sub { 0 }, canceled => sub { 0 } }); } -sub ask_from_entries_refH_powered { +sub ask_from_ { my ($o, $common, $l) = @_; - ask_from_entries_refH_powered_normalize($o, $common, $l); + ask_from_normalize($o, $common, $l); @$l or return 1; - $o->ask_from_entries_refW($common, [ grep { !$_->{advanced} } @$l ], [ grep { $_->{advanced} } @$l ]); + $o->ask_fromW($common, [ grep { !$_->{advanced} } @$l ], [ grep { $_->{advanced} } @$l ]); } -sub ask_from_entries_refH_powered_no_check { +sub ask_from_no_check { my ($o, $common, $l) = @_; - ask_from_entries_refH_powered_normalize($o, $common, $l); - $o->ask_from_entries_refW($common, [ grep { !$_->{advanced} } @$l ], [ grep { $_->{advanced} } @$l ]); + ask_from_normalize($o, $common, $l); + $o->ask_fromW($common, [ grep { !$_->{advanced} } @$l ], [ grep { $_->{advanced} } @$l ]); } diff --git a/perl-install/interactive_gtk.pm b/perl-install/interactive_gtk.pm index 1ac4cd593..86ac0fc92 100644 --- a/perl-install/interactive_gtk.pm +++ b/perl-install/interactive_gtk.pm @@ -313,7 +313,7 @@ sub create_list { }; } -sub ask_from_entries_refW { +sub ask_fromW { my ($o, $common, $l, $l2) = @_; my $ignore = 0; #-to handle recursivity diff --git a/perl-install/interactive_http.pm b/perl-install/interactive_http.pm index 1e56a21e6..18bff77fe 100644 --- a/perl-install/interactive_http.pm +++ b/perl-install/interactive_http.pm @@ -52,7 +52,7 @@ sub end() { sub exit() { end; exit($_[1]) } END { end() } -sub ask_from_entries_refW { +sub ask_fromW { my ($o, $common, $l, $l2) = @_; redisplay: diff --git a/perl-install/interactive_newt.pm b/perl-install/interactive_newt.pm index 8e64c539b..3d5beabd0 100644 --- a/perl-install/interactive_newt.pm +++ b/perl-install/interactive_newt.pm @@ -59,7 +59,7 @@ sub separator { } sub checkval { $_[0] && $_[0] ne ' ' ? '*' : ' ' } -sub ask_from_entries_refW { +sub ask_fromW { my ($o, $common, $l, $l2) = @_; my $ignore; #-to handle recursivity my $old_focus = -2; @@ -194,7 +194,7 @@ sub ask_from_entries_refW { $form->FormDestroy; Newt::PopWindow; $_->{e}{clicked}(); - return ask_from_entries_refW($o, $common, $l, $l2); + return ask_fromW($o, $common, $l, $l2); } } $canceled = $cancel && $$r == $$cancel; diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm index fcc07b5d0..74a23a029 100644 --- a/perl-install/network/ethernet.pm +++ b/perl-install/network/ethernet.pm @@ -209,12 +209,12 @@ sub configureNetwork { $netc->{minus_one} = 1; my $dhcp_hostname = $netc->{HOSTNAME}; $::isInstall and $in->set_help('configureNetworkHostDHCP'); - $in->ask_from_entries_refH(_("Configuring network"), + $in->ask_from(_("Configuring network"), _("Please enter your host name if you know it. Some DHCP servers require the hostname to work. Your host name should be a fully-qualified host name, such as ``mybox.mylab.myco.com''."), - [ { label => _("Host name"), val => \$netc->{HOSTNAME} }]) or goto configureNetwork_step_1; + [ { label => _("Host name"), val => \$netc->{HOSTNAME} }]) or goto configureNetwork_step_1; $netc->{HOSTNAME} ne $dhcp_hostname and $netc->{DHCP_HOSTNAME} = $netc->{HOSTNAME}; } else { configureNetworkNet($in, $netc, $last ||= {}, @l) or goto configureNetwork_step_1; diff --git a/perl-install/network/modem.pm b/perl-install/network/modem.pm index f06c60219..b529d2357 100644 --- a/perl-install/network/modem.pm +++ b/perl-install/network/modem.pm @@ -41,7 +41,7 @@ sub pppConfig { [ grep { $_ ne $mouse->{device} } (mouse::serial_ports, if_(-e '/dev/modem', '/dev/modem')) ]) || return; $::isStandalone || $in->set_help('configureNetworkISP'); - $in->ask_from_entries_refH('', _("Dialup options"), [ + $in->ask_from('', _("Dialup options"), [ { label => _("Connection name"), val => \$modem->{connection} }, { label => _("Phone number"), val => \$modem->{phone} }, { label => _("Login ID"), val => \$modem->{login} }, diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index 456c9276d..b8b327bde 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -154,13 +154,13 @@ ifdown eth0 step_1: $::Wizard_no_previous=1; my @profiles=get_profiles(); - $in->ask_from_entries_refH(_("Network Configuration Wizard"), - _("Welcome to The Network Configuration Wizard\n\nWe are about to configure your internet/network connection.\nIf you don't want to use the auto detection, deselect the checkbox.\n"), - [ - if_(@profiles > 1, { label => _("Choose the profile to configure"), val => \$netcnx->{PROFILE}, list => \@profiles }), - { label => _("Use auto detection"), val => \$netc->{autodetection}, type => 'bool' }, - ] - ) or goto step_5; + $in->ask_from(_("Network Configuration Wizard"), + _("Welcome to The Network Configuration Wizard\n\nWe are about to configure your internet/network connection.\nIf you don't want to use the auto detection, deselect the checkbox.\n"), + [ + if_(@profiles > 1, { label => _("Choose the profile to configure"), val => \$netcnx->{PROFILE}, list => \@profiles }), + { label => _("Use auto detection"), val => \$netc->{autodetection}, type => 'bool' }, + ] + ) or goto step_5; undef $::Wizard_no_previous; set_profile($netcnx); if ($netc->{autodetection}) { @@ -183,14 +183,14 @@ ifdown eth0 ); my $i=0; map { defined $set_default or do { $_->[1] and $set_default=$i; }; $i++; } @l; - my $e = $in->ask_from_entries_refH(_("Network Configuration Wizard"), - _("Choose the connection you want to configure"), - [ - map { { - label => $_->[0] . if_($_->[1], " - " . _ ($_->[2], $_->[1])), - val => $_->[3], type => 'bool'} } @l - ] - ) or goto step_1; + my $e = $in->ask_from(_("Network Configuration Wizard"), + _("Choose the connection you want to configure"), + [ + map { { + label => $_->[0] . if_($_->[1], " - " . _ ($_->[2], $_->[1])), + val => $_->[3], type => 'bool'} } @l + ] + ) or goto step_1; # load_conf ($netcnx, $netc, $intf); @@ -204,12 +204,10 @@ ifdown eth0 my $nb = keys %{$netc->{internet_cnx}}; if ($nb < 1) { } elsif ($nb > 1) { - $in->ask_from_entries_refH(_("Network Configuration Wizard"), - _("You have configured multiple ways to connect to the Internet.\nChoose the one you want to use.\n\n" . if_(!$::isStandalone, "You may want to configure some profiles after the installation, in the Mandrake Control Center")), - [ - { label => _("Internet connection"), val => \$netc->{internet_cnx_choice}, list => [ keys %{$netc->{internet_cnx}} ]} - ] - ) or goto step_2; + $in->ask_from(_("Network Configuration Wizard"), + _("You have configured multiple ways to connect to the Internet.\nChoose the one you want to use.\n\n" . if_(!$::isStandalone, "You may want to configure some profiles after the installation, in the Mandrake Control Center")), + [ { label => _("Internet connection"), val => \$netc->{internet_cnx_choice}, list => [ keys %{$netc->{internet_cnx}} ]} ] + ) or goto step_2; } elsif ($nb == 1) { $netc->{internet_cnx_choice} = (keys %{$netc->{internet_cnx}})[0]; } diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm index 14706ea01..40f2e6053 100644 --- a/perl-install/network/network.pm +++ b/perl-install/network/network.pm @@ -286,51 +286,50 @@ notation (for example, 1.2.3.4)."); delete $intf->{BROADCAST}; my @fields = qw(IPADDR NETMASK); $::isStandalone or $in->set_help('configureNetworkIP'); - $in->ask_from_entries_refH(_("Configuring network device %s", $intf->{DEVICE}), - (_("Configuring network device %s", $intf->{DEVICE}) . ( $module ? _(" (driver %s)", $module) : '' ) ."\n\n") . - $text, - [ { label => _("IP address"), val => \$intf->{IPADDR}, disabled => sub { $pump } }, - { label => _("Netmask"), val => \$intf->{NETMASK}, disabled => sub { $pump } }, - { label => _("Automatic IP"), val => \$pump, type => "bool", text => _("(bootp/dhcp)") }, - if_($intf->{wireless_eth}, - { label => "WIRELESS_MODE", val => \$intf->{WIRELESS_MODE}, list => [ "Ad-hoc", "Managed", "Master", "Repeater", "Secondary", "Auto"] }, - { label => "WIRELESS_ESSID", val => \$intf->{WIRELESS_ESSID} }, - { label => "WIRELESS_NWID", val => \$intf->{WIRELESS_NWID} }, - { label => "WIRELESS_FREQ", val => \$intf->{WIRELESS_FREQ} }, - { label => "WIRELESS_SENS", val => \$intf->{WIRELESS_SENS} }, - { label => "WIRELESS_RATE", val => \$intf->{WIRELESS_RATE} }, - { label => "WIRELESS_ENC_KEY", val => \$intf->{WIRELESS_ENC_KEY} }, - { label => "WIRELESS_RTS", val => \$intf->{WIRELESS_RTS} }, - { label => "WIRELESS_FRAG", val => \$intf->{WIRELESS_FRAG} }, - { label => "WIRELESS_IWCONFIG", val => \$intf->{WIRELESS_IWCONFIG} }, - { label => "WIRELESS_IWSPY", val => \$intf->{WIRELESS_IWSPY} }, - { label => "WIRELESS_IWPRIV", val => \$intf->{WIRELESS_IWPRIV} } - ), - ], - complete => sub { - $intf->{BOOTPROTO} = $pump ? "dhcp" : "static"; - return 0 if $pump; - for (my $i = 0; $i < @fields; $i++) { - unless (is_ip($intf->{$fields[$i]})) { - $in->ask_warn('', _("IP address should be in format 1.2.3.4")); - return (1,$i); - } - return 0; - } - if ($intf->{WIRELESS_FREQ} !~ /[0-9.]*[kGM]/) { - $in->ask_warn('', _('Freq should have the suffix k, M or G (for example, "2.46G" for 2.46 GHz fre - quency), or add enough \'0\'.')); - return (1,6); - } - if ($intf->{WIRELESS_RATE} !~ /[0-9.]*[kGM]/) { - $in->ask_warn('', _('Rate should have the suffix k, M or G (for example, "11M" for 11M), or add enough \'0\'.')); - return (1,8); - } - }, - focus_out => sub { - $intf->{NETMASK} ||= netmask($intf->{IPADDR}) unless $_[0] - } - ); + $in->ask_from(_("Configuring network device %s", $intf->{DEVICE}), + (_("Configuring network device %s", $intf->{DEVICE}) . ( $module ? _(" (driver %s)", $module) : '' ) ."\n\n") . + $text, + [ { label => _("IP address"), val => \$intf->{IPADDR}, disabled => sub { $pump } }, + { label => _("Netmask"), val => \$intf->{NETMASK}, disabled => sub { $pump } }, + { label => _("Automatic IP"), val => \$pump, type => "bool", text => _("(bootp/dhcp)") }, + if_($intf->{wireless_eth}, + { label => "WIRELESS_MODE", val => \$intf->{WIRELESS_MODE}, list => [ "Ad-hoc", "Managed", "Master", "Repeater", "Secondary", "Auto"] }, + { label => "WIRELESS_ESSID", val => \$intf->{WIRELESS_ESSID} }, + { label => "WIRELESS_NWID", val => \$intf->{WIRELESS_NWID} }, + { label => "WIRELESS_FREQ", val => \$intf->{WIRELESS_FREQ} }, + { label => "WIRELESS_SENS", val => \$intf->{WIRELESS_SENS} }, + { label => "WIRELESS_RATE", val => \$intf->{WIRELESS_RATE} }, + { label => "WIRELESS_ENC_KEY", val => \$intf->{WIRELESS_ENC_KEY} }, + { label => "WIRELESS_RTS", val => \$intf->{WIRELESS_RTS} }, + { label => "WIRELESS_FRAG", val => \$intf->{WIRELESS_FRAG} }, + { label => "WIRELESS_IWCONFIG", val => \$intf->{WIRELESS_IWCONFIG} }, + { label => "WIRELESS_IWSPY", val => \$intf->{WIRELESS_IWSPY} }, + { label => "WIRELESS_IWPRIV", val => \$intf->{WIRELESS_IWPRIV} } + ), + ], + complete => sub { + $intf->{BOOTPROTO} = $pump ? "dhcp" : "static"; + return 0 if $pump; + for (my $i = 0; $i < @fields; $i++) { + unless (is_ip($intf->{$fields[$i]})) { + $in->ask_warn('', _("IP address should be in format 1.2.3.4")); + return (1,$i); + } + return 0; + } + if ($intf->{WIRELESS_FREQ} !~ /[0-9.]*[kGM]/) { + $in->ask_warn('', _('Freq should have the suffix k, M or G (for example, "2.46G" for 2.46 GHz frequency), or add enough \'0\'.')); + return (1,6); + } + if ($intf->{WIRELESS_RATE} !~ /[0-9.]*[kGM]/) { + $in->ask_warn('', _('Rate should have the suffix k, M or G (for example, "11M" for 11M), or add enough \'0\'.')); + return (1,8); + } + }, + focus_out => sub { + $intf->{NETMASK} ||= netmask($intf->{IPADDR}) unless $_[0] + } + ); } sub configureNetworkNet { @@ -340,7 +339,7 @@ sub configureNetworkNet { $netc->{GATEWAY} ||= gateway($intf->{IPADDR}); $::isInstall and $in->set_help('configureNetworkHost'); - $in->ask_from_entries_refH(_("Configuring network"), + $in->ask_from(_("Configuring network"), _("Please enter your host name. Your host name should be a fully-qualified host name, such as ``mybox.mylab.myco.com''. @@ -359,7 +358,7 @@ sub miscellaneousNetwork { my ($in, $clicked) = @_; my $u = $::o->{miscellaneous} ||= {}; $::isInstall and $in->set_help('configureNetworkProxy'); - $::expert || $clicked and $in->ask_from_entries_refH('', + $::expert || $clicked and $in->ask_from('', _("Proxies configuration"), [ { label => _("HTTP proxy"), val => \$u->{http_proxy} }, { label => _("FTP proxy"), val => \$u->{ftp_proxy} }, diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm index 4c164f2ad..47abf7892 100644 --- a/perl-install/network/tools.pm +++ b/perl-install/network/tools.pm @@ -65,26 +65,26 @@ sub read_providers_backend { my ($file) = @_; map { /(.*?)=>/ } catMaybeCompress sub ask_info2 { my ($cnx, $netc) = @_; $::isInstall and $in->set_help('configureNetworkDNS'); - $in->ask_from_entries_refH(_("Connection Configuration"), - _("Please fill or check the field below"), - [ - if__ ($cnx->{irq}, { label => _("Card IRQ"), val => \$cnx->{irq} }) , - if__ ($cnx->{mem}, { label => _("Card mem (DMA)"), val => \$cnx->{mem} }), - if__ ($cnx->{io}, { label => _("Card IO"), val => \$cnx->{io} }), - if__ ($cnx->{io0}, { label => _("Card IO_0"), val => \$cnx->{io0} }), - if__ ($cnx->{io1}, { label => _("Card IO_1"), val => \$cnx->{io1} }), - if__ ($cnx->{phone_in}, { label => _("Your personal phone number"), val => \$cnx->{phone_in} }), - if__ ($netc->{DOMAINNAME2}, { label => _("Provider name (ex provider.net)"), val => \$netc->{DOMAINNAME2} }), - if__ ($cnx->{phone_out}, { label => _("Provider phone number"), val => \$cnx->{phone_out} }), - if__ ($netc->{dnsServer2}, { label => _("Provider dns 1 (optional)"), val => \$netc->{dnsServer2} }), - if__ ($netc->{dnsServer3}, { label => _("Provider dns 2 (optional)"), val => \$netc->{dnsServer3} }), - if__ ($cnx->{dialing_mode}, { label => _("Dialing mode"), val => \$cnx->{dialing_mode},list=>["auto","manual"]}), - if__ ($cnx->{speed}, { label => _("Connection speed"), val => \$cnx->{speed}, list => ["64 Kb/s", "128 Kb/s"]}), - if__ ($cnx->{huptimeout}, { label => _("Connection timeout (in sec)"), val => \$cnx->{huptimeout} }), - if__ ($cnx->{login}, { label => _("Account Login (user name)"), val => \$cnx->{login} }), - if__ ($cnx->{passwd}, { label => _("Account Password"), val => \$cnx->{passwd} }), - ] - ) or return; + $in->ask_from(_("Connection Configuration"), + _("Please fill or check the field below"), + [ + if __ ($cnx->{irq}, { label => _("Card IRQ"), val => \$cnx->{irq} }) , + if __ ($cnx->{mem}, { label => _("Card mem (DMA)"), val => \$cnx->{mem} }), + if __ ($cnx->{io}, { label => _("Card IO"), val => \$cnx->{io} }), + if __ ($cnx->{io0}, { label => _("Card IO_0"), val => \$cnx->{io0} }), + if __ ($cnx->{io1}, { label => _("Card IO_1"), val => \$cnx->{io1} }), + if __ ($cnx->{phone_in}, { label => _("Your personal phone number"), val => \$cnx->{phone_in} }), + if __ ($netc->{DOMAINNAME2}, { label => _("Provider name (ex provider.net)"), val => \$netc->{DOMAINNAME2} }), + if __ ($cnx->{phone_out}, { label => _("Provider phone number"), val => \$cnx->{phone_out} }), + if __ ($netc->{dnsServer2}, { label => _("Provider dns 1 (optional)"), val => \$netc->{dnsServer2} }), + if __ ($netc->{dnsServer3}, { label => _("Provider dns 2 (optional)"), val => \$netc->{dnsServer3} }), + if __ ($cnx->{dialing_mode}, { label => _("Dialing mode"), val => \$cnx->{dialing_mode},list=>["auto","manual"]}), + if __ ($cnx->{speed}, { label => _("Connection speed"), val => \$cnx->{speed}, list => ["64 Kb/s", "128 Kb/s"]}), + if __ ($cnx->{huptimeout}, { label => _("Connection timeout (in sec)"), val => \$cnx->{huptimeout} }), + if __ ($cnx->{login}, { label => _("Account Login (user name)"), val => \$cnx->{login} }), + if __ ($cnx->{passwd}, { label => _("Account Password"), val => \$cnx->{passwd} }), + ] + ) or return; 1; } diff --git a/perl-install/printerdrake.pm b/perl-install/printerdrake.pm index 4f27d6099..6cbb768fa 100644 --- a/perl-install/printerdrake.pm +++ b/perl-install/printerdrake.pm @@ -74,7 +74,7 @@ sub setup_remote_cups_server { #- according to new settings. There are no other point where such #- information is written in this file. - if ($in->ask_from_entries_refH_powered + if ($in->ask_from_ ({ title => _("Remote CUPS server"), messages => _("With a remote CUPS server, you do not have to configure any printer here; CUPS servers inform your machine automatically @@ -209,7 +209,7 @@ sub setup_local { } if ($in) { $::expert or $in->set_help('configurePrinterDev') if $::isInstall; - return if !$in->ask_from_entries_refH(_("Local Printer Device"), + return if !$in->ask_from(_("Local Printer Device"), _("What device is your printer connected to (note that /dev/lp0 is equivalent to LPT1:)?\n") . (join "\n", @str), [ { label => _("Printer Device"), val => \$device, list => \@port, not_edit => !$::expert } ], @@ -258,7 +258,7 @@ sub setup_lpd { $remotequeue = "lp"; } - return if !$in->ask_from_entries_refH(_("Remote lpd Printer Options"), + return if !$in->ask_from(_("Remote lpd Printer Options"), _("To use a remote lpd printer, you need to supply the hostname of the printer server and the printer name on that server."), [ @@ -339,7 +339,7 @@ sub setup_smb { } } - return if !$in->ask_from_entries_refH(_("SMB (Windows 9x/NT) Printer Options"), + return if !$in->ask_from(_("SMB (Windows 9x/NT) Printer Options"), _("To print to a SMB printer, you need to provide the SMB host name (Note! It may be different from its TCP/IP hostname!) and possibly the IP address of the print server, as @@ -420,7 +420,7 @@ sub setup_ncp { } } - return if !$in->ask_from_entries_refH(_("NetWare Printer Options"), + return if !$in->ask_from(_("NetWare Printer Options"), _("To print on a NetWare printer, you need to provide the NetWare print server name (Note! it may be different from its TCP/IP hostname!) as well as the print queue name for the printer you @@ -474,7 +474,7 @@ sub setup_socket { $remoteport = "9100"; } - return if !$in->ask_from_entries_refH(_("Socket Printer Options"), + return if !$in->ask_from(_("Socket Printer Options"), _("To print to a socket printer, you need to provide the host name of the printer and optionally the port number. On HP JetDirect servers the port number is usually 9100, @@ -512,7 +512,7 @@ complete => sub { sub setup_uri { my ($printer, $in) = @_; - return if !$in->ask_from_entries_refH(_("Printer Device URI"), + return if !$in->ask_from(_("Printer Device URI"), _("You can specify directly the URI to access the printer. The URI must fulfill either the CUPS or the Foomatic specifications. Note that not all URI types are supported by all the spoolers."), [ { label => _("Printer Device URI"), val => \$printer->{currentqueue}{'connect'}, @@ -579,7 +579,7 @@ sub setup_postpipe { $commandline = ""; } - return if !$in->ask_from_entries_refH(_("Pipe into command"), + return if !$in->ask_from(_("Pipe into command"), _("Here you can specify any arbitrary command line into which the job should be piped instead of being sent directly to a printer."), [ { label => _("Command line"), val => \$commandline }, ], @@ -603,7 +603,7 @@ sub choose_printer_name { # Name, description, location $in->set_help('configurePrinterLocal') if $::isInstall; my $default = $printer->{currentqueue}{'queue'}; - $in->ask_from_entries_refH_powered + $in->ask_from_ ( { title => _("Enter Printer Name and Comments"), #cancel => !$printer->{configured}{$queue} ? '' : _("Remove queue"), @@ -881,7 +881,7 @@ sub setup_options { $windowtitle = "$printer->{currentqueue}{'make'} " . "$printer->{currentqueue}{'model'}" } - return 0 if !$in->ask_from_entries_refH + return 0 if !$in->ask_from ($windowtitle, _("Printer default settings You should make sure that the page size and the @@ -960,7 +960,7 @@ sub print_testpages { my $alta4 = 0; my $photo = 0; my $ascii = 0; - if ($in->ask_from_entries_refH_powered + if ($in->ask_from_ ({ title => _("Test pages"), messages => _("Please select the test pages you want to print. Note: the photo test page can take a rather long time to get printed @@ -1058,7 +1058,7 @@ sub copy_queues_from { } } if ($noninteractive || - $in->ask_from_entries_refH_powered + $in->ask_from_ ({ title => _("Transfer printer configuration"), messages => _("You can copy the printer configuration which you have done for the spooler %s to %s, your current spooler. All the @@ -1096,7 +1096,7 @@ Mark the printers which you want to transfer and click my $newqueue = $_; if ((!$printer->{configured}{$newqueue}) || ($noninteractive) || - ($in->ask_from_entries_refH_powered + ($in->ask_from_ ({ title => _("Transfer printer configuration"), messages => _("A printer named \"%s\" already exists under %s. Click \"Transfer\" to overwrite it. @@ -1298,7 +1298,7 @@ sub main { $continue = 1; # $expertwitch gets one when the "Expert mode"/ # "Standard mode" button is clicked. - $expertswitch = !$in->ask_from_entries_refH_powered( + $expertswitch = !$in->ask_from_( {messages => _("The following printers are configured.\nYou can add some more or modify the existing ones."), cancel => ($::isInstall ? @@ -1397,7 +1397,7 @@ sub main { } } else { # Modify a queue, ask which part should be modified - if ($in->ask_from_entries_refH_powered + if ($in->ask_from_ ({ title => _("Modify printer configuration"), messages => _("Printer %s: %s %s What do you want to modify on this printer?", diff --git a/perl-install/proxy.pm b/perl-install/proxy.pm index fdb5c3a4d..72fd35664 100644 --- a/perl-install/proxy.pm +++ b/perl-install/proxy.pm @@ -34,61 +34,63 @@ sub main { step_http_proxy: undef $::Wizard_no_previous; $proxy_cfg->{http_url} ||= "http://www.proxy.com/"; - $in->ask_from_entries_refH(_("Proxy configuration"), - _("Please fill in the http proxy informations\nLeave it blank if you don't want an http proxy"), - [ { label => _("URL"), val => \$proxy_cfg->{http_url} }, - { label => _("port"), val => \$proxy_cfg->{http_port} } - ], - complete => sub { - if ($proxy_cfg->{http_url} && $proxy_cfg->{http_url} !~ /^http:/) { - $in->ask_warn('', _("Url should begin with 'http:'")); - return (1,0); - } - if ($proxy_cfg->{http_port} && $proxy_cfg->{http_port} !~ /^\d+$/) { - $in->ask_warn('', _("The port part should be numeric")); - return (1,1); - } - 0; - } - ) or goto begin; + $in->ask_from(_("Proxy configuration"), + _("Please fill in the http proxy informations\nLeave it blank if you don't want an http proxy"), + [ { label => _("URL"), val => \$proxy_cfg->{http_url} }, + { label => _("port"), val => \$proxy_cfg->{http_port} } + ], + complete => sub { + if ($proxy_cfg->{http_url} && $proxy_cfg->{http_url} !~ /^http:/) { + $in->ask_warn('', _("Url should begin with 'http:'")); + return (1,0); + } + if ($proxy_cfg->{http_port} && $proxy_cfg->{http_port} !~ /^\d+$/) { + $in->ask_warn('', _("The port part should be numeric")); + return (1,1); + } + 0; + } + ) or goto begin; # ftp proxy step_ftp_proxy: $proxy_cfg->{ftp_url} ||= "ftp://ftp.proxy.com/"; - $in->ask_from_entries_refH(_("Proxy configuration"), - _("Please fill in the ftp proxy informations\nLeave it blank if you don't want an ftp proxy"), - [ { label => _("URL"), val => \$proxy_cfg->{ftp_url} }, - { label => _("port"), val => \$proxy_cfg->{ftp_port} } - ], - complete => sub { - if ($proxy_cfg->{ftp_url} && $proxy_cfg->{ftp_url} !~ /^ftp:/) { - $in->ask_warn('', _("Url should begin with 'ftp:'")); - return (1,0); - } - if ($proxy_cfg->{ftp_port} && $proxy_cfg->{ftp_port} !~ /^\d+$/) { - $in->ask_warn('', _("The port part should be numeric")); - return (1,1); - } - 0; - } - ) or goto step_http_proxy; + $in->ask_from(_("Proxy configuration"), + _("Please fill in the ftp proxy informations\nLeave it blank if you don't want an ftp proxy"), + [ { label => _("URL"), val => \$proxy_cfg->{ftp_url} }, + { label => _("port"), val => \$proxy_cfg->{ftp_port} } + ], + complete => sub { + if ($proxy_cfg->{ftp_url} && $proxy_cfg->{ftp_url} !~ /^ftp:/) { + $in->ask_warn('', _("Url should begin with 'ftp:'")); + return (1,0); + } + if ($proxy_cfg->{ftp_port} && $proxy_cfg->{ftp_port} !~ /^\d+$/) { + $in->ask_warn('', _("The port part should be numeric")); + return (1,1); + } + 0; + } + ) or goto step_http_proxy; # proxy login/passwd step_login: - $in->ask_from_entries_refH(_("Proxy configuration"), - _("Please enter proxy login and password, if any.\nLeave it blank if you don't want login/passwd"), - [ { label => _("login"), val => \$proxy_cfg->{login} }, - { label => _("password"), val => \$proxy_cfg->{passwd}, hidden => 1 }, - { label => _("re-type password"), val => \$proxy_cfg->{passwd2}, hidden => 1 } - ], - complete => sub { - if ($proxy_cfg->{passwd} ne $proxy_cfg->{passwd2}) { - $in->ask_warn('', _("The passwords don't match. Try again!")); - return(1,1); - } - 0; - } - ) or goto step_ftp_proxy; + $in->ask_from(_("Proxy configuration"), + _("Please enter proxy login and password, if any.\nLeave it blank if you don't want login/passwd"), + [ { label => _("login"), val => \$proxy_cfg->{login} }, + { + label => _("password"), val => \$proxy_cfg->{passwd}, hidden => 1 }, + { + label => _("re-type password"), val => \$proxy_cfg->{passwd2}, hidden => 1 } + ], + complete => sub { + if ($proxy_cfg->{passwd} ne $proxy_cfg->{passwd2}) { + $in->ask_warn('', _("The passwords don't match. Try again!")); + return(1,1); + } + 0; + } + ) or goto step_ftp_proxy; # save config substInFile { s/^(http|ftp)_proxy.*\n//; diff --git a/perl-install/standalone/drakautoinst b/perl-install/standalone/drakautoinst index c7019dafa..8366d9714 100755 --- a/perl-install/standalone/drakautoinst +++ b/perl-install/standalone/drakautoinst @@ -62,10 +62,10 @@ for (my $f = $st->{first}; $f; $f = $st->{$f}{next}) { push @all_steps, [ $f, \$def_choice ]; } -$in->ask_from_entries_refH(_("Automatic Steps Configuration"), - _("Please choose for each step whether it will replay like your install, or it will be manual"), - \@choices - ) or quit_global($in, 0); +$in->ask_from(_("Automatic Steps Configuration"), + _("Please choose for each step whether it will replay like your install, or it will be manual"), + \@choices + ) or quit_global($in, 0); ${$_->[1]} eq 'manual' and push @manual_steps, $_->[0] foreach @all_steps; @@ -125,6 +125,9 @@ sub quit_global { #------------------------------------------------- #- $Log$ +#- Revision 1.3 2001/08/18 17:52:21 prigaux +#- big renaming of ask_from_entries_refH in ask_from and ask_from_entries_refH_powered in ask_from_ +#- #- Revision 1.2 2001/08/13 19:08:27 gc #- ouch! use lib from /usr/lib/libDrakX, rather than from .. #- |