From 96dec68926084eb37dce0ef9f451af336526e02b Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Wed, 5 Mar 2008 20:26:25 +0000 Subject: include interface name when selecting device in drakconnect --- lib/network/connection.pm | 7 +++++++ lib/network/netconnect.pm | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/network/connection.pm b/lib/network/connection.pm index b942881..6415282 100644 --- a/lib/network/connection.pm +++ b/lib/network/connection.pm @@ -80,6 +80,13 @@ sub get_description { $description; } +sub get_label { + my ($self) = @_; + my $intf = $self->get_interface; + my $descr = $self->get_description; + $intf ? sprintf("%s (%s)", $descr, $intf) : $descr; +} + sub get_driver { my ($self) = @_; $self->{device}{driver}; diff --git a/lib/network/netconnect.pm b/lib/network/netconnect.pm index dc50da6..50c6174 100644 --- a/lib/network/netconnect.pm +++ b/lib/network/netconnect.pm @@ -144,7 +144,7 @@ sub real_main { select_connection => { name => sub { $net->{type}->get_type_name . "\n\n" . N("Select the network interface to configure:") }, data => [ { val => \$connection, type => 'list', list => \@connections_list, - format => sub { $_[0] && $_[0]->get_description }, allow_empty_list => 1 } ], + format => sub { $_[0] && $_[0]->get_label }, allow_empty_list => 1 } ], complete => sub { $connection->setup_thirdparty($in) or return 1; $connection->prepare_device; -- cgit v1.2.1