Skip to content

Commit 9ac4e23

Browse files
committed
Merge branch 'release/0.6.5' into develop
2 parents b4bd70c + c7d666a commit 9ac4e23

File tree

6 files changed

+203
-14
lines changed

6 files changed

+203
-14
lines changed

mist/assets/qml/views/chain.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ Rectangle {
248248
for(var i = 0; i < block.txs.length; i++) {
249249
transactionModel.insert(0, block.txs.get(i))
250250
}
251-
if(block.txs.get(0).data){
251+
if(block.txs.length > 0 && block.txs.get(0).data){
252252
popup.showContractData(block.txs.get(0))
253253
}
254254
}
82.1 KB
Loading
Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
import QtQuick 2.0
2+
import QtQuick.Controls 1.0;
3+
import QtQuick.Layouts 1.0;
4+
import QtQuick.Dialogs 1.0;
5+
import QtQuick.Window 2.1;
6+
import QtQuick.Controls.Styles 1.1
7+
8+
Rectangle {
9+
id: root
10+
property var title: "JeffCoin"
11+
property var iconSource: "./views/jeffcoin/jeff.png"
12+
property var menuItem
13+
property var filter
14+
property var address: "fc0a9436890478bb9b1c6ed7455c2535366f4a99"
15+
16+
function insertTx(message, blockNumber) {
17+
if(!message) return;
18+
19+
var from = message.from
20+
var to = message.input.substr(24, 40)
21+
var value = eth.fromNumber(message.input.substr(64, 64))
22+
23+
var me = eth.key().address;
24+
if((to == me|| from == me) && message.input.length == 128) {
25+
txModel.insert(0, {confirmations: blockNumber - message.number, from: from, to: to, value: value})
26+
}
27+
}
28+
29+
function setBalance() {
30+
var jeffCoinAmount = eth.fromNumber(eth.storageAt(address, eth.key().address)) + " JΞF"
31+
menuItem.secondaryTitle = jeffCoinAmount
32+
33+
balance.text = "<b>Balance</b>: " + jeffCoinAmount;
34+
}
35+
36+
function onReady() {
37+
setBalance()
38+
39+
filter = new ethx.watch({latest: -1, to: address})
40+
filter.changed(function(messages) {
41+
setBalance()
42+
43+
var blockNumber = eth.block(-1).number;
44+
for(var i = 0; i < messages.length; i++) {
45+
insertTx(messages.get(i), blockNumber);
46+
}
47+
});
48+
49+
var blockNumber = eth.block(-1).number;
50+
var messages = filter.messages()
51+
for(var i = messages.length-1; i >= 0; i--) {
52+
var message = messages.get(i)
53+
54+
insertTx(message, blockNumber)
55+
}
56+
57+
var chainChanged = ethx.watch("chain")
58+
chainChanged.changed(function() {
59+
for(var i = 0; i < txModel.count; i++) {
60+
var entry = txModel.get(i);
61+
entry.confirmations++;
62+
}
63+
});
64+
}
65+
66+
function onDestroy() {
67+
filter.uninstall()
68+
}
69+
70+
ColumnLayout {
71+
spacing: 10
72+
y: 40
73+
anchors.fill: parent
74+
75+
Text {
76+
id: balance
77+
text: "<b>Balance</b>: " + eth.fromNumber(eth.storageAt(address, eth.key().address)) + " JΞF"
78+
font.pixelSize: 24
79+
anchors {
80+
horizontalCenter: parent.horizontalCenter
81+
top: parent.top
82+
topMargin: 20
83+
}
84+
}
85+
86+
Rectangle {
87+
id: newTxPane
88+
color: "#ececec"
89+
border.color: "#cccccc"
90+
border.width: 1
91+
anchors {
92+
top: balance.bottom
93+
topMargin: 10
94+
left: parent.left
95+
leftMargin: 5
96+
right: parent.right
97+
rightMargin: 5
98+
}
99+
height: 100
100+
101+
RowLayout {
102+
id: amountFields
103+
spacing: 10
104+
anchors {
105+
top: parent.top
106+
topMargin: 20
107+
left: parent.left
108+
leftMargin: 20
109+
}
110+
111+
Text {
112+
text: "JΞF "
113+
}
114+
115+
// There's something off with the row layout where textfields won't listen to the width setting
116+
Rectangle {
117+
width: 50
118+
height: 20
119+
TextField {
120+
id: txValue
121+
width: parent.width
122+
placeholderText: "0.00"
123+
}
124+
}
125+
}
126+
127+
RowLayout {
128+
id: toFields
129+
spacing: 10
130+
anchors {
131+
top: amountFields.bottom
132+
topMargin: 5
133+
left: parent.left
134+
leftMargin: 20
135+
}
136+
137+
Text {
138+
text: "To"
139+
}
140+
141+
Rectangle {
142+
width: 200
143+
height: 20
144+
TextField {
145+
id: txTo
146+
width: parent.width
147+
placeholderText: "Address or name"
148+
}
149+
}
150+
151+
Button {
152+
text: "Send"
153+
onClicked: {
154+
eth.transact({from: eth.key().privateKey, to:address, gas: "9000", gasPrice: "100000000000", data: ["0x"+txTo.text, txValue.text]})
155+
}
156+
}
157+
}
158+
}
159+
160+
Rectangle {
161+
anchors {
162+
left: parent.left
163+
right: parent.right
164+
top: newTxPane.bottom
165+
topMargin: 10
166+
bottom: parent.bottom
167+
}
168+
TableView {
169+
id: txTableView
170+
anchors.fill : parent
171+
TableViewColumn{ role: "value" ; title: "Amount" ; width: 100 }
172+
TableViewColumn{ role: "from" ; title: "From" ; width: 280 }
173+
TableViewColumn{ role: "to" ; title: "To" ; width: 280 }
174+
TableViewColumn{ role: "confirmations" ; title: "Confirmations" ; width: 100 }
175+
176+
model: ListModel {
177+
id: txModel
178+
Component.onCompleted: {
179+
}
180+
}
181+
}
182+
}
183+
}
184+
}

mist/assets/qml/wallet.qml

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ ApplicationWindow {
1616
property var ethx : Eth.ethx
1717
property var web
1818

19-
width: 1024
20-
height: 750
19+
width: 1200
20+
height: 820
2121
minimumHeight: 300
2222

2323
title: "Mist"
@@ -45,15 +45,20 @@ ApplicationWindow {
4545

4646
// Takes care of loading all default plugins
4747
Component.onCompleted: {
48-
addPlugin("./views/wallet.qml", {noAdd: true, close: false, section: "ethereum", active: true});
49-
root.web = addPlugin("./webapp.qml", {noAdd: true, close: false, section: "ethereum", active: true});
48+
var wallet = addPlugin("./views/wallet.qml", {noAdd: true, close: false, section: "ethereum", active: true});
49+
var browser = addPlugin("./webapp.qml", {noAdd: true, close: false, section: "ethereum", active: true});
50+
root.web = browser.view;
5051

5152
addPlugin("./views/transaction.qml", {noAdd: true, close: false, section: "legacy"});
5253
addPlugin("./views/chain.qml", {noAdd: true, close: false, section: "legacy"});
5354
addPlugin("./views/info.qml", {noAdd: true, close: false, section: "legacy"});
5455
addPlugin("./views/pending_tx.qml", {noAdd: true, close: false, section: "legacy"});
5556
addPlugin("./views/javascript.qml", {noAdd: true, close: false, section: "legacy"});
5657

58+
addPlugin("./views/jeffcoin/jeffcoin.qml", {noAdd: true, close: false, section: "apps"})
59+
60+
mainSplit.setView(wallet.view, wallet.menuItem);
61+
5762
// Call the ready handler
5863
gui.done();
5964
}
@@ -97,7 +102,7 @@ ApplicationWindow {
97102
var view = mainView.createView(component, options)
98103
var views = addViews(view, path, options)
99104

100-
return views.view
105+
return views
101106
} catch(e) {
102107
ethx.note(e)
103108
}
@@ -374,8 +379,8 @@ ApplicationWindow {
374379
********************/
375380
Rectangle {
376381
id: menu
377-
Layout.minimumWidth: 180
378-
Layout.maximumWidth: 180
382+
Layout.minimumWidth: 210
383+
Layout.maximumWidth: 210
379384
anchors.top: parent.top
380385
color: "#ececec"
381386

@@ -394,7 +399,7 @@ ApplicationWindow {
394399
sel.visible = on
395400
}
396401

397-
width: 176
402+
width: 206
398403
height: 28
399404
color: "#00000000"
400405

@@ -801,9 +806,9 @@ ApplicationWindow {
801806
anchors.left: aboutIcon.right
802807
anchors.leftMargin: 10
803808
anchors.top: parent.top
804-
anchors.topMargin: 40
809+
anchors.topMargin: 30
805810
font.pointSize: 12
806-
text: "<h2>Mist - Amalthea</h2><br><h3>Development</h3>Jeffrey Wilcke<br>Viktor Trón<br>"
811+
text: "<h2>Mist (0.6.5)</h2><h4>Amalthea</h4><br><h3>Development</h3>Jeffrey Wilcke<br>Viktor Trón<br><h3>Building</h3>Maran Hidskes"
807812
}
808813
}
809814

@@ -867,7 +872,7 @@ ApplicationWindow {
867872
pastPeers.append({text: ips.get(i)})
868873
}
869874

870-
pastPeers.insert(0, {text: "54.76.56.74:30303"})
875+
pastPeers.insert(0, {text: "poc-6.ethdev.com:30303"})
871876
}
872877
}
873878

mist/gui.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ func (gui *Gui) setStatsPane() {
491491
runtime.ReadMemStats(&memStats)
492492

493493
statsPane := gui.getObjectByName("statsPane")
494-
statsPane.Set("text", fmt.Sprintf(`###### Mist 0.6.4 (%s) #######
494+
statsPane.Set("text", fmt.Sprintf(`###### Mist 0.6.5 (%s) #######
495495
496496
eth %d (p2p = %d)
497497

mist/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212

1313
const (
1414
ClientIdentifier = "Mist"
15-
Version = "0.6.7"
15+
Version = "0.6.5"
1616
)
1717

1818
var ethereum *eth.Ethereum

0 commit comments

Comments
 (0)