diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-05-18 19:35:46 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-05-18 19:35:46 +0000 |
commit | 806944cb2cee5e9eeb74443da4c831813461715f (patch) | |
tree | 45d6526c7dbe181151df5511ea45c66fea148c48 /lib | |
parent | 0ab6fc56aa6f9ece4d9cd78f20c31341f1516453 (diff) | |
download | drakx-net-806944cb2cee5e9eeb74443da4c831813461715f.tar drakx-net-806944cb2cee5e9eeb74443da4c831813461715f.tar.gz drakx-net-806944cb2cee5e9eeb74443da4c831813461715f.tar.bz2 drakx-net-806944cb2cee5e9eeb74443da4c831813461715f.tar.xz drakx-net-806944cb2cee5e9eeb74443da4c831813461715f.zip |
move more provider setting code in connection object
Diffstat (limited to 'lib')
-rw-r--r-- | lib/network/connection.pm | 7 | ||||
-rw-r--r-- | lib/network/netconnect.pm | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/lib/network/connection.pm b/lib/network/connection.pm index f397f08..0e67acb 100644 --- a/lib/network/connection.pm +++ b/lib/network/connection.pm @@ -158,8 +158,11 @@ sub get_access_settings_label { N("Access settings") } sub get_address_settings_label { N("Address settings") } sub set_provider { - my ($self, $provider_data) = @_; - $self->{provider} = $provider_data; + my ($self) = @_; + if ($self->{provider_name} ne N("Unlisted - edit manually")) { + my @providers_data = $self->get_providers; + $self->{provider} = $providers_data[0]{$self->{provider_name}}; + } } #- check that $self->can('get_protocols') first diff --git a/lib/network/netconnect.pm b/lib/network/netconnect.pm index 7ae56d6..6bbefe5 100644 --- a/lib/network/netconnect.pm +++ b/lib/network/netconnect.pm @@ -206,9 +206,7 @@ sub real_main { list => [ N("Unlisted - edit manually"), sort(keys %{$providers_data[0]}) ], sort => 0 } ]; }, post => sub { - if ($self->{provider_name} ne N("Unlisted - edit manually")) { - $connection->set_provider($providers_data[0]{$self->{provider_name}}); - } + $self->_set_provider; $get_next->("select_provider"); }, }, |