Merge branch 'develop'

pull/109/merge
obscuren 11 years ago
commit fc8bd7229e
  1. 12
      ethereal/assets/qml/wallet.qml
  2. 2
      ethereal/assets/qml/webapp.qml
  3. 4
      ethereal/flags.go
  4. 10
      ethereal/qml_container.go

@ -100,7 +100,7 @@ ApplicationWindow {
anchors.right: parent.right anchors.right: parent.right
height: 200 height: 200
Image { Image {
source: ui.assetPath("tx.png") source: "../tx.png"
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
@ -110,7 +110,7 @@ ApplicationWindow {
} }
} }
Image { Image {
source: ui.assetPath("new.png") source: "../new.png"
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
@ -120,7 +120,7 @@ ApplicationWindow {
} }
} }
Image { Image {
source: ui.assetPath("net.png") source: "../net.png"
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
@ -131,7 +131,7 @@ ApplicationWindow {
} }
Image { Image {
source: ui.assetPath("heart.png") source: "../heart.png"
anchors.horizontalCenter: parent.horizontalCenter anchors.horizontalCenter: parent.horizontalCenter
MouseArea { MouseArea {
anchors.fill: parent anchors.fill: parent
@ -436,7 +436,7 @@ ApplicationWindow {
onDoubleClicked: peerWindow.visible = true onDoubleClicked: peerWindow.visible = true
anchors.fill: parent anchors.fill: parent
} }
source: ui.assetPath("network.png") source: "../network.png"
} }
} }
@ -624,7 +624,7 @@ ApplicationWindow {
width: 150 width: 150
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
smooth: true smooth: true
source: ui.assetPath("facet.png") source: "../facet.png"
x: 10 x: 10
y: 10 y: 10
} }

@ -38,7 +38,7 @@ ApplicationWindow {
experimental.preferences.javascriptEnabled: true experimental.preferences.javascriptEnabled: true
experimental.preferences.navigatorQtObjectEnabled: true experimental.preferences.navigatorQtObjectEnabled: true
experimental.preferences.developerExtrasEnabled: 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: { experimental.onMessageReceived: {
console.log("[onMessageReceived]: ", message.data) console.log("[onMessageReceived]: ", message.data)
// TODO move to messaging.js // TODO move to messaging.js

@ -52,8 +52,8 @@ func defaultAssetPath() string {
assetPath = filepath.Join(exedir, "../Resources") assetPath = filepath.Join(exedir, "../Resources")
case "linux": case "linux":
assetPath = "/usr/share/ethereal" assetPath = "/usr/share/ethereal"
case "window": case "windows":
fallthrough assetPath = "./assets"
default: default:
assetPath = "." assetPath = "."
} }

@ -5,6 +5,7 @@ import (
"github.com/ethereum/eth-go/ethpub" "github.com/ethereum/eth-go/ethpub"
"github.com/ethereum/eth-go/ethutil" "github.com/ethereum/eth-go/ethutil"
"github.com/go-qml/qml" "github.com/go-qml/qml"
"runtime"
) )
type QmlApplication struct { type QmlApplication struct {
@ -20,7 +21,14 @@ func NewQmlApplication(path string, lib *UiLib) *QmlApplication {
} }
func (app *QmlApplication) Create() error { 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 { if err != nil {
logger.Warnln(err) logger.Warnln(err)
} }

Loading…
Cancel
Save