aboutsummaryrefslogtreecommitdiffstats
path: root/lib/AdminPanel/Rpmdragora
diff options
context:
space:
mode:
authorAngelo Naselli <anaselli@linux.it>2014-11-18 19:06:16 +0100
committerAngelo Naselli <anaselli@linux.it>2014-11-18 19:06:16 +0100
commit4d6b0773e691905cdfcf8ed0011225edc5e394fc (patch)
tree689027151657546e48c878f7183cc2db943baba2 /lib/AdminPanel/Rpmdragora
parent28b00cc62d1ab52ef450fcd8a6a6fd0116bb51f0 (diff)
downloadcolin-keep-4d6b0773e691905cdfcf8ed0011225edc5e394fc.tar
colin-keep-4d6b0773e691905cdfcf8ed0011225edc5e394fc.tar.gz
colin-keep-4d6b0773e691905cdfcf8ed0011225edc5e394fc.tar.bz2
colin-keep-4d6b0773e691905cdfcf8ed0011225edc5e394fc.tar.xz
colin-keep-4d6b0773e691905cdfcf8ed0011225edc5e394fc.zip
Group sorting
Diffstat (limited to 'lib/AdminPanel/Rpmdragora')
-rw-r--r--lib/AdminPanel/Rpmdragora/gui.pm8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/AdminPanel/Rpmdragora/gui.pm b/lib/AdminPanel/Rpmdragora/gui.pm
index 4065051..28e10f4 100644
--- a/lib/AdminPanel/Rpmdragora/gui.pm
+++ b/lib/AdminPanel/Rpmdragora/gui.pm
@@ -1407,6 +1407,7 @@ sub toggle_nodes {
}
# invoke set_leaf_state($pkgname, node_state, )
# node_state = {to_install, to_remove,...}
+
$set_state->($_, node_state($_), $detail_list);
if (my $pkg = $pkgs->{$_}{pkg}) {
# FIXME: shouldn't we threat all of them as POSITIVE (as selected size)
@@ -1487,13 +1488,18 @@ sub _build_tree {
#- we populate all the groups tree at first
%$elems = ();
# better loop on packages, create groups tree and push packages in the proper place:
+ my @groups = ();
foreach my $pkg (@elems) {
my $grp = $pkg->[1];
# no state for groups (they're not packages and thus have no state)
- add_parent($tree, $grp, undef);
+ push @groups, $grp;
+
$elems->{$grp} ||= [];
push @{$elems->{$grp}}, $pkg;
}
+ foreach my $grp (sort @groups) {
+ add_parent($tree, $grp, undef);
+ }
}