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
893e9256
Commit
893e9256
authored
Sep 07, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some minor corrections
parent
4e6defd6
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
35 additions
and
26 deletions
+35
-26
filter.js
ethereal/assets/ext/filter.js
+1
-1
chain.qml
ethereal/assets/qml/views/chain.qml
+7
-4
wallet.qml
ethereal/assets/qml/views/wallet.qml
+1
-0
wallet.qml
ethereal/assets/qml/wallet.qml
+17
-14
bindings.go
ethereal/bindings.go
+1
-1
gui.go
ethereal/gui.go
+4
-6
ui_lib.go
ethereal/ui_lib.go
+4
-0
No files found.
ethereal/assets/ext/filter.js
View file @
893e9256
...
...
@@ -3,7 +3,7 @@ var Filter = function(options) {
this
.
seed
=
Math
.
floor
(
Math
.
random
()
*
1000000
);
this
.
options
=
options
;
if
(
options
==
"chain"
)
{
if
(
options
==
=
"chain"
)
{
eth
.
registerFilterString
(
options
,
this
.
seed
);
}
else
if
(
typeof
options
===
"object"
)
{
eth
.
registerFilter
(
options
,
this
.
seed
);
...
...
ethereal/assets/qml/views/chain.qml
View file @
893e9256
...
...
@@ -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
){
...
...
ethereal/assets/qml/views/wallet.qml
View file @
893e9256
...
...
@@ -157,6 +157,7 @@ Rectangle {
addTxs
(
filter
.
messages
())
}
function
addTxs
(
messages
)
{
for
(
var
i
=
0
;
i
<
messages
.
length
;
i
++
)
{
var
message
=
messages
[
i
];
...
...
ethereal/assets/qml/wallet.qml
View file @
893e9256
...
...
@@ -18,7 +18,7 @@ ApplicationWindow {
height
:
600
minimumHeight
:
300
title
:
"Ethe
r browser
"
title
:
"Ethe
gate
"
// 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
{
...
...
ethereal/bindings.go
View file @
893e9256
...
...
@@ -78,7 +78,7 @@ func (gui *Gui) GetLogLevel() ethlog.LogLevel {
}
func
(
self
*
Gui
)
AddPlugin
(
pluginPath
string
)
{
self
.
plugins
[
pluginPath
]
=
plugin
{
Name
:
"SomeName"
,
Path
:
pluginPath
}
self
.
plugins
[
pluginPath
]
=
plugin
{
Name
:
pluginPath
,
Path
:
pluginPath
}
json
,
_
:=
json
.
MarshalIndent
(
self
.
plugins
,
""
,
" "
)
ethutil
.
WriteFile
(
ethutil
.
Config
.
ExecPath
+
"/plugins.json"
,
json
)
...
...
ethereal/gui.go
View file @
893e9256
...
...
@@ -5,6 +5,7 @@ import (
"encoding/json"
"fmt"
"math/big"
"path"
"runtime"
"strconv"
"strings"
...
...
@@ -63,12 +64,7 @@ func NewWindow(ethereum *eth.Ethereum, config *ethutil.ConfigManager, clientIden
pipe
:=
ethpipe
.
NewJSPipe
(
ethereum
)
gui
:=
&
Gui
{
eth
:
ethereum
,
txDb
:
db
,
pipe
:
pipe
,
logLevel
:
ethlog
.
LogLevel
(
logLevel
),
Session
:
session
,
open
:
false
,
clientIdentity
:
clientIdentity
,
config
:
config
,
plugins
:
make
(
map
[
string
]
plugin
)}
data
,
err
:=
ethutil
.
ReadAllFile
(
ethutil
.
Config
.
ExecPath
+
"/plugins.json"
)
if
err
!=
nil
{
fmt
.
Println
(
err
)
}
fmt
.
Println
(
"plugins:"
,
string
(
data
))
data
,
_
:=
ethutil
.
ReadAllFile
(
path
.
Join
(
ethutil
.
Config
.
ExecPath
,
"plugins.json"
))
json
.
Unmarshal
([]
byte
(
data
),
&
gui
.
plugins
)
return
gui
...
...
@@ -339,6 +335,8 @@ func (gui *Gui) update() {
}()
for
_
,
plugin
:=
range
gui
.
plugins
{
logger
.
Infoln
(
"Loading plugin "
,
plugin
.
Name
)
gui
.
win
.
Root
()
.
Call
(
"addPlugin"
,
plugin
.
Path
,
""
)
}
...
...
ethereal/ui_lib.go
View file @
893e9256
...
...
@@ -44,6 +44,10 @@ func NewUiLib(engine *qml.Engine, eth *eth.Ethereum, assetPath string) *UiLib {
return
&
UiLib
{
JSPipe
:
ethpipe
.
NewJSPipe
(
eth
),
engine
:
engine
,
eth
:
eth
,
assetPath
:
assetPath
,
jsEngine
:
javascript
.
NewJSRE
(
eth
),
filterCallbacks
:
make
(
map
[
int
][]
int
),
filters
:
make
(
map
[
int
]
*
GuiFilter
)}
}
func
(
self
*
UiLib
)
Note
(
msg
string
)
{
logger
.
Infoln
(
msg
)
}
func
(
self
*
UiLib
)
LookupDomain
(
domain
string
)
string
{
world
:=
self
.
World
()
...
...
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