summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-01-03 19:47:32 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-01-03 19:47:32 +0000
commitd82f0edeb3cd1448d6dc234b353c516e0b147020 (patch)
treef45258fa9bb472132a1be152d7d6492802c719df
parent18ce92eb868a38de19c18f71646e923c9cb3bc85 (diff)
downloaddrakx-backup-do-not-use-d82f0edeb3cd1448d6dc234b353c516e0b147020.tar
drakx-backup-do-not-use-d82f0edeb3cd1448d6dc234b353c516e0b147020.tar.gz
drakx-backup-do-not-use-d82f0edeb3cd1448d6dc234b353c516e0b147020.tar.bz2
drakx-backup-do-not-use-d82f0edeb3cd1448d6dc234b353c516e0b147020.tar.xz
drakx-backup-do-not-use-d82f0edeb3cd1448d6dc234b353c516e0b147020.zip
(create_treeview_list): fix setter
-rw-r--r--perl-install/interactive/gtk.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm
index 1ac555907..71d1acff7 100644
--- a/perl-install/interactive/gtk.pm
+++ b/perl-install/interactive/gtk.pm
@@ -137,11 +137,12 @@ sub create_treeview_list {
my ($v) = @_;
eval {
my $nb = find_index { $_ eq $v } @{$e->{list}};
- my ($path) = $list_tv->get_cursor;
- if ($path) {
- $select->($path) if $nb != $path->to_string;
+ my ($old_path) = $list_tv->get_cursor;
+ if (!$old_path || $nb != $old_path) {
+ $select->(my $path = Gtk2::TreePath->new_from_string($nb));
$path->free;
}
+ $old_path->free if $old_path;
};
};
}