aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/mist/gui.go
diff options
context:
space:
mode:
authorzelig <viktor.tron@gmail.com>2015-03-15 14:18:58 +0800
committerzelig <viktor.tron@gmail.com>2015-03-15 14:18:58 +0800
commit31ffca6d8a777c164776642368034d84984c1f4c (patch)
treefd2b76b0d810cc04e4d19ab046ccecf999e5926d /cmd/mist/gui.go
parentda44097800caf2e20ec8e067f8700e59a43a5e06 (diff)
downloaddexon-31ffca6d8a777c164776642368034d84984c1f4c.tar.gz
dexon-31ffca6d8a777c164776642368034d84984c1f4c.tar.zst
dexon-31ffca6d8a777c164776642368034d84984c1f4c.zip
remove jsre from mist
Diffstat (limited to 'cmd/mist/gui.go')
-rw-r--r--cmd/mist/gui.go25
1 files changed, 2 insertions, 23 deletions
diff --git a/cmd/mist/gui.go b/cmd/mist/gui.go
index a49e9f6f8..e50dfad14 100644
--- a/cmd/mist/gui.go
+++ b/cmd/mist/gui.go
@@ -25,9 +25,7 @@ import "C"
import (
"encoding/json"
"fmt"
- "io/ioutil"
"math/big"
- "os"
"path"
"runtime"
"sort"
@@ -99,7 +97,7 @@ func NewWindow(ethereum *eth.Ethereum) *Gui {
return gui
}
-func (gui *Gui) Start(assetPath string) {
+func (gui *Gui) Start(assetPath, libPath string) {
defer gui.txDb.Close()
guilogger.Infoln("Starting GUI")
@@ -117,7 +115,7 @@ func (gui *Gui) Start(assetPath string) {
// Create a new QML engine
gui.engine = qml.NewEngine()
context := gui.engine.Context()
- gui.uiLib = NewUiLib(gui.engine, gui.eth, assetPath)
+ gui.uiLib = NewUiLib(gui.engine, gui.eth, assetPath, libPath)
gui.whisper = qwhisper.New(gui.eth.Whisper())
// Expose the eth library and the ui library to QML
@@ -292,25 +290,6 @@ func (self *Gui) getObjectByName(objectName string) qml.Object {
return self.win.Root().ObjectByName(objectName)
}
-func loadJavascriptAssets(gui *Gui) (jsfiles string) {
- for _, fn := range []string{"ext/q.js", "ext/eth.js/main.js", "ext/eth.js/qt.js", "ext/setup.js"} {
- f, err := os.Open(gui.uiLib.AssetPath(fn))
- if err != nil {
- fmt.Println(err)
- continue
- }
-
- content, err := ioutil.ReadAll(f)
- if err != nil {
- fmt.Println(err)
- continue
- }
- jsfiles += string(content)
- }
-
- return
-}
-
func (gui *Gui) SendCommand(cmd ServEv) {
gui.serviceEvents <- cmd
}