summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/NEWS2
-rw-r--r--perl-install/interactive/gtk.pm14
2 files changed, 11 insertions, 5 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 7d347b54b..aee2bbc19 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,3 +1,5 @@
+- progress bar wait_message: ensure it doesn't go crazy when asked to update
+ with the same fraction (eg #30090)
- diskdrake:
o when formatting ntfs don't zero partition (#30928)
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();
}
};
}