diff options
author | Angelo Naselli <anaselli@linux.it> | 2014-11-20 20:13:18 +0100 |
---|---|---|
committer | Angelo Naselli <anaselli@linux.it> | 2014-11-20 20:13:18 +0100 |
commit | befe45ef1793514a51d4b3042e10f83b09d25fc7 (patch) | |
tree | b5bf21b5f8601eaae29c731531b3a975f58aaab1 /modules | |
parent | 3bd6c8466081bb1a28eef0134d62ae6c89c339b1 (diff) | |
download | colin-keep-befe45ef1793514a51d4b3042e10f83b09d25fc7.tar colin-keep-befe45ef1793514a51d4b3042e10f83b09d25fc7.tar.gz colin-keep-befe45ef1793514a51d4b3042e10f83b09d25fc7.tar.bz2 colin-keep-befe45ef1793514a51d4b3042e10f83b09d25fc7.tar.xz colin-keep-befe45ef1793514a51d4b3042e10f83b09d25fc7.zip |
Managed the category tree using yui objects directly
Diffstat (limited to 'modules')
-rwxr-xr-x | modules/rpmdragora/rpmdragora | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/modules/rpmdragora/rpmdragora b/modules/rpmdragora/rpmdragora index 496c3ab..0894a44 100755 --- a/modules/rpmdragora/rpmdragora +++ b/modules/rpmdragora/rpmdragora @@ -124,20 +124,17 @@ sub tree_callback { #$current_group = $new_group; #OLD $model && $iter or return; $selection or return; - #OLD my $group = $model->get($iter, 0); - my $group = $selection->label(); - # documentation reference for ->parent() method - # http://doc.opensuse.org/projects/libyui/HEAD/classYItem.html#af78069741ce6b64f7512bc08b5bc857b - # WARNING: it seems that parent method don't return 0 if there is no parent :-( - # WARNING: it seems that parent method actually don't work at all :-/ - #DO NOT WORK my $parent = $selection->parent(); - my $parent = group_parent($group); - while (defined($parent)) { - last if($parent->label() eq $group); - $group = join('|', $parent->label(), $group); - $parent = group_parent(); + + $DB::single = 1; + + my $fullname = $selection->label(); + my $it = $selection; + while ($it = $it->parent()) { + $fullname = join("|", $it->label(), $fullname); } - if(!$selection->hasChildren()){ + my $group = $fullname; + + if (!$selection->hasChildren()) { #$detail_list->window->freeze_updates; $options->{add_nodes}->(@{$elems{$group}}); #$detail_list->window->thaw_updates if $detail_list->window; |