Author: yradtsevich
Date: 2012-01-23 06:03:36 -0500 (Mon, 23 Jan 2012)
New Revision: 38026
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/BrowserSim.java
Log:
https://issues.jboss.org/browse/JBIDE-10431 : browsersim should be sexy
- fixed the problem when the progress bar is never hidden on linux (progress 100% is
reported)
Modified:
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/BrowserSim.java
===================================================================
---
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/BrowserSim.java 2012-01-23
10:56:57 UTC (rev 38025)
+++
trunk/vpe/plugins/org.jboss.tools.vpe.browsersim/src/org/jboss/tools/vpe/browsersim/ui/BrowserSim.java 2012-01-23
11:03:36 UTC (rev 38026)
@@ -157,8 +157,12 @@
browser.addProgressListener(new ProgressListener() {
public void changed(ProgressEvent event) {
- if (event.total == 0) return;
- int ratio = event.current * 100 / event.total;
+ int ratio;
+ if (event.current == event.total || event.total == 0) {
+ ratio = -1;
+ } else {
+ ratio = event.current * 100 / event.total;
+ }
skin.progressChanged(ratio);
}
public void completed(ProgressEvent event) {