aboutsummaryrefslogtreecommitdiffstats
path: root/ethereal
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-07-11 03:54:46 +0800
committerobscuren <geffobscura@gmail.com>2014-07-11 03:54:46 +0800
commitfc8bd7229ee25e214130df98875ecc13e4650911 (patch)
tree4938ae8de73d99a20bba9999103b381e52519e66 /ethereal
parent685aebc72e9d5fc3fde275961709c4496fdb73cd (diff)
parentc2bca5939d1d78d1548fcd43c29390fb06a508c0 (diff)
downloadgo-tangerine-fc8bd7229ee25e214130df98875ecc13e4650911.tar
go-tangerine-fc8bd7229ee25e214130df98875ecc13e4650911.tar.gz
go-tangerine-fc8bd7229ee25e214130df98875ecc13e4650911.tar.bz2
go-tangerine-fc8bd7229ee25e214130df98875ecc13e4650911.tar.lz
go-tangerine-fc8bd7229ee25e214130df98875ecc13e4650911.tar.xz
go-tangerine-fc8bd7229ee25e214130df98875ecc13e4650911.tar.zst
go-tangerine-fc8bd7229ee25e214130df98875ecc13e4650911.zip
Merge branch 'develop'
Diffstat (limited to 'ethereal')
-rw-r--r--ethereal/assets/qml/wallet.qml12
-rw-r--r--ethereal/assets/qml/webapp.qml2
-rw-r--r--ethereal/flags.go4
-rw-r--r--ethereal/qml_container.go10
4 files changed, 18 insertions, 10 deletions
diff --git a/ethereal/assets/qml/wallet.qml b/ethereal/assets/qml/wallet.qml
index 4b252f200..c783cde83 100644
--- a/ethereal/assets/qml/wallet.qml
+++ b/ethereal/assets/qml/wallet.qml
@@ -100,7 +100,7 @@ ApplicationWindow {
anchors.right: parent.right
height: 200
Image {
- source: ui.assetPath("tx.png")
+ source: "../tx.png"
anchors.horizontalCenter: parent.horizontalCenter
MouseArea {
anchors.fill: parent
@@ -110,7 +110,7 @@ ApplicationWindow {
}
}
Image {
- source: ui.assetPath("new.png")
+ source: "../new.png"
anchors.horizontalCenter: parent.horizontalCenter
MouseArea {
anchors.fill: parent
@@ -120,7 +120,7 @@ ApplicationWindow {
}
}
Image {
- source: ui.assetPath("net.png")
+ source: "../net.png"
anchors.horizontalCenter: parent.horizontalCenter
MouseArea {
anchors.fill: parent
@@ -131,7 +131,7 @@ ApplicationWindow {
}
Image {
- source: ui.assetPath("heart.png")
+ source: "../heart.png"
anchors.horizontalCenter: parent.horizontalCenter
MouseArea {
anchors.fill: parent
@@ -436,7 +436,7 @@ ApplicationWindow {
onDoubleClicked: peerWindow.visible = true
anchors.fill: parent
}
- source: ui.assetPath("network.png")
+ source: "../network.png"
}
}
@@ -624,7 +624,7 @@ ApplicationWindow {
width: 150
fillMode: Image.PreserveAspectFit
smooth: true
- source: ui.assetPath("facet.png")
+ source: "../facet.png"
x: 10
y: 10
}
diff --git a/ethereal/assets/qml/webapp.qml b/ethereal/assets/qml/webapp.qml
index 63927f0eb..401267511 100644
--- a/ethereal/assets/qml/webapp.qml
+++ b/ethereal/assets/qml/webapp.qml
@@ -38,7 +38,7 @@ ApplicationWindow {
experimental.preferences.javascriptEnabled: true
experimental.preferences.navigatorQtObjectEnabled: true
experimental.preferences.developerExtrasEnabled: true
- experimental.userScripts: [ui.assetPath("ext/pre.js"), ui.assetPath("ext/big.js"), ui.assetPath("ext/string.js"), ui.assetPath("ext/ethereum.js")]
+ experimental.userScripts: ["../ext/pre.js", "../ext/big.js", "../ext/string.js", "../ext/ethereum.js"]
experimental.onMessageReceived: {
console.log("[onMessageReceived]: ", message.data)
// TODO move to messaging.js
diff --git a/ethereal/flags.go b/ethereal/flags.go
index 2c9b3af5f..d5ca9f336 100644
--- a/ethereal/flags.go
+++ b/ethereal/flags.go
@@ -52,8 +52,8 @@ func defaultAssetPath() string {
assetPath = filepath.Join(exedir, "../Resources")
case "linux":
assetPath = "/usr/share/ethereal"
- case "window":
- fallthrough
+ case "windows":
+ assetPath = "./assets"
default:
assetPath = "."
}
diff --git a/ethereal/qml_container.go b/ethereal/qml_container.go
index a8ce1cb75..cb43a99bd 100644
--- a/ethereal/qml_container.go
+++ b/ethereal/qml_container.go
@@ -5,6 +5,7 @@ import (
"github.com/ethereum/eth-go/ethpub"
"github.com/ethereum/eth-go/ethutil"
"github.com/go-qml/qml"
+ "runtime"
)
type QmlApplication struct {
@@ -20,7 +21,14 @@ func NewQmlApplication(path string, lib *UiLib) *QmlApplication {
}
func (app *QmlApplication) Create() error {
- component, err := app.engine.LoadFile(app.path)
+ path := string(app.path)
+
+ // For some reason for windows we get /c:/path/to/something, windows doesn't like the first slash but is fine with the others so we are removing it
+ if string(app.path[0]) == "/" && runtime.GOOS == "windows" {
+ path = app.path[1:]
+ }
+
+ component, err := app.engine.LoadFile(path)
if err != nil {
logger.Warnln(err)
}