diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2016-06-22 13:49:20 +0200 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2016-06-22 13:49:20 +0200 |
commit | 0726abff2a415474933eaf88981d259117969dfe (patch) | |
tree | 72d3e5d798afea86e100fdc1ac0d11b51630d128 /perl-install/services.pm | |
parent | 73480a6a3a2b47b70b1ca6ac6c961d3912fa71ad (diff) | |
download | drakx-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.pm | 7 |
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 { |