Unverified Commit 326dc244 authored by Kali Kaneko's avatar Kali Kaneko
Browse files

[feat] show controls window if no available systray

parent cb8b0bda
......@@ -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")));
......
......@@ -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()
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment