diff --git a/org.getmonero.i2p.zero.gui/org.getmonero.i2p.zero.gui.iml b/org.getmonero.i2p.zero.gui/org.getmonero.i2p.zero.gui.iml index bfeffbb..f1d4cf3 100644 --- a/org.getmonero.i2p.zero.gui/org.getmonero.i2p.zero.gui.iml +++ b/org.getmonero.i2p.zero.gui/org.getmonero.i2p.zero.gui.iml @@ -11,7 +11,7 @@ - + @@ -20,7 +20,7 @@ - + @@ -29,7 +29,7 @@ - + @@ -38,7 +38,7 @@ - + @@ -47,7 +47,7 @@ - + @@ -56,7 +56,7 @@ - + @@ -65,7 +65,7 @@ - + @@ -74,7 +74,7 @@ - + diff --git a/org.getmonero.i2p.zero.gui/src/org/getmonero/i2p/zero/gui/Controller.java b/org.getmonero.i2p.zero.gui/src/org/getmonero/i2p/zero/gui/Controller.java index 9f10897..72b8df9 100644 --- a/org.getmonero.i2p.zero.gui/src/org/getmonero/i2p/zero/gui/Controller.java +++ b/org.getmonero.i2p.zero.gui/src/org/getmonero/i2p/zero/gui/Controller.java @@ -285,11 +285,11 @@ public class Controller { bandwidthIn1s.setText(format2dp.format(routerWrapper.get1sRateInKBps()) + " KBps"); bandwidthIn5m.setText(format2dp.format(routerWrapper.get5mRateInKBps()) + " KBps"); bandwidthInAll.setText(format2dp.format(routerWrapper.getAvgRateInKBps()) + " KBps"); - totalTransferredIn.setText(format2dp.format(routerWrapper.getTotalInMB()) + " MB "); + totalTransferredIn.setText(formatTransferAmount(routerWrapper.getTotalInMB())+" "); bandwidthOut1s.setText(format2dp.format(routerWrapper.get1sRateOutKBps()) + " KBps"); bandwidthOut5m.setText(format2dp.format(routerWrapper.get5mRateOutKBps()) + " KBps"); bandwidthOutAll.setText(format2dp.format(routerWrapper.getAvgRateOutKBps()) + " KBps"); - totalTransferredOut.setText(format2dp.format(routerWrapper.getTotalOutMB()) + " MB "); + totalTransferredOut.setText(formatTransferAmount(routerWrapper.getTotalOutMB())+" "); statusLabel.setText("Status: " + routerWrapper.getReachability().getMessage()); @@ -304,6 +304,14 @@ public class Controller { } + private String formatTransferAmount(double amt) { + String unit = "MB"; + if(amt>=1000) { amt/= 1000d; unit = "GB"; } + if(amt>=1000) { amt/= 1000d; unit = "TB"; } + if(amt>=1000) { amt/= 1000d; unit = "PB"; } + return format2dp.format(amt) + " " + unit; + } + private void listenForTunnelChanges() { new Thread(()->{ while(getRouterWrapper()==null || getRouterWrapper().getTunnelControl()==null) { diff --git a/org.getmonero.i2p.zero/src/org/getmonero/i2p/zero/VERSION b/org.getmonero.i2p.zero/src/org/getmonero/i2p/zero/VERSION index 9f76d37..ba885f1 100644 --- a/org.getmonero.i2p.zero/src/org/getmonero/i2p/zero/VERSION +++ b/org.getmonero.i2p.zero/src/org/getmonero/i2p/zero/VERSION @@ -1 +1 @@ -1.13 \ No newline at end of file +1.14 \ No newline at end of file diff --git a/org.getmonero.util.normalizeZip/org.getmonero.util.normalizeZip.iml b/org.getmonero.util.normalizeZip/org.getmonero.util.normalizeZip.iml index 5731387..9074b00 100644 --- a/org.getmonero.util.normalizeZip/org.getmonero.util.normalizeZip.iml +++ b/org.getmonero.util.normalizeZip/org.getmonero.util.normalizeZip.iml @@ -10,7 +10,7 @@ - +