From 42188ca77e3a4dc165863ffc29391034729eeb98 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Mon, 23 Nov 2020 20:11:31 +0100 Subject: [feat] use the branded appname if available --- gui/qml/main.qml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'gui') 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"); } -- cgit v1.2.3