aboutsummaryrefslogtreecommitdiffstats
path: root/ethereal
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-07-17 21:32:44 +0800
committerobscuren <geffobscura@gmail.com>2014-07-17 21:32:44 +0800
commitc9517024237de781cdc450bca89907217e5a8cef (patch)
tree9ed398ca6ddbc019917b96a6e14988d89fbef15a /ethereal
parentfc8bd7229ee25e214130df98875ecc13e4650911 (diff)
parent7d64b589b4cf3f71125d5bd0f0a8f6a560e909db (diff)
downloaddexon-c9517024237de781cdc450bca89907217e5a8cef.tar
dexon-c9517024237de781cdc450bca89907217e5a8cef.tar.gz
dexon-c9517024237de781cdc450bca89907217e5a8cef.tar.bz2
dexon-c9517024237de781cdc450bca89907217e5a8cef.tar.lz
dexon-c9517024237de781cdc450bca89907217e5a8cef.tar.xz
dexon-c9517024237de781cdc450bca89907217e5a8cef.tar.zst
dexon-c9517024237de781cdc450bca89907217e5a8cef.zip
Merge branch 'develop'
Diffstat (limited to 'ethereal')
-rw-r--r--ethereal/assets/debugger/debugger.qml8
-rw-r--r--ethereal/assets/qml/webapp.qml3
-rw-r--r--ethereal/debugger.go13
-rw-r--r--ethereal/flags.go2
-rw-r--r--ethereal/html_container.go7
5 files changed, 22 insertions, 11 deletions
diff --git a/ethereal/assets/debugger/debugger.qml b/ethereal/assets/debugger/debugger.qml
index f204647c8..34fe01253 100644
--- a/ethereal/assets/debugger/debugger.qml
+++ b/ethereal/assets/debugger/debugger.qml
@@ -19,7 +19,7 @@ ApplicationWindow {
property alias dataText: rawDataField.text
onClosing: {
- compileTimer.stop()
+ //compileTimer.stop()
}
MenuBar {
@@ -86,7 +86,7 @@ ApplicationWindow {
TableView {
id: asmTableView
width: 200
- TableViewColumn{ role: "value" ; title: "" ; width: 200 }
+ TableViewColumn{ role: "value" ; title: "" ; width: asmTableView.width - 2 }
model: asmModel
}
@@ -112,13 +112,15 @@ ApplicationWindow {
anchors.right: settings.left
focus: true
+ /*
Timer {
id: compileTimer
interval: 500 ; running: true ; repeat: true
onTriggered: {
- dbg.compile(codeEditor.text)
+ dbg.autoComp(codeEditor.text)
}
}
+ */
}
Column {
diff --git a/ethereal/assets/qml/webapp.qml b/ethereal/assets/qml/webapp.qml
index 401267511..5e4c035d8 100644
--- a/ethereal/assets/qml/webapp.qml
+++ b/ethereal/assets/qml/webapp.qml
@@ -191,6 +191,7 @@ ApplicationWindow {
inspector.visible = false
}else{
inspector.visible = true
+ inspector.url = webview.experimental.remoteInspectorUrl
}
}
onDoubleClicked: {
@@ -224,7 +225,6 @@ ApplicationWindow {
WebView {
id: inspector
visible: false
- url: webview.experimental.remoteInspectorUrl
anchors {
left: root.left
right: root.right
@@ -238,7 +238,6 @@ ApplicationWindow {
name: "inspectorShown"
PropertyChanges {
target: inspector
- url: webview.experimental.remoteInspectorUrl
}
}
]
diff --git a/ethereal/debugger.go b/ethereal/debugger.go
index 64ca316f8..997c2e8dd 100644
--- a/ethereal/debugger.go
+++ b/ethereal/debugger.go
@@ -74,6 +74,13 @@ func (self *DebuggerWindow) Compile(code string) {
}
}
+// Used by QML
+func (self *DebuggerWindow) AutoComp(code string) {
+ if self.Db.done {
+ self.Compile(code)
+ }
+}
+
func (self *DebuggerWindow) ClearLog() {
self.win.Root().Call("clearLog")
}
@@ -110,8 +117,6 @@ func (self *DebuggerWindow) Debug(valueStr, gasStr, gasPriceStr, scriptStr, data
return
}
- self.SetAsm(script)
-
var (
gas = ethutil.Big(gasStr)
gasPrice = ethutil.Big(gasPriceStr)
@@ -257,6 +262,10 @@ func (self *Debugger) StepHook(pc int, op ethchain.OpCode, mem *ethchain.Memory,
return self.halting(pc, op, mem, stack, stateObject)
}
+func (self *Debugger) SetCode(byteCode []byte) {
+ self.main.SetAsm(byteCode)
+}
+
func (self *Debugger) BreakPoints() []int64 {
return self.breakPoints
}
diff --git a/ethereal/flags.go b/ethereal/flags.go
index d5ca9f336..c9327c3d3 100644
--- a/ethereal/flags.go
+++ b/ethereal/flags.go
@@ -36,6 +36,7 @@ var LogLevel int
// flags specific to gui client
var AssetPath string
+//TODO: If we re-use the one defined in cmd.go the binary osx image crashes. If somebody finds out why we can dry this up.
func defaultAssetPath() string {
var assetPath string
// If the current working directory is the go-ethereum dir
@@ -60,7 +61,6 @@ func defaultAssetPath() string {
}
return assetPath
}
-
func defaultDataDir() string {
usr, _ := user.Current()
return path.Join(usr.HomeDir, ".ethereal")
diff --git a/ethereal/html_container.go b/ethereal/html_container.go
index 1e835eebc..04136f801 100644
--- a/ethereal/html_container.go
+++ b/ethereal/html_container.go
@@ -8,7 +8,6 @@ import (
"github.com/go-qml/qml"
"github.com/howeyc/fsnotify"
"io/ioutil"
- "log"
"net/url"
"os"
"path"
@@ -59,7 +58,7 @@ func (app *HtmlApplication) RootFolder() string {
if err != nil {
return ""
}
- return path.Dir(folder.RequestURI())
+ return path.Dir(ethutil.WindonizePath(folder.RequestURI()))
}
func (app *HtmlApplication) RecursiveFolders() []os.FileInfo {
files, _ := ioutil.ReadDir(app.RootFolder())
@@ -77,11 +76,13 @@ func (app *HtmlApplication) NewWatcher(quitChan chan bool) {
app.watcher, err = fsnotify.NewWatcher()
if err != nil {
+ logger.Infoln("Could not create new auto-reload watcher:", err)
return
}
err = app.watcher.Watch(app.RootFolder())
if err != nil {
- log.Fatal(err)
+ logger.Infoln("Could not start auto-reload watcher:", err)
+ return
}
for _, folder := range app.RecursiveFolders() {
fullPath := app.RootFolder() + "/" + folder.Name()