summaryrefslogtreecommitdiffstats
path: root/perl-install/services.pm
diff options
context:
space:
mode:
authorThierry Vignaud <thierry.vignaud@gmail.com>2016-06-22 13:49:20 +0200
committerThierry Vignaud <thierry.vignaud@gmail.com>2016-06-22 13:49:20 +0200
commit0726abff2a415474933eaf88981d259117969dfe (patch)
tree72d3e5d798afea86e100fdc1ac0d11b51630d128 /perl-install/services.pm
parent73480a6a3a2b47b70b1ca6ac6c961d3912fa71ad (diff)
downloaddrakx-0726abff2a415474933eaf88981d259117969dfe.tar
drakx-0726abff2a415474933eaf88981d259117969dfe.tar.gz
drakx-0726abff2a415474933eaf88981d259117969dfe.tar.bz2
drakx-0726abff2a415474933eaf88981d259117969dfe.tar.xz
drakx-0726abff2a415474933eaf88981d259117969dfe.zip
sort service categories, putting "Other" at end
Resolves: mga#6286
Diffstat (limited to 'perl-install/services.pm')
-rw-r--r--perl-install/services.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/perl-install/services.pm b/perl-install/services.pm
index d80c54558..6ea7d5c2e 100644
--- a/perl-install/services.pm
+++ b/perl-install/services.pm
@@ -193,8 +193,13 @@ sub ask_ {
node_state => sub { $services{$_[0]} ? 'selected' : 'unselected' },
build_tree => sub {
my ($add_node, $flat) = @_;
+ # sort existing services by category, putting "Other" at end
+ my @srvs = grep { $services{$_} } map { @{$root_services{$_}} }
+ sort { $a cmp $b } keys %root_services;
+ # put "Others" last:
+ push @srvs, difference2([ keys %services ], \@srvs);
$add_node->($_, !$flat && ($services_root{$_} || N("Other")))
- foreach sort keys %services;
+ foreach @srvs;
},
grep_unselected => sub { grep { !$services{$_} } @_ },
toggle_nodes => sub {