summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2020-11-23 20:11:31 +0100
committerkali kaneko (leap communications) <kali@leap.se>2020-11-23 20:11:31 +0100
commit42188ca77e3a4dc165863ffc29391034729eeb98 (patch)
treea0c809bd3b1b3547f742b2fd903340049be764b4
parent34553ffec72c769b400ba7047964f5953cac331a (diff)
[feat] use the branded appname if available
-rw-r--r--gui/qml/main.qml18
1 files changed, 10 insertions, 8 deletions
diff --git a/gui/qml/main.qml b/gui/qml/main.qml
index 028b373..9ce5800 100644
--- a/gui/qml/main.qml
+++ b/gui/qml/main.qml
@@ -136,29 +136,29 @@ ApplicationWindow {
// left and right click seem to be working fine, so let's ignore this for now.
switch (reason) {
case SystemTrayIcon.Unknown:
- console.debug("reason: unknown")
+ console.debug("activated: unknown event")
menu.open()
- break
+ break
case SystemTrayIcon.Context:
console.debug("activated: context")
if (Qt.platform.os !== "linux") {
menu.open()
}
- break
+ break
case SystemTrayIcon.DoubleClick:
console.debug("activated: double click")
if (Qt.platform.os !== "linux") {
menu.open()
}
- break
+ break
case SystemTrayIcon.Trigger:
console.debug("activated: left click")
if (Qt.platform.os !== "linux") {
menu.open()
}
- break
+ break
case SystemTrayIcon.MiddleClick:
- break
+ break
}
}
@@ -168,8 +168,9 @@ ApplicationWindow {
console.debug("systray init completed")
hide();
if (systrayVisible) {
+ let appname: ctx ? ctx.appName: "VPN"
show();
- showNotification("Is up and running. Please use system tray icon to control it.");
+ showNotification(appname + " is up and running. Please use system tray icon to control it.");
}
}
@@ -177,7 +178,8 @@ ApplicationWindow {
function showNotification(msg) {
console.log("Going to show notification message: ", msg);
if (supportsMessages) {
- showMessage("Riseup VPN", msg, null, 15000);
+ let appname: ctx ? ctx.appName: "VPN"
+ showMessage(appname, msg, null, 15000);
} else {
console.log("System doesn't support systray notifications");
}