summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-08-19 14:52:47 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-08-19 14:52:47 +0000
commitcae5d8a4be62874d71a3c84d94e94bbfe0df7bad (patch)
tree1768e51cc1b011965ef710a0e90ff242b9ecb113
parentc77c90953e0138a049985bea98a901a727478f14 (diff)
downloaddrakx-cae5d8a4be62874d71a3c84d94e94bbfe0df7bad.tar
drakx-cae5d8a4be62874d71a3c84d94e94bbfe0df7bad.tar.gz
drakx-cae5d8a4be62874d71a3c84d94e94bbfe0df7bad.tar.bz2
drakx-cae5d8a4be62874d71a3c84d94e94bbfe0df7bad.tar.xz
drakx-cae5d8a4be62874d71a3c84d94e94bbfe0df7bad.zip
(create_ctree): fix focusing (the assumption number of leaves = number of lines is dumb)
-rw-r--r--perl-install/interactive_gtk.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/perl-install/interactive_gtk.pm b/perl-install/interactive_gtk.pm
index f7e5020d9..58541304c 100644
--- a/perl-install/interactive_gtk.pm
+++ b/perl-install/interactive_gtk.pm
@@ -175,9 +175,9 @@ sub create_ctree {
for (my $c = $node; $c; $c = $c->row->parent) {
$tree->expand($c);
}
- foreach (0 .. $#l) {
- if ($tree->node_nth($_) == $node) {
- $tree->set_focus_row($_);
+ for (my $i = 0; $tree->node_nth($i); $i++) {
+ if ($tree->node_nth($i) == $node) {
+ $tree->set_focus_row($i);
last;
}
}