diff --git a/gui/main.cpp b/gui/main.cpp index 76368106c20904f379c6205a247c1baa825664a4..1efa332dfb5cd2f806a5805b82d3cca115f6fe3b 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"))); diff --git a/gui/qml/main.qml b/gui/qml/main.qml index 91e3b4ea41e0e232ac91a3793c0b57eecee9060e..e0a9a8171e679a6602cd6770330a35ba8c41462e 100644 --- a/gui/qml/main.qml +++ b/gui/qml/main.qml @@ -276,9 +276,10 @@ ApplicationWindow { loginDone = false allowEmptyPass = Logic.shouldAllowEmptyPass(providers) needsRestart = false; - /* TODO get appVisible flag from backend */ - //app.visible = true - //app.raise() + if (!systrayAvailable) { + app.visible = true + app.raise() + } }