Added download label

This commit is contained in:
obscuren
2014-10-02 01:37:23 +02:00
parent 6db40ecb22
commit 5053ec2190
2 changed files with 13 additions and 0 deletions

View File

@ -466,12 +466,17 @@ func (gui *Gui) update() {
var (
pct float64 = 1.0 / float64(chainLength) * float64(blockLength)
dlWidget = gui.win.Root().ObjectByName("downloadIndicator")
dlLabel = gui.win.Root().ObjectByName("downloadLabel")
)
if pct < 1.0 {
dlWidget.Set("visible", true)
dlWidget.Set("value", pct)
dlLabel.Set("visible", true)
dlLabel.Set("text", fmt.Sprintf("%d / %d", blockLength, chainLength))
} else {
dlWidget.Set("visible", false)
dlLabel.Set("visible", false)
}
case <-statsUpdateTicker.C: