summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-12-11 15:56:28 +0000
committerThierry Vignaud <tv@mageia.org>2012-12-11 15:56:28 +0000
commit1416b421f5a1e8a8b632adc9686befe2a35f857f (patch)
treed37763197ca7191ae5ab383b96680e37627b4e31
parent44ad1f41063ffc78a8c0692a5f9b99ecd1bc0d82 (diff)
downloaddraklive-install-1416b421f5a1e8a8b632adc9686befe2a35f857f.tar
draklive-install-1416b421f5a1e8a8b632adc9686befe2a35f857f.tar.gz
draklive-install-1416b421f5a1e8a8b632adc9686befe2a35f857f.tar.bz2
draklive-install-1416b421f5a1e8a8b632adc9686befe2a35f857f.tar.xz
draklive-install-1416b421f5a1e8a8b632adc9686befe2a35f857f.zip
(copying_message_with_progress_bar) ensure it doesn't go crazy when
asked to update with the same fraction (migh help mga#7992) basically backporting commit r219767 by pixel on May 23 2007 from drakx: "progress bar wait_message: ensure it doesn't go crazy when asked to update with the same fraction (eg #30090)" backported from trunk with label="blino I hate you and all the lazy forkers..."
-rw-r--r--NEWS3
-rw-r--r--[-rwxr-xr-x]draklive-install12
2 files changed, 11 insertions, 4 deletions
diff --git a/NEWS b/NEWS
index 8328cb3..7e4444b 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+- make sure progress bar doesn't go crazy when asked to update with
+ the same fraction (migh help mga#7992)
+
1.36
- switch from hal to udisks
- fix breakage due to prepare_minimal_root() changes
diff --git a/draklive-install b/draklive-install
index 9543739..d39dcb1 100755..100644
--- a/draklive-install
+++ b/draklive-install
@@ -428,12 +428,16 @@ sub copying_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;
+ mygtk2::flush();
}
};
}