summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive/gtk.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/interactive/gtk.pm')
-rw-r--r--perl-install/interactive/gtk.pm17
1 files changed, 12 insertions, 5 deletions
diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm
index 03832686a..5e2df3011 100644
--- a/perl-install/interactive/gtk.pm
+++ b/perl-install/interactive/gtk.pm
@@ -699,7 +699,6 @@ sub create_widgets {
$mainw->{retval} = $v;
Gtk2->main_quit;
}
- mygtk2::destroy_previous_popped_and_reuse_window();
$mainw->{rwindow}->show;
$update->();
};
@@ -881,11 +880,15 @@ sub ask_from__add_modify_removeW {
$o->ask_from($title, $message, $l, %callback);
}
+my $reuse_timeout;
+
sub wait_messageW {
my ($o, $title, $message, $message_modifiable) = @_;
my $to_modify = Gtk2::Label->new(scalar warp_text(ref $message_modifiable ? '' : $message_modifiable));
+ Glib::Source->remove($reuse_timeout) if $reuse_timeout; $reuse_timeout = '';
+
my $Window = gtknew('MagicWindow',
title => $title,
pop_it => defined $o->{pop_wait_messages} ? $o->{pop_wait_messages} : 1,
@@ -912,10 +915,14 @@ sub wait_message_nextW {
}
sub wait_message_endW {
my ($_o, $Window) = @_;
- $Window->{pop_and_reuse} and return;
-
- mygtk2::may_destroy($Window);
- mygtk2::flush();
+ if ($Window->{pop_and_reuse}) {
+ $reuse_timeout = Glib::Timeout->add(100, sub {
+ mygtk2::destroy_previous_popped_and_reuse_window();
+ });
+ } else {
+ mygtk2::may_destroy($Window);
+ mygtk2::flush();
+ }
}
sub wait_message_with_progress_bar {