diff --git a/main.go b/main.go
index a7c5b87d..64908f15 100644
--- a/main.go
+++ b/main.go
@@ -16,7 +16,6 @@ import (
"github.com/therecipe/qt/network"
"github.com/therecipe/qt/qml"
"github.com/therecipe/qt/quickcontrols2"
- "github.com/therecipe/qt/widgets"
"os"
"os/user"
"path"
@@ -126,13 +125,12 @@ func mainService() {
func mainUi(flagLocal bool, flagClientUI bool) {
log.Infof("I am the UI (client:%v)\n", flagClientUI)
- //app := gui.NewQGuiApplication(len(os.Args), os.Args)
- app := widgets.NewQApplication(len(os.Args), os.Args)
+ app := gui.NewQGuiApplication(len(os.Args), os.Args)
// our globals
gcd := ui.NewGrandCentralDispatcher(nil)
gcd.SetOs(runtime.GOOS)
ex, err := os.Executable()
- if err != nil { log.Infof("error getting path: %v", err) }
+ if err != nil { log.Errorf("error getting path: %v", err) }
dir := path.Dir(ex)
if runtime.GOOS == "android" {
gcd.SetAssetPath("assets:/")
@@ -159,7 +157,7 @@ func mainUi(flagLocal bool, flagClientUI bool) {
qmlSource = core.NewQUrl3("qrc:/qml/main.qml", 0)
}
- //app.SetWindowIcon(widgets.NewQ NewQIcon5(":/qml/images/cwtch-icon.png"))
+ app.SetWindowIcon(gui.NewQIcon5(":/qml/images/cwtch-icon.png"))
// load english first so it becomes the default in case we don't have a .ts for the user's locale, or if it contains unfinished strings
translator := core.NewQTranslator(nil)
@@ -183,8 +181,7 @@ func mainUi(flagLocal bool, flagClientUI bool) {
proxy := network.NewQNetworkProxy()
proxy.SetHostName("0.0.0.0")
nam.SetProxy(proxy)
- log.Infof("schemes: %v", nam.SupportedSchemes())
- return nam//.QNetworkAccessManager_PTR()*/
+ return nam
})
engine.SetNetworkAccessManagerFactory(factory)
diff --git a/qml/main.qml b/qml/main.qml
index 756786b5..db1b01dc 100644
--- a/qml/main.qml
+++ b/qml/main.qml
@@ -38,7 +38,6 @@ ApplicationWindow {
}
function parse(text, size, isntEditable) { // REPLACE EMOJI WITH TAGS
- //T.twemoji.base = "file://"+gcd.binaryPath+"/assets/twemoji/"
T.twemoji.base = gcd.assetPath + "twemoji/"
T.twemoji.ext = ".png"
T.twemoji.size = "72x72"
@@ -47,7 +46,7 @@ ApplicationWindow {
retText = retText.replace(/\n/g,"
")
// mutant standard stickers
- if (isntEditable) retText = Mutant.standard.parse(retText)
+ if (isntEditable) retText = Mutant.standard.parse(retText)
return retText
}