summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-02-19 19:42:08 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-02-19 19:42:08 +0000
commit0e5a578902f70b8531bcf888a4411509c45b4d20 (patch)
treefd2d88302c6851e718349e88e50647bc0aa03636
parent58b1693f3c052ea86120cf1af9dbed0370f9410f (diff)
downloaddrakx-0e5a578902f70b8531bcf888a4411509c45b4d20.tar
drakx-0e5a578902f70b8531bcf888a4411509c45b4d20.tar.gz
drakx-0e5a578902f70b8531bcf888a4411509c45b4d20.tar.bz2
drakx-0e5a578902f70b8531bcf888a4411509c45b4d20.tar.xz
drakx-0e5a578902f70b8531bcf888a4411509c45b4d20.zip
can't use $mainw->{ok}->clicked since $mainw->{ok} doesn't always exist, set
{retval} and main_quit instead (the way it was done for double click, is this ok when pressing enter?)
-rw-r--r--perl-install/interactive/gtk.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm
index 5e18a3591..1951137a6 100644
--- a/perl-install/interactive/gtk.pm
+++ b/perl-install/interactive/gtk.pm
@@ -355,7 +355,11 @@ sub ask_fromW {
my (@widgets, @widgets_always, @widgets_advanced, $advanced, $advanced_pack, $has_horiz_scroll, $has_scroll, $max_width);
my $total_size = 0;
my $tooltips = Gtk2::Tooltips->new;
- my $ok_clicked = sub { $mainw->{ok}->get_property('sensitive') and $mainw->{ok}->clicked };
+ my $ok_clicked = sub {
+ $mainw->{ok}->get_property('sensitive') or return;
+ $mainw->{retval} = 1;
+ Gtk2->main_quit;
+ };
my $set_all = sub {
$ignore = 1;
$_->{set}->(${$_->{e}{val}}, $_) foreach @widgets_always, @widgets_advanced;