diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2008-09-03 14:35:19 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2008-09-03 14:35:19 +0000 |
commit | 09f36f045b5aaf8f159a9b13a78c4240a7530ee5 (patch) | |
tree | 502c09d399ea06246d85996de8abc23eb555f457 /perl-install/interactive | |
parent | 6518ec62a3cbdd36f28ad69b28fa458fab51068f (diff) | |
download | drakx-backup-do-not-use-09f36f045b5aaf8f159a9b13a78c4240a7530ee5.tar drakx-backup-do-not-use-09f36f045b5aaf8f159a9b13a78c4240a7530ee5.tar.gz drakx-backup-do-not-use-09f36f045b5aaf8f159a9b13a78c4240a7530ee5.tar.bz2 drakx-backup-do-not-use-09f36f045b5aaf8f159a9b13a78c4240a7530ee5.tar.xz drakx-backup-do-not-use-09f36f045b5aaf8f159a9b13a78c4240a7530ee5.zip |
- fix buggy blocking wait_message occuring in diskdrake
(using a more powerful strategy to ensure such blocking wait_message won't
bother use anymore)
Diffstat (limited to 'perl-install/interactive')
-rw-r--r-- | perl-install/interactive/gtk.pm | 17 |
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 { |