diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-03-11 18:49:47 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-03-11 18:49:47 +0000 |
commit | 74baf34d2e228568a1488b24a0305e6f48ceecef (patch) | |
tree | 31ac7e5e5fdd844709f678cff3e2127086ee5787 /lib/network/drakroam.pm | |
parent | a35a98ff1037b1bba5993102ae71fed4030738cb (diff) | |
download | drakx-net-74baf34d2e228568a1488b24a0305e6f48ceecef.tar drakx-net-74baf34d2e228568a1488b24a0305e6f48ceecef.tar.gz drakx-net-74baf34d2e228568a1488b24a0305e6f48ceecef.tar.bz2 drakx-net-74baf34d2e228568a1488b24a0305e6f48ceecef.tar.xz drakx-net-74baf34d2e228568a1488b24a0305e6f48ceecef.zip |
preselect "No device found" in connections list if no device is found
Diffstat (limited to 'lib/network/drakroam.pm')
-rwxr-xr-x | lib/network/drakroam.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/network/drakroam.pm b/lib/network/drakroam.pm index 8d53108..459ff54 100755 --- a/lib/network/drakroam.pm +++ b/lib/network/drakroam.pm @@ -23,7 +23,9 @@ sub update_connections_list { $droam->{gui}{model}->set($droam->{gui}{model}->append, 0, gtknew('Pixbuf', file => $_->get_type_icon)->scale_simple($droam->{gui}{pixbuf_size}, $droam->{gui}{pixbuf_size}, 'hyper'), 1, $_->get_description) foreach @{$droam->{all_connections}}; - my $index = $droam->{connection} && eval { find_index { $_ == $droam->{connection} } @{$droam->{all_connections}} }; + my $index = $droam->{connection} ? + eval { find_index { $_ == $droam->{connection} } @{$droam->{all_connections}} } + : 0; $droam->{gui}{connections_combo}->set_active($index) if defined $index; } |