diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-01-11 11:51:17 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-01-11 11:51:17 +0000 |
commit | 8501f3c1936799c90ffcf6b58a52f902828d4b92 (patch) | |
tree | f0d33fe3ca0eeae5283401ac66245fa43941ac83 /perl-install/my_gtk.pm | |
parent | b240a4a3d696847dcb56bcbcf100abf6fd9dcd9d (diff) | |
download | drakx-8501f3c1936799c90ffcf6b58a52f902828d4b92.tar drakx-8501f3c1936799c90ffcf6b58a52f902828d4b92.tar.gz drakx-8501f3c1936799c90ffcf6b58a52f902828d4b92.tar.bz2 drakx-8501f3c1936799c90ffcf6b58a52f902828d4b92.tar.xz drakx-8501f3c1936799c90ffcf6b58a52f902828d4b92.zip |
(main): third argument is a function to call before leaving in case of
"cancel" clicked.
Diffstat (limited to 'perl-install/my_gtk.pm')
-rw-r--r-- | perl-install/my_gtk.pm | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/perl-install/my_gtk.pm b/perl-install/my_gtk.pm index 41f7385a2..a8cd90bff 100644 --- a/perl-install/my_gtk.pm +++ b/perl-install/my_gtk.pm @@ -42,8 +42,8 @@ sub new { $o->{rwindow}->set_modal(1) if $my_gtk::grab || $o->{grab}; $o; } -sub main($;$) { - my ($o, $f) = @_; +sub main { + my ($o, $completed, $canceled) = @_; gtkset_mousecursor_normal(); my $timeout = Gtk->timeout_add(1000, sub { gtkset_mousecursor_normal(); 1 }); my $b = before_leaving { Gtk->timeout_remove($timeout) }; @@ -52,7 +52,7 @@ sub main($;$) { do { local $::setstep = 1; Gtk->main; - } while ($o->{retval} && $f && !&$f()); + } while ($o->{retval} ? $completed && !$completed->() : $canceled && !$canceled->()); $o->destroy; $o->{retval} } |