void GeneralWidget::updateWorkmode() { auto newMode = (_enableTrayIcon->checked() && (!_enableTaskbarIcon || _enableTaskbarIcon->checked())) ? dbiwmWindowAndTray : (_enableTrayIcon->checked() ? dbiwmTrayOnly : dbiwmWindowOnly); if (Global::WorkMode().value() != newMode && (newMode == dbiwmWindowAndTray || newMode == dbiwmTrayOnly)) { cSetSeenTrayTooltip(false); } Global::RefWorkMode().set(newMode); Local::writeSettings(); }
void GeneralWidget::updateWorkmode() { DBIWorkMode newMode = (_enableTrayIcon->checked() && (!_enableTaskbarIcon || _enableTaskbarIcon->checked())) ? dbiwmWindowAndTray : (_enableTrayIcon->checked() ? dbiwmTrayOnly : dbiwmWindowOnly); if (cWorkMode() != newMode && (newMode == dbiwmWindowAndTray || newMode == dbiwmTrayOnly)) { cSetSeenTrayTooltip(false); } cSetWorkMode(newMode); App::wnd()->psUpdateWorkmode(); Local::writeSettings(); }
void SettingsInner::onWorkmodeWindow() { if (!_workmodeTray.checked() && !_workmodeWindow.checked()) { _workmodeTray.setChecked(true); } DBIWorkMode newMode = (_workmodeTray.checked() && _workmodeWindow.checked()) ? dbiwmWindowAndTray : (_workmodeTray.checked() ? dbiwmTrayOnly : dbiwmWindowOnly); if (cWorkMode() != newMode && (newMode == dbiwmWindowAndTray || newMode == dbiwmTrayOnly)) { cSetSeenTrayTooltip(false); } cSetWorkMode(newMode); App::wnd()->psUpdateWorkmode(); App::writeConfig(); }
bool Window::minimizeToTray() { if (App::quiting() || !trayIcon) return false; hide(); if (!cSeenTrayTooltip()) { trayIcon->showMessage(QString::fromStdWString(AppName), lang(lng_tray_icon_text), QSystemTrayIcon::Information, 10000); cSetSeenTrayTooltip(true); App::writeConfig(); } if (App::main()) App::main()->setOnline(windowState()); return true; }
bool Window::minimizeToTray() { if (App::quiting() || !psHasTrayIcon()) return false; hide(); if (cPlatform() == dbipWindows && trayIcon && !cSeenTrayTooltip()) { trayIcon->showMessage(QString::fromStdWString(AppName), lang(lng_tray_icon_text), QSystemTrayIcon::Information, 10000); cSetSeenTrayTooltip(true); Local::writeSettings(); } updateIsActive(cOfflineBlurTimeout()); updateTrayMenu(); updateGlobalMenu(); return true; }