summaryrefslogtreecommitdiff
path: root/gui/main.cpp
diff options
context:
space:
mode:
authorkali kaneko (leap communications) <kali@leap.se>2021-06-22 13:05:44 +0200
committerkali kaneko (leap communications) <kali@leap.se>2021-06-22 18:04:45 +0200
commit326dc2449a69c9ea97cb5c2936807e9045dc1aa7 (patch)
treeadfaa1ab91feb92e04d52c57a7539888df2c8a2f /gui/main.cpp
parentcb8b0bda57378ba77b5e3c5d4b7f0754af7a8658 (diff)
[feat] show controls window if no available systray
Diffstat (limited to 'gui/main.cpp')
-rw-r--r--gui/main.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/gui/main.cpp b/gui/main.cpp
index 7636810..1efa332 100644
--- a/gui/main.cpp
+++ b/gui/main.cpp
@@ -117,6 +117,7 @@ int main(int argc, char **argv) {
parser.process(app);
bool hideSystray = parser.isSet("no-systray");
+ bool availableSystray = true;
bool installHelpers = parser.isSet("install-helpers");
bool webAPI = parser.isSet("web-api");
QString webPort = parser.value("web-port");
@@ -146,7 +147,8 @@ int main(int argc, char **argv) {
}
if (!QSystemTrayIcon::isSystemTrayAvailable()) {
- qDebug() << "No systray icon available. Things might not work for now, sorry...";
+ qDebug() << "No systray icon available.";
+ availableSystray = false;
}
QTranslator translator;
@@ -174,6 +176,7 @@ int main(int argc, char **argv) {
/* set some useful flags */
ctx->setContextProperty("systrayVisible", !hideSystray);
+ ctx->setContextProperty("systrayAvailable", availableSystray);
engine.load(QUrl(QStringLiteral("qrc:/qml/main.qml")));