diff options
author | Maran <maran.hidskes@gmail.com> | 2014-04-01 19:18:42 +0800 |
---|---|---|
committer | Maran <maran.hidskes@gmail.com> | 2014-04-01 19:18:42 +0800 |
commit | ee5e7f2b350202ed2d2e64265d18d0462bd21c91 (patch) | |
tree | 8ea2a6305d58e8d56b16e9869850961b61b7d25c /ethereal/ui/ui_lib.go | |
parent | a30f5730b384bf99d23f6e83b356e27a14f961d1 (diff) | |
parent | e403b28eea6959c1d0ed003d955df3dee586083b (diff) | |
download | dexon-ee5e7f2b350202ed2d2e64265d18d0462bd21c91.tar.gz dexon-ee5e7f2b350202ed2d2e64265d18d0462bd21c91.tar.zst dexon-ee5e7f2b350202ed2d2e64265d18d0462bd21c91.zip |
Fix merge conflict
Diffstat (limited to 'ethereal/ui/ui_lib.go')
-rw-r--r-- | ethereal/ui/ui_lib.go | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/ethereal/ui/ui_lib.go b/ethereal/ui/ui_lib.go index edff02286..5c3c98fb9 100644 --- a/ethereal/ui/ui_lib.go +++ b/ethereal/ui/ui_lib.go @@ -16,6 +16,14 @@ type UiLib struct { engine *qml.Engine eth *eth.Ethereum connected bool + assetPath string +} + +func NewUiLib(engine *qml.Engine, eth *eth.Ethereum, assetPath string) *UiLib { + if assetPath == "" { + assetPath = DefaultAssetPath() + } + return &UiLib{engine: engine, eth: eth, assetPath: assetPath} } // Opens a QML file (external application) @@ -45,10 +53,10 @@ func (ui *UiLib) ConnectToPeer(addr string) { } func (ui *UiLib) AssetPath(p string) string { - return AssetPath(p) + return path.Join(ui.assetPath, p) } -func AssetPath(p string) string { +func DefaultAssetPath() string { var base string // If the current working directory is the go-ethereum dir // assume a debug build and use the source directory as @@ -71,5 +79,5 @@ func AssetPath(p string) string { } } - return path.Join(base, p) + return base } |