diff options
author | obscuren <geffobscura@gmail.com> | 2015-03-09 20:50:05 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-03-09 20:50:05 +0800 |
commit | 20741a96ac6dc824bcc7d67e7c966fa65cbb2faf (patch) | |
tree | bf72d48cca05c1847043b450ff04e92368af8a36 /cmd/mist/ui_lib.go | |
parent | 738d6e20f2a229aab15b767cb8ca2d2f9c2f9aa8 (diff) | |
download | dexon-20741a96ac6dc824bcc7d67e7c966fa65cbb2faf.tar.gz dexon-20741a96ac6dc824bcc7d67e7c966fa65cbb2faf.tar.zst dexon-20741a96ac6dc824bcc7d67e7c966fa65cbb2faf.zip |
Updated xeth instances to take extra param for ui.Interface
Please be aware that if any of the instances on xeth.frontend are called
the program will crash due to the default, temporarily, frontend
interface.
Diffstat (limited to 'cmd/mist/ui_lib.go')
-rw-r--r-- | cmd/mist/ui_lib.go | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/cmd/mist/ui_lib.go b/cmd/mist/ui_lib.go index 098e8fca5..187d5b2d6 100644 --- a/cmd/mist/ui_lib.go +++ b/cmd/mist/ui_lib.go @@ -58,7 +58,7 @@ type UiLib struct { } func NewUiLib(engine *qml.Engine, eth *eth.Ethereum, assetPath string) *UiLib { - x := xeth.New(eth) + x := xeth.New(eth, nil) lib := &UiLib{XEth: x, engine: engine, eth: eth, assetPath: assetPath, jsEngine: javascript.NewJSRE(x), filterCallbacks: make(map[int][]int)} //, filters: make(map[int]*xeth.JSFilter)} lib.filterManager = filter.NewFilterManager(eth.EventMux()) go lib.filterManager.Start() @@ -91,24 +91,6 @@ func (self *UiLib) EvalJavascriptString(str string) string { return fmt.Sprintf("%v", value) } -func (ui *UiLib) OpenQml(path string) { - container := NewQmlApplication(path[7:], ui) - app := NewExtApplication(container, ui) - - go app.run() -} - -func (ui *UiLib) OpenHtml(path string) { - container := NewHtmlApplication(path, ui) - app := NewExtApplication(container, ui) - - go app.run() -} - -func (ui *UiLib) OpenBrowser() { - ui.OpenHtml("file://" + ui.AssetPath("ext/home.html")) -} - func (ui *UiLib) Muted(content string) { component, err := ui.engine.LoadFile(ui.AssetPath("qml/muted.qml")) if err != nil { |