summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-02-20 17:15:14 +0000
committerOlivier Blin <oblin@mandriva.com>2008-02-20 17:15:14 +0000
commitdf618fc367737a3b07cfcae7465a4600b5a0c063 (patch)
treeb17d9871b9bd43ae08d4d84abd5ca50aca3dd127
parentc6f64c7c7cc299f9a7d04eb321e0141ac77eb206 (diff)
downloaddrakx-net-df618fc367737a3b07cfcae7465a4600b5a0c063.tar
drakx-net-df618fc367737a3b07cfcae7465a4600b5a0c063.tar.gz
drakx-net-df618fc367737a3b07cfcae7465a4600b5a0c063.tar.bz2
drakx-net-df618fc367737a3b07cfcae7465a4600b5a0c063.tar.xz
drakx-net-df618fc367737a3b07cfcae7465a4600b5a0c063.zip
factorize selected_network_is_configured
-rw-r--r--lib/network/connection.pm7
-rw-r--r--lib/network/connection/cellular.pm5
-rw-r--r--lib/network/connection/wireless.pm7
3 files changed, 7 insertions, 12 deletions
diff --git a/lib/network/connection.pm b/lib/network/connection.pm
index 570935b..ca1eb28 100644
--- a/lib/network/connection.pm
+++ b/lib/network/connection.pm
@@ -119,6 +119,13 @@ sub get_selected_network {
exists $self->{networks}{$self->{network}} && $self->{networks}{$self->{network}};
}
+sub selected_network_is_configured {
+ my ($self) = @_;
+
+ my $network = $self->get_selected_network or return;
+ $self->network_is_configured($network);
+}
+
sub load_interface_settings {
my ($self) = @_;
require network::network;
diff --git a/lib/network/connection/cellular.pm b/lib/network/connection/cellular.pm
index 60a6000..8a4d0ee 100644
--- a/lib/network/connection/cellular.pm
+++ b/lib/network/connection/cellular.pm
@@ -30,11 +30,6 @@ sub network_is_configured {
defined($self->load_cellular_settings);
}
-sub selected_network_is_configured {
- my ($self) = @_;
- $self->network_is_configured($network);
-}
-
sub write_cellular_settings {
my ($self) = @_;
my $file = $self->get_cellular_settings_file or return;
diff --git a/lib/network/connection/wireless.pm b/lib/network/connection/wireless.pm
index 14fefe6..d36527a 100644
--- a/lib/network/connection/wireless.pm
+++ b/lib/network/connection/wireless.pm
@@ -475,13 +475,6 @@ sub network_is_configured {
}
}
-sub selected_network_is_configured {
- my ($self) = @_;
-
- my $network = $self->get_selected_network or return;
- $self->network_is_configured($network);
-}
-
sub prepare_connection {
my ($self) = @_;
if ($self->{control}{roaming}) {