Skip to content
Snippets Groups Projects
Unverified Commit 326dc244 authored by Kali Kaneko's avatar Kali Kaneko
Browse files

[feat] show controls window if no available systray

parent cb8b0bda
No related branches found
No related tags found
No related merge requests found
...@@ -117,6 +117,7 @@ int main(int argc, char **argv) { ...@@ -117,6 +117,7 @@ int main(int argc, char **argv) {
parser.process(app); parser.process(app);
bool hideSystray = parser.isSet("no-systray"); bool hideSystray = parser.isSet("no-systray");
bool availableSystray = true;
bool installHelpers = parser.isSet("install-helpers"); bool installHelpers = parser.isSet("install-helpers");
bool webAPI = parser.isSet("web-api"); bool webAPI = parser.isSet("web-api");
QString webPort = parser.value("web-port"); QString webPort = parser.value("web-port");
...@@ -146,7 +147,8 @@ int main(int argc, char **argv) { ...@@ -146,7 +147,8 @@ int main(int argc, char **argv) {
} }
if (!QSystemTrayIcon::isSystemTrayAvailable()) { if (!QSystemTrayIcon::isSystemTrayAvailable()) {
qDebug() << "No systray icon available. Things might not work for now, sorry..."; qDebug() << "No systray icon available.";
availableSystray = false;
} }
QTranslator translator; QTranslator translator;
...@@ -174,6 +176,7 @@ int main(int argc, char **argv) { ...@@ -174,6 +176,7 @@ int main(int argc, char **argv) {
/* set some useful flags */ /* set some useful flags */
ctx->setContextProperty("systrayVisible", !hideSystray); ctx->setContextProperty("systrayVisible", !hideSystray);
ctx->setContextProperty("systrayAvailable", availableSystray);
engine.load(QUrl(QStringLiteral("qrc:/qml/main.qml"))); engine.load(QUrl(QStringLiteral("qrc:/qml/main.qml")));
......
...@@ -276,9 +276,10 @@ ApplicationWindow { ...@@ -276,9 +276,10 @@ ApplicationWindow {
loginDone = false loginDone = false
allowEmptyPass = Logic.shouldAllowEmptyPass(providers) allowEmptyPass = Logic.shouldAllowEmptyPass(providers)
needsRestart = false; needsRestart = false;
/* TODO get appVisible flag from backend */ if (!systrayAvailable) {
//app.visible = true app.visible = true
//app.raise() app.raise()
}
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment