summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive/gtk.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2005-05-26 14:27:49 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2005-05-26 14:27:49 +0000
commit93da18e26450719c57a9f9f92e02037ac84fb82d (patch)
treed38a698b83fa9fd6b6555d823559547c7412f4e5 /perl-install/interactive/gtk.pm
parentf851d69902dfbcea9a2f9f7814d66ff805b1fe5d (diff)
downloaddrakx-backup-do-not-use-93da18e26450719c57a9f9f92e02037ac84fb82d.tar
drakx-backup-do-not-use-93da18e26450719c57a9f9f92e02037ac84fb82d.tar.gz
drakx-backup-do-not-use-93da18e26450719c57a9f9f92e02037ac84fb82d.tar.bz2
drakx-backup-do-not-use-93da18e26450719c57a9f9f92e02037ac84fb82d.tar.xz
drakx-backup-do-not-use-93da18e26450719c57a9f9f92e02037ac84fb82d.zip
fix setting a combobox with a tree
Diffstat (limited to 'perl-install/interactive/gtk.pm')
-rw-r--r--perl-install/interactive/gtk.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm
index 0405f759c..3b10a3e9e 100644
--- a/perl-install/interactive/gtk.pm
+++ b/perl-install/interactive/gtk.pm
@@ -594,7 +594,12 @@ sub ask_fromW {
$set = sub {
my $s = may_apply($e->{format}, $_[0]);
- $w->set_text($s) if $s ne $w->get_text && $_[0] ne $w->get_text;
+ next if !($s ne $w->get_text && $_[0] ne $w->get_text);
+ if ($model) {
+ $w->set_active($model->{indexes}{$s});
+ } else {
+ $w->set_text($s);
+ }
};
$get = sub {
my $s = $model ? { reverse %{$model->{indexes}} }->{$w->get_active} : $w->get_text;