diff options
Diffstat (limited to 'ethereal/assets/qml')
-rw-r--r-- | ethereal/assets/qml/views/chain.qml | 11 | ||||
-rw-r--r-- | ethereal/assets/qml/views/wallet.qml | 1 | ||||
-rw-r--r-- | ethereal/assets/qml/wallet.qml | 31 |
3 files changed, 25 insertions, 18 deletions
diff --git a/ethereal/assets/qml/views/chain.qml b/ethereal/assets/qml/views/chain.qml index ed019acf1..5bfc4b6c7 100644 --- a/ethereal/assets/qml/views/chain.qml +++ b/ethereal/assets/qml/views/chain.qml @@ -98,15 +98,18 @@ Rectangle { function addBlock(block, initial) { - var txs = JSON.parse(block.transactions); - var amount = 0 if(initial == undefined){ initial = false } + /* + var txs = JSON.parse(block.transactions); if(txs != null){ amount = txs.length } + */ + var txs = block.transactions; + var amount = block.transactions.length; if(initial){ blockModel.append({size: block.size, number: block.number, name: block.name, gasLimit: block.gasLimit, gasUsed: block.gasUsed, coinbase: block.coinbase, hash: block.hash, txs: txs, txAmount: amount, time: block.time, prettyTime: convertToPretty(block.time)}) @@ -241,8 +244,8 @@ Rectangle { singleBlock.set(0,block) popup.height = 300 transactionModel.clear() - if(block.txs != undefined){ - for(var i = 0; i < block.txs.count; ++i) { + if(block.txs !== undefined){ + for(var i = 0; i < block.txs.length; i++) { transactionModel.insert(0, block.txs.get(i)) } if(block.txs.get(0).data){ diff --git a/ethereal/assets/qml/views/wallet.qml b/ethereal/assets/qml/views/wallet.qml index ce472812e..c2513289e 100644 --- a/ethereal/assets/qml/views/wallet.qml +++ b/ethereal/assets/qml/views/wallet.qml @@ -157,6 +157,7 @@ Rectangle { addTxs(filter.messages()) } + function addTxs(messages) { for(var i = 0; i < messages.length; i++) { var message = messages[i]; diff --git a/ethereal/assets/qml/wallet.qml b/ethereal/assets/qml/wallet.qml index ed527ced7..0ddbd26bd 100644 --- a/ethereal/assets/qml/wallet.qml +++ b/ethereal/assets/qml/wallet.qml @@ -18,7 +18,7 @@ ApplicationWindow { height: 600 minimumHeight: 300 - title: "Ether browser" + title: "Ethegate" // This signal is used by the filter API. The filter API connects using this signal handler from // the different QML files and plugins. @@ -55,25 +55,28 @@ ApplicationWindow { } function addPlugin(path, options) { - var component = Qt.createComponent(path); - if(component.status != Component.Ready) { - if(component.status == Component.Error) { - console.debug("Error:"+ component.errorString()); + try { + var component = Qt.createComponent(path); + if(component.status != Component.Ready) { + if(component.status == Component.Error) { + console.debug("Error:"+ component.errorString()); + } + + return } - return - } + var views = mainSplit.addComponent(component, options) + views.menuItem.path = path - var views = mainSplit.addComponent(component, options) - views.menuItem.path = path + mainSplit.views.push(views); - mainSplit.views.push(views); + if(!options.noAdd) { + gui.addPlugin(path) + } - if(!options.noAdd) { - gui.addPlugin(path) + return views.view + } catch(e) { } - - return views.view } MenuBar { |