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
6ecbbe40
Commit
6ecbbe40
authored
Sep 24, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Download indicator
parent
acfb5b85
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
13 deletions
+23
-13
wallet.qml
mist/assets/qml/wallet.qml
+8
-7
gui.go
mist/gui.go
+15
-6
No files found.
mist/assets/qml/wallet.qml
View file @
6ecbbe40
...
@@ -254,6 +254,7 @@ ApplicationWindow {
...
@@ -254,6 +254,7 @@ ApplicationWindow {
statusBar
:
StatusBar
{
statusBar
:
StatusBar
{
height
:
32
height
:
32
id
:
statusBar
RowLayout
{
RowLayout
{
Button
{
Button
{
id
:
miningButton
id
:
miningButton
...
@@ -294,16 +295,16 @@ ApplicationWindow {
...
@@ -294,16 +295,16 @@ ApplicationWindow {
}
}
ProgressBar
{
ProgressBar
{
id
:
syncProgressIndicator
id
:
downloadIndicator
visible
:
false
value
:
0
objectName
:
"syncProgressIndicator"
visible
:
true
objectName
:
"downloadIndicator"
y
:
3
y
:
3
width
:
140
x
:
statusBar
.
width
/
2
-
this
.
width
/
2
indeterminate
:
true
width
:
160
anchors.right
:
peerGroup
.
left
anchors.rightMargin
:
5
}
}
RowLayout
{
RowLayout
{
id
:
peerGroup
id
:
peerGroup
y
:
7
y
:
7
...
...
mist/gui.go
View file @
6ecbbe40
...
@@ -385,14 +385,13 @@ func (gui *Gui) update() {
...
@@ -385,14 +385,13 @@ func (gui *Gui) update() {
)
)
peerUpdateTicker
:=
time
.
NewTicker
(
5
*
time
.
Second
)
peerUpdateTicker
:=
time
.
NewTicker
(
5
*
time
.
Second
)
generalUpdateTicker
:=
time
.
NewTicker
(
1
*
time
.
S
econd
)
generalUpdateTicker
:=
time
.
NewTicker
(
500
*
time
.
Millis
econd
)
statsUpdateTicker
:=
time
.
NewTicker
(
5
*
time
.
Second
)
statsUpdateTicker
:=
time
.
NewTicker
(
5
*
time
.
Second
)
state
:=
gui
.
eth
.
StateManager
()
.
TransState
()
state
:=
gui
.
eth
.
StateManager
()
.
TransState
()
unconfirmedFunds
:=
new
(
big
.
Int
)
unconfirmedFunds
:=
new
(
big
.
Int
)
gui
.
win
.
Root
()
.
Call
(
"setWalletValue"
,
fmt
.
Sprintf
(
"%v"
,
ethutil
.
CurrencyToString
(
state
.
GetAccount
(
gui
.
address
())
.
Balance
)))
gui
.
win
.
Root
()
.
Call
(
"setWalletValue"
,
fmt
.
Sprintf
(
"%v"
,
ethutil
.
CurrencyToString
(
state
.
GetAccount
(
gui
.
address
())
.
Balance
)))
gui
.
getObjectByName
(
"syncProgressIndicator"
)
.
Set
(
"visible"
,
!
gui
.
eth
.
IsUpToDate
())
lastBlockLabel
:=
gui
.
getObjectByName
(
"lastBlockLabel"
)
lastBlockLabel
:=
gui
.
getObjectByName
(
"lastBlockLabel"
)
miningLabel
:=
gui
.
getObjectByName
(
"miningLabel"
)
miningLabel
:=
gui
.
getObjectByName
(
"miningLabel"
)
...
@@ -439,9 +438,6 @@ func (gui *Gui) update() {
...
@@ -439,9 +438,6 @@ func (gui *Gui) update() {
state
.
UpdateStateObject
(
object
)
state
.
UpdateStateObject
(
object
)
}
}
case
msg
:=
<-
chainSyncChan
:
sync
:=
msg
.
Resource
.
(
bool
)
gui
.
win
.
Root
()
.
ObjectByName
(
"syncProgressIndicator"
)
.
Set
(
"visible"
,
sync
)
case
<-
objectChan
:
case
<-
objectChan
:
gui
.
loadAddressBook
()
gui
.
loadAddressBook
()
...
@@ -464,9 +460,22 @@ func (gui *Gui) update() {
...
@@ -464,9 +460,22 @@ func (gui *Gui) update() {
miningLabel
.
Set
(
"text"
,
"Mining @ "
+
strconv
.
FormatInt
(
pow
.
GetHashrate
(),
10
)
+
"Khash"
)
miningLabel
.
Set
(
"text"
,
"Mining @ "
+
strconv
.
FormatInt
(
pow
.
GetHashrate
(),
10
)
+
"Khash"
)
}
}
blockLength
:=
gui
.
eth
.
BlockPool
()
.
BlocksProcessed
chainLength
:=
gui
.
eth
.
BlockPool
()
.
ChainLength
var
(
pct
float64
=
1.0
/
float64
(
chainLength
)
*
float64
(
blockLength
)
dlWidget
=
gui
.
win
.
Root
()
.
ObjectByName
(
"downloadIndicator"
)
)
if
pct
<
1.0
{
dlWidget
.
Set
(
"visible"
,
true
)
dlWidget
.
Set
(
"value"
,
pct
)
}
else
{
dlWidget
.
Set
(
"visible"
,
false
)
}
case
<-
statsUpdateTicker
.
C
:
case
<-
statsUpdateTicker
.
C
:
gui
.
setStatsPane
()
gui
.
setStatsPane
()
}
}
}
}
}()
}()
...
...
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