summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2007-10-05 13:27:18 +0000
committerOlivier Blin <oblin@mandriva.com>2007-10-05 13:27:18 +0000
commit011c03906550084967362b3bda855bc7d9ce33ae (patch)
treeb1529ecc2ed5cd2199610d36cf03967c2031a524
parente7f83e4b1a218c74e017dbc4ab9b67e5cf1fcd38 (diff)
downloaddrakx-net-011c03906550084967362b3bda855bc7d9ce33ae.tar
drakx-net-011c03906550084967362b3bda855bc7d9ce33ae.tar.gz
drakx-net-011c03906550084967362b3bda855bc7d9ce33ae.tar.bz2
drakx-net-011c03906550084967362b3bda855bc7d9ce33ae.tar.xz
drakx-net-011c03906550084967362b3bda855bc7d9ce33ae.zip
net_applet/drakroam/draknetcenter: list current network on top of network list
-rwxr-xr-xbin/net_applet2
-rw-r--r--lib/network/connection_manager.pm2
2 files changed, 2 insertions, 2 deletions
diff --git a/bin/net_applet b/bin/net_applet
index 2dcae50..c3b7ddc 100755
--- a/bin/net_applet
+++ b/bin/net_applet
@@ -430,7 +430,7 @@ sub empty_menu {
sub get_wireless_networks_sorted() {
sort {
- $b->{signal_strength} <=> $a->{signal_strength} || $a->{name} cmp $b->{name};
+ $b->{current} <=> $a->{current} || $b->{signal_strength} <=> $a->{signal_strength} || $a->{name} cmp $b->{name};
} values %wireless_networks;
}
diff --git a/lib/network/connection_manager.pm b/lib/network/connection_manager.pm
index a7bac80..113eaa9 100644
--- a/lib/network/connection_manager.pm
+++ b/lib/network/connection_manager.pm
@@ -220,7 +220,7 @@ sub filter_networks {
my ($connection) = @_;
$_->{configured} = $connection->network_is_configured($_) foreach values %{$connection->{networks}};
sort {
- $b->{configured} <=> $a->{configured} || $b->{signal_strength} <=> $a->{signal_strength} || $a->{name} cmp $b->{name};
+ $b->{current} <=> $a->{current} || $b->{configured} <=> $a->{configured} || $b->{signal_strength} <=> $a->{signal_strength} || $a->{name} cmp $b->{name};
} values %{$connection->{networks}};
}