aboutsummaryrefslogtreecommitdiffstats
path: root/ethereal
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-06-14 21:44:32 +0800
committerobscuren <geffobscura@gmail.com>2014-06-14 21:44:32 +0800
commitef1b923b31dfda78bc8f3dce415721aa9518fe4b (patch)
treef21aacf86932ec3f7a85de1ccb74fc8b00763e5d /ethereal
parente7a22af0e633db4da3d81f1ad07126ea3b06f891 (diff)
downloadgo-tangerine-ef1b923b31dfda78bc8f3dce415721aa9518fe4b.tar
go-tangerine-ef1b923b31dfda78bc8f3dce415721aa9518fe4b.tar.gz
go-tangerine-ef1b923b31dfda78bc8f3dce415721aa9518fe4b.tar.bz2
go-tangerine-ef1b923b31dfda78bc8f3dce415721aa9518fe4b.tar.lz
go-tangerine-ef1b923b31dfda78bc8f3dce415721aa9518fe4b.tar.xz
go-tangerine-ef1b923b31dfda78bc8f3dce415721aa9518fe4b.tar.zst
go-tangerine-ef1b923b31dfda78bc8f3dce415721aa9518fe4b.zip
Added a log level slider which can change the log level
Diffstat (limited to 'ethereal')
-rw-r--r--ethereal/assets/debugger/debugger.qml6
-rw-r--r--ethereal/assets/qml/wallet.qml52
-rw-r--r--ethereal/ui/gui.go4
3 files changed, 53 insertions, 9 deletions
diff --git a/ethereal/assets/debugger/debugger.qml b/ethereal/assets/debugger/debugger.qml
index bc34233fd..31e0eb781 100644
--- a/ethereal/assets/debugger/debugger.qml
+++ b/ethereal/assets/debugger/debugger.qml
@@ -135,7 +135,7 @@ ApplicationWindow {
}
height: parent.height
width: 300
- TableViewColumn{ role: "value" ; title: "Stack" ; width: 200 }
+ TableViewColumn{ role: "value" ; title: "Temp" ; width: 200 }
model: stackModel
}
@@ -224,8 +224,8 @@ ApplicationWindow {
}
function setInstruction(num) {
- //asmTableView.selection.clear()
- //asmTableView.selection.select(num)
+ asmTableView.selection.clear()
+ asmTableView.selection.select(num)
}
function setMem(mem) {
diff --git a/ethereal/assets/qml/wallet.qml b/ethereal/assets/qml/wallet.qml
index 0e065caa4..b98497aba 100644
--- a/ethereal/assets/qml/wallet.qml
+++ b/ethereal/assets/qml/wallet.qml
@@ -29,6 +29,7 @@ ApplicationWindow {
}
Menu {
+ title: "Developer"
MenuItem {
text: "Debugger"
shortcut: "Ctrl+d"
@@ -261,7 +262,7 @@ ApplicationWindow {
id: addressView
width: parent.width - 200
height: 200
- anchors.bottom: logView.top
+ anchors.bottom: logLayout.top
TableViewColumn{ role: "name"; title: "name" }
TableViewColumn{ role: "address"; title: "address"; width: 300}
@@ -296,14 +297,48 @@ ApplicationWindow {
property var logModel: ListModel {
id: logModel
}
- TableView {
- id: logView
+ RowLayout {
+ id: logLayout
width: parent.width
height: 200
anchors.bottom: parent.bottom
- TableViewColumn{ role: "description" ; title: "log" }
+ TableView {
+ id: logView
+ headerVisible: false
+ anchors {
+ right: logLevelSlider.left
+ left: parent.left
+ bottom: parent.bottom
+ top: parent.top
+ }
+
+ TableViewColumn{ role: "description" ; title: "log" }
- model: logModel
+ model: logModel
+ }
+
+ Slider {
+ id: logLevelSlider
+ value: 2
+ anchors {
+ right: parent.right
+ top: parent.top
+ bottom: parent.bottom
+
+ rightMargin: 5
+ leftMargin: 5
+ topMargin: 5
+ bottomMargin: 5
+ }
+
+ orientation: Qt.Vertical
+ maximumValue: 3
+ stepSize: 1
+
+ onValueChanged: {
+ eth.setLogLevel(value)
+ }
+ }
}
}
@@ -651,7 +686,12 @@ ApplicationWindow {
function addLog(str) {
if(str.len != 0) {
- logModel.insert(0, {description: str})
+ if(logView.flickableItem.atYEnd) {
+ logModel.append({description: str})
+ logView.positionViewAtRow(logView.rowCount - 1, ListView.Contain)
+ } else {
+ logModel.append({description: str})
+ }
}
}
diff --git a/ethereal/ui/gui.go b/ethereal/ui/gui.go
index 23f53ef47..b67035149 100644
--- a/ethereal/ui/gui.go
+++ b/ethereal/ui/gui.go
@@ -356,3 +356,7 @@ func (gui *Gui) ChangeClientId(id string) {
func (gui *Gui) ClientId() string {
return ethutil.Config.Identifier
}
+
+func (gui *Gui) SetLogLevel(level int) {
+ ethutil.Config.Log.SetLevel(level)
+}