From 1a6e5b727d651158669d405075b8069a2fbe42d9 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Thu, 19 Feb 2009 16:51:54 +0000 Subject: sort channels list --- perl-install/standalone/drakdvb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'perl-install/standalone/drakdvb') diff --git a/perl-install/standalone/drakdvb b/perl-install/standalone/drakdvb index b4f1e2010..222dfd51e 100755 --- a/perl-install/standalone/drakdvb +++ b/perl-install/standalone/drakdvb @@ -94,16 +94,17 @@ sub detect_channels() { } sub load_channels() { - @{$channel_list->{data}} = (); + my @channels; open(my $CHANNELCONF, "<$config_file"); local $_; while (<$CHANNELCONF>) { my $line = $_; if ($line =~ /^([^:]*?)(\([^(:]*\))?:/) { - push @{$channel_list->{data}}, [ $1, $1 . $2 ]; + push @channels, [ $1, $1 . $2 ]; } } close($CHANNELCONF); + @{$channel_list->{data}} = sort { $a->[0] cmp $b->[0] } @channels; if (defined @{$channel_list->{data}}[0]) { $channel_list->select(0); } -- cgit v1.2.1