summaryrefslogtreecommitdiffstats
path: root/lib/network/drakroam.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-03-11 18:49:47 +0000
committerOlivier Blin <oblin@mandriva.com>2008-03-11 18:49:47 +0000
commit74baf34d2e228568a1488b24a0305e6f48ceecef (patch)
tree31ac7e5e5fdd844709f678cff3e2127086ee5787 /lib/network/drakroam.pm
parenta35a98ff1037b1bba5993102ae71fed4030738cb (diff)
downloaddrakx-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-xlib/network/drakroam.pm4
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;
}