From faa307362543bb89f10458e83aa03c557977937f Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 13 May 2014 22:25:05 +0200 Subject: Changed validators to regexp validators IntValidator limits to 32bit int (JavaScript limitation) and therefor the input fields are limited in length. --- ethereal/assets/qml/newTransaction/_new_contract.qml | 6 +++--- ethereal/assets/qml/newTransaction/_simple_send.qml | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'ethereal') diff --git a/ethereal/assets/qml/newTransaction/_new_contract.qml b/ethereal/assets/qml/newTransaction/_new_contract.qml index f8f3d53a0..e3c7229eb 100644 --- a/ethereal/assets/qml/newTransaction/_new_contract.qml +++ b/ethereal/assets/qml/newTransaction/_new_contract.qml @@ -61,7 +61,7 @@ Component { id: txValue width: 200 placeholderText: "Amount" - validator: IntValidator { } + validator: RegExpValidator { regExp: /\d*/ } onTextChanged: { contractFormReady() } @@ -69,7 +69,7 @@ Component { TextField { id: txGas width: 200 - validator: IntValidator { } + validator: RegExpValidator { regExp: /\d*/ } placeholderText: "Gas" onTextChanged: { contractFormReady() @@ -79,7 +79,7 @@ Component { id: txGasPrice width: 200 placeholderText: "Gas price" - validator: IntValidator { } + validator: RegExpValidator { regExp: /\d*/ } onTextChanged: { contractFormReady() } diff --git a/ethereal/assets/qml/newTransaction/_simple_send.qml b/ethereal/assets/qml/newTransaction/_simple_send.qml index 12420c15a..cd1ef55b6 100644 --- a/ethereal/assets/qml/newTransaction/_simple_send.qml +++ b/ethereal/assets/qml/newTransaction/_simple_send.qml @@ -56,9 +56,10 @@ Component { } TextField { id: txSimpleValue + width: 200 placeholderText: "Amount" anchors.rightMargin: 5 - validator: IntValidator { } + validator: RegExpValidator { regExp: /\d*/ } onTextChanged: { checkFormState() } } Button { -- cgit v1.2.3 From e8147cf7c6f508910698e6743ad347c78010ffe3 Mon Sep 17 00:00:00 2001 From: Maran Date: Wed, 14 May 2014 12:41:30 +0200 Subject: Refactored mining into utils and exposed it to ethereal. Partly fixes #43 --- ethereal/ethereum.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ethereal') diff --git a/ethereal/ethereum.go b/ethereal/ethereum.go index 15a454bdf..32c16f64f 100644 --- a/ethereal/ethereum.go +++ b/ethereal/ethereum.go @@ -99,6 +99,10 @@ func main() { os.Exit(0) } + if StartMining { + utils.DoMining(ethereum) + } + if StartRpc { ethereum.RpcServer, err = ethrpc.NewJsonRpcServer(ethpub.NewPEthereum(ethereum), RpcPort) if err != nil { -- cgit v1.2.3 From 9fce273ce97a8db091a0bf9d0b503a2ea7261f81 Mon Sep 17 00:00:00 2001 From: Maran Date: Wed, 14 May 2014 13:32:49 +0200 Subject: Refactored RPC client to utils so it can be reused --- ethereal/ethereum.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'ethereal') diff --git a/ethereal/ethereum.go b/ethereal/ethereum.go index 32c16f64f..a97d7f498 100644 --- a/ethereal/ethereum.go +++ b/ethereal/ethereum.go @@ -4,8 +4,6 @@ import ( "fmt" "github.com/ethereum/eth-go" "github.com/ethereum/eth-go/ethchain" - "github.com/ethereum/eth-go/ethpub" - "github.com/ethereum/eth-go/ethrpc" "github.com/ethereum/eth-go/ethutil" "github.com/ethereum/go-ethereum/ethereal/ui" "github.com/ethereum/go-ethereum/utils" @@ -104,12 +102,7 @@ func main() { } if StartRpc { - ethereum.RpcServer, err = ethrpc.NewJsonRpcServer(ethpub.NewPEthereum(ethereum), RpcPort) - if err != nil { - log.Println("Could not start RPC interface:", err) - } else { - go ethereum.RpcServer.Start() - } + utils.DoRpc(ethereum, RpcPort) } log.Printf("Starting Ethereum GUI v%s\n", ethutil.Config.Ver) -- cgit v1.2.3 From f18ec51cb3959cc662bfc7b84314cd1d3b1541b5 Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 14 May 2014 13:55:08 +0200 Subject: Switched to new keyring methods --- ethereal/assets/muted/index.html | 1 + ethereal/assets/samplecoin/samplecoin.html | 4 +-- ethereal/ethereum.go | 15 +++++++-- ethereal/ui/gui.go | 49 +++--------------------------- ethereal/ui/library.go | 13 +++++--- ethereal/ui/ui_lib.go | 2 +- 6 files changed, 28 insertions(+), 56 deletions(-) (limited to 'ethereal') diff --git a/ethereal/assets/muted/index.html b/ethereal/assets/muted/index.html index 84584e373..14949b5ac 100644 --- a/ethereal/assets/muted/index.html +++ b/ethereal/assets/muted/index.html @@ -46,6 +46,7 @@ .CodeMirror { height: 70%; + font-size: 14pt; } diff --git a/ethereal/assets/samplecoin/samplecoin.html b/ethereal/assets/samplecoin/samplecoin.html index 384936780..3f8eacc00 100644 --- a/ethereal/assets/samplecoin/samplecoin.html +++ b/ethereal/assets/samplecoin/samplecoin.html @@ -9,7 +9,7 @@