summaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2020-10-09 21:58:15 +0200
committerRuben Pollan <meskio@sindominio.net>2020-10-13 19:08:55 +0200
commitf8c05f3dee29c7ab1eb3eba82c917fe18333fc41 (patch)
tree4dc17ad736d670652c8f6f9437afd9a71f4cdada /gui
parent73d0c7a96df2212d5a3ee6289fc286f3e6459028 (diff)
[pkg] add vendor icon to app
Diffstat (limited to 'gui')
-rwxr-xr-xgui/build.sh9
-rw-r--r--gui/main.cpp3
-rw-r--r--gui/providers/providers.json4
-rw-r--r--gui/qml/AboutDialog.qml1
-rw-r--r--gui/qml/main.qml10
5 files changed, 20 insertions, 7 deletions
diff --git a/gui/build.sh b/gui/build.sh
index 8b336fa..deb73a1 100755
--- a/gui/build.sh
+++ b/gui/build.sh
@@ -1,6 +1,9 @@
#!/bin/bash
set -e
-set -x
+
+# DEBUG --------------
+# set -x
+# --------------------
XBUILD=${XBUILD-no}
OSX_TARGET=10.11
@@ -13,6 +16,7 @@ SOURCE_GOLIB=gui/backend.go
QTBUILD=build/qt
RELEASE=$QTBUILD/release
+VENDOR_PATH=${VENDOR_PATH-providers/riseup}
PLATFORM=$(uname -s)
LDFLAGS=""
@@ -72,8 +76,9 @@ function buildGoLib {
function buildQmake {
echo "[+] Now building Qml app with Qt qmake"
echo "[+] Using qmake in:" $QMAKE
+ echo "[+] VENDOR_PATH:" $VENDOR_PATH
mkdir -p $QTBUILD
- $QMAKE -o $QTBUILD/Makefile "CONFIG-=debug CONFIG+=release" $PROJECT
+ $QMAKE -o $QTBUILD/Makefile "CONFIG-=debug CONFIG+=release VENDOR_PATH=${VENDOR_PATH}" $PROJECT
}
function renameOutput {
diff --git a/gui/main.cpp b/gui/main.cpp
index 684b0be..893cb4d 100644
--- a/gui/main.cpp
+++ b/gui/main.cpp
@@ -152,6 +152,9 @@ int main(int argc, char **argv) {
QTranslator translator;
translator.load(QLocale(), QLatin1String("main"), QLatin1String("_"), QLatin1String(":/i18n"));
app.installTranslator(&translator);
+ /* set window icon */
+ app.setWindowIcon(QIcon(":/vendor/icon.svg"));
+
QQmlApplicationEngine engine;
QQmlContext *ctx = engine.rootContext();
diff --git a/gui/providers/providers.json b/gui/providers/providers.json
index 5c9b08b..6f82ba3 100644
--- a/gui/providers/providers.json
+++ b/gui/providers/providers.json
@@ -15,7 +15,7 @@
"apiURL": "https://api.black.riseup.net/",
"geolocationAPI": "https://api.black.riseup.net:9001/json",
"caCertString": "-----BEGIN CERTIFICATE-----\nMIIFjTCCA3WgAwIBAgIBATANBgkqhkiG9w0BAQ0FADBZMRgwFgYDVQQKDA9SaXNl\ndXAgTmV0d29ya3MxGzAZBgNVBAsMEmh0dHBzOi8vcmlzZXVwLm5ldDEgMB4GA1UE\nAwwXUmlzZXVwIE5ldHdvcmtzIFJvb3QgQ0EwHhcNMTQwNDI4MDAwMDAwWhcNMjQw\nNDI4MDAwMDAwWjBZMRgwFgYDVQQKDA9SaXNldXAgTmV0d29ya3MxGzAZBgNVBAsM\nEmh0dHBzOi8vcmlzZXVwLm5ldDEgMB4GA1UEAwwXUmlzZXVwIE5ldHdvcmtzIFJv\nb3QgQ0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC76J4ciMJ8Sg0m\nTP7DF2DT9zNe0Csk4myoMFC57rfJeqsAlJCv1XMzBmXrw8wq/9z7XHv6n/0sWU7a\n7cF2hLR33ktjwODlx7vorU39/lXLndo492ZBhXQtG1INMShyv+nlmzO6GT7ESfNE\nLliFitEzwIegpMqxCIHXFuobGSCWF4N0qLHkq/SYUMoOJ96O3hmPSl1kFDRMtWXY\niw1SEKjUvpyDJpVs3NGxeLCaA7bAWhDY5s5Yb2fA1o8ICAqhowurowJpW7n5ZuLK\n5VNTlNy6nZpkjt1QycYvNycffyPOFm/Q/RKDlvnorJIrihPkyniV3YY5cGgP+Qkx\nHUOT0uLA6LHtzfiyaOqkXwc4b0ZcQD5Vbf6Prd20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RlWKSdP4haujnzCoJbM7dU9bjvlGZNyXEekgeT0W2qFeGGp+yyUWw8tNsp\n0BuC1b7uW/bBn/xKm319wXVDvBgZgcktMolak39V7DVO\n-----END CERTIFICATE-----",
- "timeStamp": "2020-10-08 18:10:13"
+ "timeStamp": "2020-10-09 22:41:19"
}
]
-}
+} \ No newline at end of file
diff --git a/gui/qml/AboutDialog.qml b/gui/qml/AboutDialog.qml
index a101ea3..bd3d77e 100644
--- a/gui/qml/AboutDialog.qml
+++ b/gui/qml/AboutDialog.qml
@@ -5,6 +5,7 @@ MessageDialog {
title: qsTr("About")
text: getText()
informativeText: getVersion()
+ icon: StandardIcon.Information
function getText() {
var _name = ctx ? ctx.appName : "vpn"
diff --git a/gui/qml/main.qml b/gui/qml/main.qml
index ce72fff..dcffcde 100644
--- a/gui/qml/main.qml
+++ b/gui/qml/main.qml
@@ -42,6 +42,9 @@ ApplicationWindow {
showInitFailure()
}
}
+ if (ctx.donateURL) {
+ donateItem.visible = true
+ }
}
}
@@ -98,8 +101,8 @@ ApplicationWindow {
allowEmptyPass = shouldAllowEmptyPass()
app.visible = true;
- show();
- hide();
+ //show();
+ //hide();
}
function toHuman(st) {
@@ -251,8 +254,9 @@ ApplicationWindow {
}
MenuItem {
+ id: donateItem
text: qsTr("Donate...")
- visible: ctx && ctx.donateURL
+ visible: ctx ? ctx.donateURL : false
onTriggered: { donate.visible = true }
}