Restores mimized to tray if it was closed as such and adds an option to
force starting mimized to tray (if a tray is available). Fixed #1133
cliParser->addOption("qss <file.qss>", 0, "Load a custom application stylesheet");
cliParser->addSwitch("debugbufferswitches", 0, "Enables debugging for bufferswitches");
cliParser->addSwitch("debugmodel", 0, "Enables debugging for models");
cliParser->addOption("qss <file.qss>", 0, "Load a custom application stylesheet");
cliParser->addSwitch("debugbufferswitches", 0, "Enables debugging for bufferswitches");
cliParser->addSwitch("debugmodel", 0, "Enables debugging for models");
+ cliParser->addSwitch("hidewindow", 0, "Start the client minimized to the system tray");
#endif
#ifndef BUILD_QTUI
// put core-only arguments here
#endif
#ifndef BUILD_QTUI
// put core-only arguments here
- if (s.value("MainWinHidden").toBool() && QtUi::haveSystemTray())
+ if ((Quassel::isOptionSet("hidewindow")
+ || s.value("MainWinHidden").toBool())
+ && _systemTray->isSystemTrayAvailable())
QtUi::hideMainWidget();
else if (s.value("MainWinMinimized").toBool())
showMinimized();
QtUi::hideMainWidget();
else if (s.value("MainWinMinimized").toBool())
showMinimized();