diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2007-05-23 15:44:33 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2007-05-23 15:44:33 +0000 |
commit | fb670a753d9ce829aeab0b562396567908ddc6a4 (patch) | |
tree | 8363897dcd89b09fe7d57879d9319f86fe12f6c6 /perl-install/interactive | |
parent | 6ef01e94cc23b5d9e723423280bf5e7458a240a3 (diff) | |
download | drakx-fb670a753d9ce829aeab0b562396567908ddc6a4.tar drakx-fb670a753d9ce829aeab0b562396567908ddc6a4.tar.gz drakx-fb670a753d9ce829aeab0b562396567908ddc6a4.tar.bz2 drakx-fb670a753d9ce829aeab0b562396567908ddc6a4.tar.xz drakx-fb670a753d9ce829aeab0b562396567908ddc6a4.zip |
- progress bar wait_message: ensure it doesn't go crazy when asked to update
with the same fraction (eg #30090)
- also do hide the progress bar (maybe we should not hide it?)
Diffstat (limited to 'perl-install/interactive')
-rw-r--r-- | perl-install/interactive/gtk.pm | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm index 335bdda41..59b0fb288 100644 --- a/perl-install/interactive/gtk.pm +++ b/perl-install/interactive/gtk.pm @@ -862,12 +862,16 @@ sub wait_message_with_progress_bar { if ($total) { $progress or internal_error('You must first give some text to display'); - $progress->set_fraction($current / $total); - $progress->show; - $displayed = 0; - mygtk2::flush() while !$displayed; + my $fraction = min(1, $current / $total); + if ($fraction != $progress->get_fraction) { + $progress->set_fraction($fraction); + $progress->show; + $displayed = 0; + mygtk2::flush() while !$displayed; + } } else { - $progress->hide if !$total; + $progress->hide; + mygtk2::flush(); } }; } |