From 8e185cf17268b0b35f0345c18e98b7f2768cd7e3 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Sun, 18 May 2008 19:52:13 +0000 Subject: move provider settings guess in connection object --- lib/network/netconnect.pm | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'lib/network/netconnect.pm') diff --git a/lib/network/netconnect.pm b/lib/network/netconnect.pm index 7b46d28..189d5a1 100644 --- a/lib/network/netconnect.pm +++ b/lib/network/netconnect.pm @@ -51,7 +51,7 @@ sub real_main { my ($net, $in, $modules_conf) = @_; #- network configuration should have been already read in $net at this point my $mouse = $::o->{mouse} || {}; - my (@connections_list, $connection, $provider_settings, @providers_data, $protocol_settings, $access_settings, $control_settings); + my (@connections_list, $connection, $provider_settings, $protocol_settings, $access_settings, $control_settings); my $connection_compat; my ($hardware_settings, $network_access_settings, $address_settings, $hostname_settings); my ($modem, $modem_name, $modem_dyn_dns, $modem_dyn_ip); @@ -195,11 +195,7 @@ sub real_main { select_provider => { pre => sub { $provider_settings = $connection->get_provider_settings; - @providers_data = $connection->get_providers; - require lang; - my $locale_country = lang::c2name(ref($::o) && $::o->{locale}{country} || lang::read()->{country}); - my $separator = $providers_data[1]; - $connection->{provider_name} = find { /^\Q$locale_country$separator\E/ } sort(keys %{$providers_data[0]}); + $connection->guess_provider_settings; }, name => sub { $net->{type}->get_type_name . "\n\n" . N("Please select your provider:") }, data => sub { $provider_settings }, -- cgit v1.2.1