summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2002-08-22 15:26:01 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2002-08-22 15:26:01 +0000
commit76761ff24d3358147c214490defbab4910201d73 (patch)
tree49846a724d62036fc4313513a5a2b5b3854aeda4
parenta5e6faec4e367f5adce063b04d1c20db59882b44 (diff)
downloaddrakx-76761ff24d3358147c214490defbab4910201d73.tar
drakx-76761ff24d3358147c214490defbab4910201d73.tar.gz
drakx-76761ff24d3358147c214490defbab4910201d73.tar.bz2
drakx-76761ff24d3358147c214490defbab4910201d73.tar.xz
drakx-76761ff24d3358147c214490defbab4910201d73.zip
hackery for [+] intruded some situations where we really don't
want any child, so provide an option to have nochild when necessary
-rw-r--r--perl-install/my_gtk.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm
index bdf3933b8..d2f652f64 100644
--- a/perl-install/my_gtk.pm
+++ b/perl-install/my_gtk.pm
@@ -454,18 +454,19 @@ sub ask_browse_tree_info_given_widgets {
$wtree{$s};
};
my $add_node = sub {
- my ($leaf, $root) = @_;
+ my ($leaf, $root, $options) = @_;
my $state = $common->{node_state}($leaf) or return;
if ($leaf) {
my $node = $w->{tree}->insert_node($add_parent->($root, $state), undef, [$leaf, '', ''], 5, (undef) x 4, 1, 0);
$set_node_state->($node, $state);
push @{$ptree{$leaf}}, $node;
} else {
+ my $parent = $add_parent->($root, $state);
#- hackery for partial displaying of trees, used in rpmdrake:
- #- if leaf is void, we do create the parent and one child (to have the [+] in front of the parent in the ctree)
+ #- if leaf is void, we may create the parent and one child (to have the [+] in front of the parent in the ctree)
#- though we use '' as the label of the child; then rpmdrake will connect on tree_expand, and whenever
#- the first child has '' as the label, it will remove the child and add all the "right" children
- $w->{tree}->insert_node($add_parent->($root, $state), undef, ['', '', ''], 5, (undef) x 4, 1, 0);
+ $options->{nochild} or $w->{tree}->insert_node($parent, undef, ['', '', ''], 5, (undef) x 4, 1, 0);
}
};
$common->{delete_all} = sub {