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(); }