aboutsummaryrefslogtreecommitdiffstats
path: root/ethereal
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-05-29 18:24:14 +0800
committerobscuren <geffobscura@gmail.com>2014-05-29 18:24:14 +0800
commitefadfbfb1779549c2898304dce4bbce30b067ceb (patch)
tree930a112d04e35aa67a46cda800fd7b040006bf58 /ethereal
parent8ee6574d12601df7a8edb56ee9ccc4cfce7ef6a8 (diff)
downloadgo-tangerine-efadfbfb1779549c2898304dce4bbce30b067ceb.tar
go-tangerine-efadfbfb1779549c2898304dce4bbce30b067ceb.tar.gz
go-tangerine-efadfbfb1779549c2898304dce4bbce30b067ceb.tar.bz2
go-tangerine-efadfbfb1779549c2898304dce4bbce30b067ceb.tar.lz
go-tangerine-efadfbfb1779549c2898304dce4bbce30b067ceb.tar.xz
go-tangerine-efadfbfb1779549c2898304dce4bbce30b067ceb.tar.zst
go-tangerine-efadfbfb1779549c2898304dce4bbce30b067ceb.zip
Minor UI changes
* Moved log from block view * Prepend instead of append for logs
Diffstat (limited to 'ethereal')
-rw-r--r--ethereal/assets/debugger/debugger.qml6
-rw-r--r--ethereal/assets/qml/wallet.qml31
-rw-r--r--ethereal/ui/debugger.go1
-rw-r--r--ethereal/ui/gui.go4
4 files changed, 25 insertions, 17 deletions
diff --git a/ethereal/assets/debugger/debugger.qml b/ethereal/assets/debugger/debugger.qml
index 247d4de67..84d9a0732 100644
--- a/ethereal/assets/debugger/debugger.qml
+++ b/ethereal/assets/debugger/debugger.qml
@@ -255,6 +255,10 @@ ApplicationWindow {
}
function setLog(msg) {
- logModel.append({message: msg})
+ logModel.insert(0, {message: msg})
+ }
+
+ function clearLog() {
+ logModel.clear()
}
}
diff --git a/ethereal/assets/qml/wallet.qml b/ethereal/assets/qml/wallet.qml
index f48b9a85b..eaf7c1b92 100644
--- a/ethereal/assets/qml/wallet.qml
+++ b/ethereal/assets/qml/wallet.qml
@@ -204,7 +204,7 @@ ApplicationWindow {
id: blockTable
width: parent.width
anchors.top: parent.top
- anchors.bottom: logView.top
+ anchors.bottom: parent.bottom
TableViewColumn{ role: "number" ; title: "#" ; width: 100 }
TableViewColumn{ role: "hash" ; title: "Hash" ; width: 560 }
TableViewColumn{ role: "txAmount" ; title: "Tx amount" ; width: 100 }
@@ -217,19 +217,6 @@ ApplicationWindow {
}
}
- property var logModel: ListModel {
- id: logModel
- }
-
- TableView {
- id: logView
- width: parent.width
- height: 150
- anchors.bottom: parent.bottom
- TableViewColumn{ role: "description" ; title: "log" }
-
- model: logModel
- }
}
Rectangle {
@@ -257,6 +244,20 @@ ApplicationWindow {
text: pub.getKey().address
width: 500
}
+
+ property var logModel: ListModel {
+ id: logModel
+ }
+
+ TableView {
+ id: logView
+ width: parent.width
+ height: 200
+ anchors.bottom: parent.bottom
+ TableViewColumn{ role: "description" ; title: "log" }
+
+ model: logModel
+ }
}
/*
@@ -690,7 +691,7 @@ ApplicationWindow {
function addLog(str) {
if(str.len != 0) {
- logModel.append({description: str})
+ logModel.insert(0, {description: str})
}
}
diff --git a/ethereal/ui/debugger.go b/ethereal/ui/debugger.go
index 99dbabec0..a6b8e16d0 100644
--- a/ethereal/ui/debugger.go
+++ b/ethereal/ui/debugger.go
@@ -83,6 +83,7 @@ func (self *DebuggerWindow) Debug(valueStr, gasStr, gasPriceStr, scriptStr, data
dis := ethchain.Disassemble(script)
self.win.Root().Call("clearAsm")
+ self.win.Root().Call("clearLog")
for _, str := range dis {
self.win.Root().Call("setAsm", str)
diff --git a/ethereal/ui/gui.go b/ethereal/ui/gui.go
index 1698f5de0..9a8673a1c 100644
--- a/ethereal/ui/gui.go
+++ b/ethereal/ui/gui.go
@@ -66,7 +66,6 @@ func (gui *Gui) Start(assetPath string) {
}})
ethutil.Config.SetClientString(fmt.Sprintf("/Ethereal v%s", version))
- ethutil.Config.Log.Infoln("[GUI] Starting GUI")
// Create a new QML engine
gui.engine = qml.NewEngine()
context := gui.engine.Context()
@@ -93,6 +92,9 @@ func (gui *Gui) Start(assetPath string) {
panic(err)
}
+ ethutil.Config.Log.AddLogSystem(gui)
+ ethutil.Config.Log.Infoln("[GUI] Starting GUI")
+
win.Show()
win.Wait()