From 68f4a12a8b6e0cde4a8ba144d2f63e911361cb58 Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 21 May 2014 13:37:46 +0200 Subject: Fixed unconfirmed balance string --- ethereal/ui/gui.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/ethereal/ui/gui.go b/ethereal/ui/gui.go index 440e94e22..3e2fc0dbd 100644 --- a/ethereal/ui/gui.go +++ b/ethereal/ui/gui.go @@ -164,7 +164,7 @@ func (gui *Gui) setWalletValue(amount, unconfirmedFunds *big.Int) { var str string if unconfirmedFunds != nil { pos := "+" - if unconfirmedFunds.Cmp(big.NewInt(0)) >= 0 { + if unconfirmedFunds.Cmp(big.NewInt(0)) < 0 { pos = "-" } val := ethutil.CurrencyToString(new(big.Int).Abs(ethutil.BigCopy(unconfirmedFunds))) @@ -206,15 +206,10 @@ func (gui *Gui) update() { if txMsg.Event == "newTx:pre" { object := state.GetAccount(gui.addr) - if bytes.Compare(tx.Sender(), gui.addr) == 0 && object.Nonce <= tx.Nonce { + if bytes.Compare(tx.Sender(), gui.addr) == 0 { gui.win.Root().Call("addTx", ethpub.NewPTx(tx)) gui.txDb.Put(tx.Hash(), tx.RlpEncode()) - /* - object.Nonce += 1 - state.SetStateObject(object) - */ - unconfirmedFunds.Sub(unconfirmedFunds, tx.Value) } else if bytes.Compare(tx.Recipient, gui.addr) == 0 { gui.win.Root().Call("addTx", ethpub.NewPTx(tx)) -- cgit v1.2.3 From 10e2c40b59010ec594df43d057354d05a34709ff Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 21 May 2014 14:00:54 +0200 Subject: Improved on some ui elements --- ethereal/assets/qml/wallet.qml | 39 +++++++++++++++++++++++++++++++++++++++ ethereal/ui/gui.go | 1 + 2 files changed, 40 insertions(+) diff --git a/ethereal/assets/qml/wallet.qml b/ethereal/assets/qml/wallet.qml index 4813aaede..51f064adf 100644 --- a/ethereal/assets/qml/wallet.qml +++ b/ethereal/assets/qml/wallet.qml @@ -67,6 +67,7 @@ ApplicationWindow { networkView.visible = false historyView.visible = false newTxView.visible = false + infoView.visible = false view.visible = true //root.title = "Ethereal - " = view.title } @@ -120,6 +121,17 @@ ApplicationWindow { } } } + + Image { + source: ui.assetPath("net.png") + anchors.horizontalCenter: parent.horizontalCenter + MouseArea { + anchors.fill: parent + onClicked: { + setView(infoView) + } + } + } } } @@ -217,6 +229,33 @@ ApplicationWindow { } } + Rectangle { + id: infoView + property var title: "Information" + visible: false + color: "#00000000" + anchors.fill: parent + + Label { + id: addressLabel + text: "Address" + anchors { + margins: 5 + top: parent.top + left: parent.left + } + } + TextField { + anchors { + margins: 5 + left: addressLabel.right + top: parent.top + } + text: pub.getKey().address + width: 500 + } + } + /* signal addPlugin(string name) Component { diff --git a/ethereal/ui/gui.go b/ethereal/ui/gui.go index 3e2fc0dbd..6043152f9 100644 --- a/ethereal/ui/gui.go +++ b/ethereal/ui/gui.go @@ -74,6 +74,7 @@ func (gui *Gui) Start(assetPath string) { // Expose the eth library and the ui library to QML context.SetVar("eth", gui) + context.SetVar("pub", gui.pub) gui.uiLib = NewUiLib(gui.engine, gui.eth, assetPath) context.SetVar("ui", gui.uiLib) -- cgit v1.2.3 From 3ddaf56afd919d1bc435379861a3ab37f3392116 Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 21 May 2014 14:04:11 +0200 Subject: Bumped --- README.md | 5 +++-- ethereal/ui/gui.go | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 30db835f2..e5818ffca 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ Ethereum Ethereum Go Client © 2014 Jeffrey Wilcke. -Current state: Proof of Concept 5.0 RC7. +Current state: Proof of Concept 5.0 RC8. For the development package please see the [eth-go package](https://github.com/ethereum/eth-go). @@ -39,7 +39,8 @@ Shared between ethereum and ethereal Ethereum only ethereum [options] [filename] --js Start the JavaScript REPL +-js Start the JavaScript REPL +filename Load the given file and interpret as JavaScript Etheral only -asset_path absolute path to GUI assets directory diff --git a/ethereal/ui/gui.go b/ethereal/ui/gui.go index 6043152f9..7290bd6ec 100644 --- a/ethereal/ui/gui.go +++ b/ethereal/ui/gui.go @@ -55,7 +55,7 @@ func New(ethereum *eth.Ethereum) *Gui { } func (gui *Gui) Start(assetPath string) { - const version = "0.5.0 RC7" + const version = "0.5.0 RC8" defer gui.txDb.Close() -- cgit v1.2.3