summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-02-19 16:51:54 +0000
committerOlivier Blin <oblin@mandriva.com>2009-02-19 16:51:54 +0000
commit1a6e5b727d651158669d405075b8069a2fbe42d9 (patch)
treed8c2bf5d7016cc4079063cf89cf8013e9b1e141d /perl-install/standalone
parent14977dfca93c0be0e62bb2a29edb07317efb808d (diff)
downloaddrakx-1a6e5b727d651158669d405075b8069a2fbe42d9.tar
drakx-1a6e5b727d651158669d405075b8069a2fbe42d9.tar.gz
drakx-1a6e5b727d651158669d405075b8069a2fbe42d9.tar.bz2
drakx-1a6e5b727d651158669d405075b8069a2fbe42d9.tar.xz
drakx-1a6e5b727d651158669d405075b8069a2fbe42d9.zip
sort channels list
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/drakdvb5
1 files changed, 3 insertions, 2 deletions
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);
}