Minor UI changes

* Moved log from block view
* Prepend instead of append for logs
pull/94/head
obscuren 10 years ago
parent 8ee6574d12
commit efadfbfb17
  1. 6
      ethereal/assets/debugger/debugger.qml
  2. 31
      ethereal/assets/qml/wallet.qml
  3. 1
      ethereal/ui/debugger.go
  4. 4
      ethereal/ui/gui.go

@ -255,6 +255,10 @@ ApplicationWindow {
} }
function setLog(msg) { function setLog(msg) {
logModel.append({message: msg}) logModel.insert(0, {message: msg})
}
function clearLog() {
logModel.clear()
} }
} }

@ -204,7 +204,7 @@ ApplicationWindow {
id: blockTable id: blockTable
width: parent.width width: parent.width
anchors.top: parent.top anchors.top: parent.top
anchors.bottom: logView.top anchors.bottom: parent.bottom
TableViewColumn{ role: "number" ; title: "#" ; width: 100 } TableViewColumn{ role: "number" ; title: "#" ; width: 100 }
TableViewColumn{ role: "hash" ; title: "Hash" ; width: 560 } TableViewColumn{ role: "hash" ; title: "Hash" ; width: 560 }
TableViewColumn{ role: "txAmount" ; title: "Tx amount" ; width: 100 } 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 { Rectangle {
@ -257,6 +244,20 @@ ApplicationWindow {
text: pub.getKey().address text: pub.getKey().address
width: 500 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) { function addLog(str) {
if(str.len != 0) { if(str.len != 0) {
logModel.append({description: str}) logModel.insert(0, {description: str})
} }
} }

@ -83,6 +83,7 @@ func (self *DebuggerWindow) Debug(valueStr, gasStr, gasPriceStr, scriptStr, data
dis := ethchain.Disassemble(script) dis := ethchain.Disassemble(script)
self.win.Root().Call("clearAsm") self.win.Root().Call("clearAsm")
self.win.Root().Call("clearLog")
for _, str := range dis { for _, str := range dis {
self.win.Root().Call("setAsm", str) self.win.Root().Call("setAsm", str)

@ -66,7 +66,6 @@ func (gui *Gui) Start(assetPath string) {
}}) }})
ethutil.Config.SetClientString(fmt.Sprintf("/Ethereal v%s", version)) ethutil.Config.SetClientString(fmt.Sprintf("/Ethereal v%s", version))
ethutil.Config.Log.Infoln("[GUI] Starting GUI")
// Create a new QML engine // Create a new QML engine
gui.engine = qml.NewEngine() gui.engine = qml.NewEngine()
context := gui.engine.Context() context := gui.engine.Context()
@ -93,6 +92,9 @@ func (gui *Gui) Start(assetPath string) {
panic(err) panic(err)
} }
ethutil.Config.Log.AddLogSystem(gui)
ethutil.Config.Log.Infoln("[GUI] Starting GUI")
win.Show() win.Show()
win.Wait() win.Wait()

Loading…
Cancel
Save