aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-02-14 01:15:23 +0800
committerobscuren <geffobscura@gmail.com>2015-02-14 01:15:23 +0800
commitce239333d529898edd8333637fd75c565e80a9ff (patch)
tree763f273cff09726bb16acf715d5ce0e2908e0b8f /cmd
parent0f3c25b26589f5667b618d6a91b73392d02ccd1e (diff)
downloaddexon-ce239333d529898edd8333637fd75c565e80a9ff.tar.gz
dexon-ce239333d529898edd8333637fd75c565e80a9ff.tar.zst
dexon-ce239333d529898edd8333637fd75c565e80a9ff.zip
Update balance label when mining
Diffstat (limited to 'cmd')
-rw-r--r--cmd/mist/assets/qml/views/wallet.qml11
-rw-r--r--cmd/mist/gui.go4
2 files changed, 14 insertions, 1 deletions
diff --git a/cmd/mist/assets/qml/views/wallet.qml b/cmd/mist/assets/qml/views/wallet.qml
index 545098284..838fa8749 100644
--- a/cmd/mist/assets/qml/views/wallet.qml
+++ b/cmd/mist/assets/qml/views/wallet.qml
@@ -15,6 +15,17 @@ Rectangle {
objectName: "walletView"
anchors.fill: parent
+ Label {
+ objectName: "balanceLabel"
+ visible: false
+ font.pixelSize: 10
+ anchors.right: lastBlockLabel.left
+ anchors.rightMargin: 5
+ onTextChanged: {
+ menuItem.secondaryTitle = text
+ }
+ }
+
function onReady() {
setBalance()
}
diff --git a/cmd/mist/gui.go b/cmd/mist/gui.go
index 484cda5ff..c4ce1d463 100644
--- a/cmd/mist/gui.go
+++ b/cmd/mist/gui.go
@@ -412,7 +412,9 @@ func (gui *Gui) update() {
switch ev := ev.(type) {
case core.NewBlockEvent:
gui.processBlock(ev.Block, false)
- gui.setWalletValue(gui.eth.ChainManager().State().GetBalance(gui.address()), nil)
+ //gui.setWalletValue(gui.eth.ChainManager().State().GetBalance(gui.address()), nil)
+ balance := ethutil.CurrencyToString(gui.eth.ChainManager().State().GetBalance(gui.address()))
+ gui.getObjectByName("balanceLabel").Set("text", fmt.Sprintf("%v", balance))
case core.TxPreEvent:
tx := ev.Tx