aboutsummaryrefslogtreecommitdiffstats
path: root/lib
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
parent28b00cc62d1ab52ef450fcd8a6a6fd0116bb51f0 (diff)
downloadmanatools-4d6b0773e691905cdfcf8ed0011225edc5e394fc.tar
manatools-4d6b0773e691905cdfcf8ed0011225edc5e394fc.tar.gz
manatools-4d6b0773e691905cdfcf8ed0011225edc5e394fc.tar.bz2
manatools-4d6b0773e691905cdfcf8ed0011225edc5e394fc.tar.xz
manatools-4d6b0773e691905cdfcf8ed0011225edc5e394fc.zip
Group sorting
Diffstat (limited to 'lib')
-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 40650518..28e10f44 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);
+ }
}