aboutsummaryrefslogtreecommitdiffstats
path: root/ethereal
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-07-18 04:01:39 +0800
committerobscuren <geffobscura@gmail.com>2014-07-18 04:01:39 +0800
commitba3fabda774cc3f0c12542985c7ff252abc034da (patch)
treefe446c2be10317664b63e358ccb7d47de8cf256b /ethereal
parentedf10ef8c5908ffdc787dc9457da6d735212423d (diff)
downloadgo-tangerine-ba3fabda774cc3f0c12542985c7ff252abc034da.tar
go-tangerine-ba3fabda774cc3f0c12542985c7ff252abc034da.tar.gz
go-tangerine-ba3fabda774cc3f0c12542985c7ff252abc034da.tar.bz2
go-tangerine-ba3fabda774cc3f0c12542985c7ff252abc034da.tar.lz
go-tangerine-ba3fabda774cc3f0c12542985c7ff252abc034da.tar.xz
go-tangerine-ba3fabda774cc3f0c12542985c7ff252abc034da.tar.zst
go-tangerine-ba3fabda774cc3f0c12542985c7ff252abc034da.zip
Added a catch up indicator
Diffstat (limited to 'ethereal')
-rw-r--r--ethereal/assets/qml/wallet.qml14
-rw-r--r--ethereal/gui.go17
2 files changed, 27 insertions, 4 deletions
diff --git a/ethereal/assets/qml/wallet.qml b/ethereal/assets/qml/wallet.qml
index c783cde83..afb210bec 100644
--- a/ethereal/assets/qml/wallet.qml
+++ b/ethereal/assets/qml/wallet.qml
@@ -419,6 +419,17 @@ ApplicationWindow {
}
}
+ ProgressBar {
+ id: syncProgressIndicator
+ visible: false
+ objectName: "syncProgressIndicator"
+ y: 3
+ width: 140
+ indeterminate: true
+ anchors.right: peerLabel.left
+ anchors.rightMargin: 5
+ }
+
Label {
y: 7
anchors.right: peerImage.left
@@ -443,6 +454,7 @@ ApplicationWindow {
Window {
id: popup
visible: false
+ flags: Qt.CustomizeWindowHint | Qt.Tool | Qt.WindowCloseButtonHint
property var block
width: root.width
height: 300
@@ -577,6 +589,7 @@ ApplicationWindow {
Window {
id: addPeerWin
+ flags: Qt.CustomizeWindowHint | Qt.Tool | Qt.WindowCloseButtonHint
visible: false
minimumWidth: 230
maximumWidth: 230
@@ -743,6 +756,7 @@ ApplicationWindow {
// ******************************************
Window {
id: peerWindow
+ flags: Qt.CustomizeWindowHint | Qt.Tool | Qt.WindowCloseButtonHint
height: 200
width: 700
Rectangle {
diff --git a/ethereal/gui.go b/ethereal/gui.go
index 39677c38f..f777f64f7 100644
--- a/ethereal/gui.go
+++ b/ethereal/gui.go
@@ -266,14 +266,18 @@ func (gui *Gui) setWalletValue(amount, unconfirmedFunds *big.Int) {
func (gui *Gui) update() {
reactor := gui.eth.Reactor()
- blockChan := make(chan ethutil.React, 1)
- txChan := make(chan ethutil.React, 1)
- objectChan := make(chan ethutil.React, 1)
- peerChan := make(chan ethutil.React, 1)
+ var (
+ blockChan = make(chan ethutil.React, 1)
+ txChan = make(chan ethutil.React, 1)
+ objectChan = make(chan ethutil.React, 1)
+ peerChan = make(chan ethutil.React, 1)
+ chainSyncChan = make(chan ethutil.React, 1)
+ )
reactor.Subscribe("newBlock", blockChan)
reactor.Subscribe("newTx:pre", txChan)
reactor.Subscribe("newTx:post", txChan)
+ reactor.Subscribe("chainSync", chainSyncChan)
nameReg := ethpub.EthereumConfig(gui.eth.StateManager()).NameReg()
if nameReg != nil {
@@ -287,6 +291,7 @@ func (gui *Gui) update() {
unconfirmedFunds := new(big.Int)
gui.win.Root().Call("setWalletValue", fmt.Sprintf("%v", ethutil.CurrencyToString(state.GetAccount(gui.address()).Amount)))
+ gui.win.Root().ObjectByName("syncProgressIndicator").Set("visible", !gui.eth.IsUpToDate())
for {
select {
@@ -328,6 +333,10 @@ func (gui *Gui) update() {
state.UpdateStateObject(object)
}
+ case msg := <-chainSyncChan:
+ sync := msg.Resource.(bool)
+ gui.win.Root().ObjectByName("syncProgressIndicator").Set("visible", sync)
+
case <-objectChan:
gui.loadAddressBook()
case <-peerChan: