Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
3755616a
Commit
3755616a
authored
Jun 03, 2014
by
Maran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added namereg register option to qml wallet
parent
cc1d0434
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
2 deletions
+30
-2
wallet.qml
ethereal/assets/qml/wallet.qml
+25
-2
gui.go
ethereal/ui/gui.go
+5
-0
No files found.
ethereal/assets/qml/wallet.qml
View file @
3755616a
...
...
@@ -254,13 +254,12 @@ ApplicationWindow {
}
}
property
var
addressModel
:
ListModel
{
id
:
addressModel
}
TableView
{
id
:
addressView
width
:
parent
.
width
width
:
parent
.
width
-
200
height
:
200
anchors.bottom
:
logView
.
top
TableViewColumn
{
role
:
"name"
;
title
:
"name"
}
...
...
@@ -269,6 +268,30 @@ ApplicationWindow {
model
:
addressModel
}
Rectangle
{
anchors.top
:
addressView
.
top
anchors.left
:
addressView
.
right
anchors.leftMargin
:
20
TextField
{
placeholderText
:
"Name to register"
id
:
nameToReg
width
:
150
}
Button
{
anchors.top
:
nameToReg
.
bottom
text
:
"Register"
MouseArea
{
anchors.fill
:
parent
onClicked
:
{
eth
.
registerName
(
nameToReg
.
text
)
nameToReg
.
text
=
""
}
}
}
}
property
var
logModel
:
ListModel
{
id
:
logModel
...
...
ethereal/ui/gui.go
View file @
3755616a
...
...
@@ -329,6 +329,11 @@ func (gui *Gui) Printf(format string, v ...interface{}) {
gui
.
win
.
Root
()
.
Call
(
"addLog"
,
line
)
}
}
func
(
gui
*
Gui
)
RegisterName
(
name
string
)
{
keyPair
:=
ethutil
.
GetKeyRing
()
.
Get
(
0
)
name
=
fmt
.
Sprintf
(
"
\"
%s
\"\n
1"
,
name
)
gui
.
pub
.
Transact
(
ethutil
.
Hex
(
keyPair
.
PrivateKey
),
"namereg"
,
"1000"
,
"1000000"
,
"150"
,
name
)
}
func
(
gui
*
Gui
)
Transact
(
recipient
,
value
,
gas
,
gasPrice
,
data
string
)
(
*
ethpub
.
PReceipt
,
error
)
{
keyPair
:=
ethutil
.
GetKeyRing
()
.
Get
(
0
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment