Skip to content

Commit 01863eb

Browse files
committed
Rename and changed peer window
1 parent e4cc365 commit 01863eb

File tree

7 files changed

+55
-16
lines changed

7 files changed

+55
-16
lines changed

Mist/assets/qml/wallet.qml

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ApplicationWindow {
1919
height: 600
2020
minimumHeight: 300
2121

22-
title: "Ether Browser"
22+
title: "Mist"
2323

2424
// This signal is used by the filter API. The filter API connects using this signal handler from
2525
// the different QML files and plugins.
@@ -853,30 +853,61 @@ ApplicationWindow {
853853
Window {
854854
id: addPeerWin
855855
visible: false
856-
minimumWidth: 230
857-
maximumWidth: 230
856+
minimumWidth: 300
857+
maximumWidth: 300
858858
maximumHeight: 50
859859
minimumHeight: 50
860+
title: "Add peer"
860861

862+
/*
861863
TextField {
862864
id: addrField
863865
anchors.verticalCenter: parent.verticalCenter
864866
anchors.left: parent.left
867+
anchors.right: addPeerButton.left
865868
anchors.leftMargin: 10
869+
anchors.rightMargin: 10
866870
placeholderText: "address:port"
867871
text: "54.76.56.74:30303"
868872
onAccepted: {
869873
eth.connectToPeer(addrField.text)
870874
addPeerWin.visible = false
871875
}
872876
}
877+
*/
878+
ComboBox {
879+
id: addrField
880+
anchors.verticalCenter: parent.verticalCenter
881+
anchors.left: parent.left
882+
anchors.right: addPeerButton.left
883+
anchors.leftMargin: 10
884+
anchors.rightMargin: 10
885+
onAccepted: {
886+
eth.connectToPeer(addrField.currentText)
887+
addPeerWin.visible = false
888+
}
889+
890+
editable: true
891+
model: ListModel { id: pastPeers }
892+
893+
Component.onCompleted: {
894+
var ips = eth.pastPeers()
895+
for(var i = 0; i < ips.length; i++) {
896+
pastPeers.append({text: ips.get(i)})
897+
}
898+
899+
pastPeers.insert(0, {text: "54.76.56.74:30303"})
900+
}
901+
}
902+
873903
Button {
874-
anchors.left: addrField.right
904+
id: addPeerButton
905+
anchors.right: parent.right
875906
anchors.verticalCenter: parent.verticalCenter
876-
anchors.leftMargin: 5
907+
anchors.rightMargin: 10
877908
text: "Add"
878909
onClicked: {
879-
eth.connectToPeer(addrField.text)
910+
eth.connectToPeer(addrField.currentText)
880911
addPeerWin.visible = false
881912
}
882913
}

Mist/flags.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func defaultAssetPath() string {
4444
// assume a debug build and use the source directory as
4545
// asset directory.
4646
pwd, _ := os.Getwd()
47-
if pwd == path.Join(os.Getenv("GOPATH"), "src", "github.com", "ethereum", "go-ethereum", "ethereal") {
47+
if pwd == path.Join(os.Getenv("GOPATH"), "src", "github.com", "ethereum", "go-ethereum", "Mist") {
4848
assetPath = path.Join(pwd, "assets")
4949
} else {
5050
switch runtime.GOOS {
@@ -53,7 +53,7 @@ func defaultAssetPath() string {
5353
exedir, _ := osext.ExecutableFolder()
5454
assetPath = filepath.Join(exedir, "../Resources")
5555
case "linux":
56-
assetPath = "/usr/share/ethereal"
56+
assetPath = "/usr/share/mist"
5757
case "windows":
5858
assetPath = "./assets"
5959
default:
@@ -64,7 +64,7 @@ func defaultAssetPath() string {
6464
}
6565
func defaultDataDir() string {
6666
usr, _ := user.Current()
67-
return path.Join(usr.HomeDir, ".ethereal")
67+
return path.Join(usr.HomeDir, ".mist")
6868
}
6969

7070
var defaultConfigFile = path.Join(defaultDataDir(), "conf.ini")

Mist/gui.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,9 @@ func (gui *Gui) setStatsPane() {
491491
runtime.ReadMemStats(&memStats)
492492

493493
statsPane := gui.getObjectByName("statsPane")
494-
statsPane.Set("text", fmt.Sprintf(`###### Ethereal 0.6.4 (%s) #######
494+
statsPane.Set("text", fmt.Sprintf(`###### Mist 0.6.4 (%s) #######
495+
496+
eth %d (p2p = %d)
495497
496498
CPU: # %d
497499
Goroutines: # %d
@@ -502,7 +504,9 @@ Heap Alloc: %d
502504
503505
CGNext: %x
504506
NumGC: %d
505-
`, runtime.Version(), runtime.NumCPU, runtime.NumGoroutine(), runtime.NumCgoCall(),
507+
`, runtime.Version(),
508+
eth.ProtocolVersion, eth.P2PVersion,
509+
runtime.NumCPU, runtime.NumGoroutine(), runtime.NumCgoCall(),
506510
memStats.Alloc, memStats.HeapAlloc,
507511
memStats.NextGC, memStats.NumGC,
508512
))

Mist/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import (
1111
)
1212

1313
const (
14-
ClientIdentifier = "Ethereal"
15-
Version = "0.6.6"
14+
ClientIdentifier = "Mist"
15+
Version = "0.6.7"
1616
)
1717

1818
var ethereum *eth.Ethereum

Mist/ui_lib.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ func (self *UiLib) LookupDomain(domain string) string {
7272
}
7373
}
7474

75+
func (self *UiLib) PastPeers() *ethutil.List {
76+
return ethutil.NewList(eth.PastPeers())
77+
}
78+
7579
func (self *UiLib) ImportTx(rlpTx string) {
7680
tx := ethchain.NewTransactionFromBytes(ethutil.Hex2Bytes(rlpTx))
7781
self.eth.TxPool().QueueTransaction(tx)

javascript/javascript_runtime.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func (jsre *JSRE) LoadExtFile(path string) {
4242
}
4343

4444
func (jsre *JSRE) LoadIntFile(file string) {
45-
assetPath := path.Join(os.Getenv("GOPATH"), "src", "github.com", "ethereum", "go-ethereum", "ethereal", "assets", "ext")
45+
assetPath := path.Join(os.Getenv("GOPATH"), "src", "github.com", "ethereum", "go-ethereum", "Mist", "assets", "ext")
4646
jsre.LoadExtFile(path.Join(assetPath, file))
4747
}
4848

utils/cmd.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ func DefaultAssetPath() string {
189189
// assume a debug build and use the source directory as
190190
// asset directory.
191191
pwd, _ := os.Getwd()
192-
if pwd == path.Join(os.Getenv("GOPATH"), "src", "github.com", "ethereum", "go-ethereum", "ethereal") {
192+
if pwd == path.Join(os.Getenv("GOPATH"), "src", "github.com", "ethereum", "go-ethereum", "Mist") {
193193
assetPath = path.Join(pwd, "assets")
194194
} else {
195195
switch runtime.GOOS {
@@ -198,7 +198,7 @@ func DefaultAssetPath() string {
198198
exedir, _ := osext.ExecutableFolder()
199199
assetPath = filepath.Join(exedir, "../Resources")
200200
case "linux":
201-
assetPath = "/usr/share/ethereal"
201+
assetPath = "/usr/share/mist"
202202
case "windows":
203203
assetPath = "./assets"
204204
default:

0 commit comments

Comments
 (0)