summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-09-03 14:35:19 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-09-03 14:35:19 +0000
commit09f36f045b5aaf8f159a9b13a78c4240a7530ee5 (patch)
tree502c09d399ea06246d85996de8abc23eb555f457 /perl-install
parent6518ec62a3cbdd36f28ad69b28fa458fab51068f (diff)
downloaddrakx-09f36f045b5aaf8f159a9b13a78c4240a7530ee5.tar
drakx-09f36f045b5aaf8f159a9b13a78c4240a7530ee5.tar.gz
drakx-09f36f045b5aaf8f159a9b13a78c4240a7530ee5.tar.bz2
drakx-09f36f045b5aaf8f159a9b13a78c4240a7530ee5.tar.xz
drakx-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')
-rw-r--r--perl-install/any.pm1
-rw-r--r--perl-install/install/NEWS4
-rw-r--r--perl-install/install/steps_gtk.pm1
-rw-r--r--perl-install/interactive/gtk.pm17
4 files changed, 16 insertions, 7 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index 5603179f7..1ea7d9df0 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -852,7 +852,6 @@ sub urpmi_add_all_media {
if ($binary eq 'urpmi.addmedia') {
$wait = $in->wait_message(N("Please wait"), N("Please wait, adding media..."));
} elsif ($in->isa('interactive::gtk')) {
- mygtk2::destroy_previous_popped_and_reuse_window();
mygtk2::flush();
}
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index 6c5acdcad..6f3c01870 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,3 +1,7 @@
+- fix buggy blocking wait_message occuring in diskdrake
+ (using a more powerful strategy to ensure such blocking wait_message won't
+ bother us anymore)
+
Version 11.33.1 - 2 September 2008
- make "ask_warn" dialogs be centered
diff --git a/perl-install/install/steps_gtk.pm b/perl-install/install/steps_gtk.pm
index 02d70a743..0315e2d46 100644
--- a/perl-install/install/steps_gtk.pm
+++ b/perl-install/install/steps_gtk.pm
@@ -649,7 +649,6 @@ sub summary_prompt {
set_default_step_items($e->{banner_title} || $old_title);
$e->{clicked}();
set_default_step_items($old_title);
- mygtk2::destroy_previous_popped_and_reuse_window();
$w->{rwindow}->show;
$set_entry_labels->();
}) ];
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 {