From a3c482351114404a4568f4b3f4503182402dc6fd Mon Sep 17 00:00:00 2001 From: zelig Date: Thu, 3 Jul 2014 17:35:48 +0100 Subject: Gui saves custom client id and loglevel - gui NewWindow takes SimpleClientIdentity as argument - gui NewWindow takes ethutil.ConfigManager as argument to manage flag persistence - gui now saves loglevel and custom client id via config.Save - rename custom client id methods consistently also in wallet.qml - clientIdentifier now set in main wrappers - version handled within wrapper - modify InitConfig now returning *ethutil.ConfigManager (passed to gui) --- ethereal/assets/qml/wallet.qml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ethereal/assets') diff --git a/ethereal/assets/qml/wallet.qml b/ethereal/assets/qml/wallet.qml index 628d9f96a..4b252f200 100644 --- a/ethereal/assets/qml/wallet.qml +++ b/ethereal/assets/qml/wallet.qml @@ -248,9 +248,9 @@ ApplicationWindow { text: "Client ID" } TextField { - text: eth.clientId() + text: eth.getCustomIdentifier() onTextChanged: { - eth.changeClientId(text) + eth.setCustomIdentifier(text) } } } -- cgit v1.2.3 From ca395306e3997c1f2fd2aa2e780518eb2e2f1845 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 4 Jul 2014 13:04:25 +0200 Subject: Updated debugger * Compile on the go. Continues compilation in order to update the ASM view * Short cuts commands --- ethereal/assets/debugger/debugger.qml | 70 +++++++++++++++++++++++++++++++++-- 1 file changed, 67 insertions(+), 3 deletions(-) (limited to 'ethereal/assets') diff --git a/ethereal/assets/debugger/debugger.qml b/ethereal/assets/debugger/debugger.qml index b93308b3e..579e8be3a 100644 --- a/ethereal/assets/debugger/debugger.qml +++ b/ethereal/assets/debugger/debugger.qml @@ -7,6 +7,7 @@ import QtQuick.Controls.Styles 1.1 import Ethereum 1.0 ApplicationWindow { + id: win visible: false title: "IceCREAM" minimumWidth: 1280 @@ -17,6 +18,10 @@ ApplicationWindow { property alias codeText: codeEditor.text property alias dataText: rawDataField.text + onClosing: { + compileTimer.stop() + } + MenuBar { Menu { title: "Debugger" @@ -34,12 +39,44 @@ ApplicationWindow { MenuItem { text: "Continue" - shortcut: "Ctrl+c" + shortcut: "Ctrl+g" onTriggered: dbg.continue() } + MenuItem { + text: "Command" + shortcut: "Ctrl+l" + onTriggered: { + dbgCommand.focus = true + } + } + MenuItem { + text: "Focus code" + shortcut: "Ctrl+1" + onTriggered: { + codeEditor.focus = true + } + } + MenuItem { + text: "Focus data" + shortcut: "Ctrl+2" + onTriggered: { + rawDataField.focus = true + } + } + + /* + MenuItem { + text: "Close window" + shortcut: "Ctrl+w" + onTriggered: { + win.close() + } + } + */ } } + SplitView { anchors.fill: parent property var asmModel: ListModel { @@ -73,6 +110,15 @@ ApplicationWindow { anchors.bottom: parent.bottom anchors.left: parent.left anchors.right: settings.left + focus: true + + Timer { + id: compileTimer + interval: 500 ; running: true ; repeat: true + onTriggered: { + dbg.compile(codeEditor.text) + } + } } Column { @@ -185,7 +231,7 @@ ApplicationWindow { } height: parent.height width: parent.width - TableViewColumn{ id: message ; role: "message" ; title: "log" ; width: logTableView.width } + TableViewColumn{ id: message ; role: "message" ; title: "log" ; width: logTableView.width -1 } model: logModel } } @@ -207,7 +253,7 @@ ApplicationWindow { y: 1 x: asmTableView.width width: 500 - placeholderText: "Debugger command (help for help)" + placeholderText: "Debugger (type 'help')" Keys.onReturnPressed: { exec() } @@ -225,6 +271,7 @@ ApplicationWindow { } toolBar: ToolBar { + height: 30 RowLayout { spacing: 5 @@ -254,6 +301,23 @@ ApplicationWindow { text: "Continue" } } + + + ComboBox { + id: snippets + anchors.right: parent.right + model: ListModel { + ListElement { text: "Snippets" ; value: "" } + ListElement { text: "Call Contract" ; value: "var[2] in;\nvar ret;\n\nin[0] = \"arg1\"\nin[1] = 0xdeadbeef\n\nvar success = call(0x0c542ddea93dae0c2fcb2cf175f03ad80d6be9a0, 0, 7000, in, ret)\n\nreturn ret" } + } + onCurrentIndexChanged: { + if(currentIndex != 0) { + var code = snippets.model.get(currentIndex).value; + codeEditor.insert(codeEditor.cursorPosition, code) + } + } + } + } function debugCurrent() { -- cgit v1.2.3 From 9e38ca555dccd6b9a4a3fa0eb9eb749d2dc3c82c Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 4 Jul 2014 15:31:13 +0200 Subject: Visual updates --- ethereal/assets/debugger/debugger.qml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'ethereal/assets') diff --git a/ethereal/assets/debugger/debugger.qml b/ethereal/assets/debugger/debugger.qml index 579e8be3a..f204647c8 100644 --- a/ethereal/assets/debugger/debugger.qml +++ b/ethereal/assets/debugger/debugger.qml @@ -231,7 +231,7 @@ ApplicationWindow { } height: parent.height width: parent.width - TableViewColumn{ id: message ; role: "message" ; title: "log" ; width: logTableView.width -1 } + TableViewColumn{ id: message ; role: "message" ; title: "log" ; width: logTableView.width - 2 } model: logModel } } @@ -258,16 +258,6 @@ ApplicationWindow { exec() } } - - Button { - anchors { - left: dbgCommand.right - } - text: "Exec" - onClicked: { - exec() - } - } } toolBar: ToolBar { -- cgit v1.2.3