| 822 | } |
| 823 | |
| 824 | void LightscreenWindow::applySettings() |
| 825 | { |
| 826 | bool tray = settings()->value("options/tray", true).toBool(); |
| 827 | |
| 828 | if (tray && !mTrayIcon) { |
| 829 | createTrayIcon(); |
| 830 | mTrayIcon->setVisible(true); |
| 831 | } else if (!tray && mTrayIcon) { |
| 832 | mTrayIcon->setVisible(false); |
| 833 | } |
| 834 | |
| 835 | connectHotkeys(); |
| 836 | |
| 837 | mDoCache = false; |
| 838 | |
| 839 | if (settings()->value("lastScreenshot").isValid() && mLastScreenshot.isEmpty()) { |
| 840 | mLastScreenshot = settings()->value("lastScreenshot").toString(); |
| 841 | } |
| 842 | |
| 843 | os::setStartup(settings()->value("options/startup").toBool(), settings()->value("options/startupHide").toBool()); |
| 844 | } |
| 845 | |
| 846 | void LightscreenWindow::connectHotkeys() |
| 847 | { |