mirror of https://github.com/procxx/kepka.git
Fixed crash in tray icon toggle in new Settings in macOS / Linux.
This commit is contained in:
parent
c5f4655b9e
commit
be02ef563c
|
@ -286,7 +286,7 @@ void GeneralWidget::onUpdateAutomatically() {
|
||||||
#endif // TDESKTOP_DISABLE_AUTOUPDATE
|
#endif // TDESKTOP_DISABLE_AUTOUPDATE
|
||||||
|
|
||||||
void GeneralWidget::onEnableTrayIcon() {
|
void GeneralWidget::onEnableTrayIcon() {
|
||||||
if ((!_enableTrayIcon->checked() || cPlatform() != dbipWindows) && !_enableTaskbarIcon->checked()) {
|
if ((!_enableTrayIcon->checked() || cPlatform() != dbipWindows) && _enableTaskbarIcon && !_enableTaskbarIcon->checked()) {
|
||||||
_enableTaskbarIcon->setChecked(true);
|
_enableTaskbarIcon->setChecked(true);
|
||||||
} else {
|
} else {
|
||||||
updateWorkmode();
|
updateWorkmode();
|
||||||
|
@ -302,7 +302,7 @@ void GeneralWidget::onEnableTaskbarIcon() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void GeneralWidget::updateWorkmode() {
|
void GeneralWidget::updateWorkmode() {
|
||||||
DBIWorkMode newMode = (_enableTrayIcon->checked() && _enableTaskbarIcon->checked()) ? dbiwmWindowAndTray : (_enableTrayIcon->checked() ? dbiwmTrayOnly : dbiwmWindowOnly);
|
DBIWorkMode newMode = (_enableTrayIcon->checked() && (!_enableTaskbarIcon || _enableTaskbarIcon->checked())) ? dbiwmWindowAndTray : (_enableTrayIcon->checked() ? dbiwmTrayOnly : dbiwmWindowOnly);
|
||||||
if (cWorkMode() != newMode && (newMode == dbiwmWindowAndTray || newMode == dbiwmTrayOnly)) {
|
if (cWorkMode() != newMode && (newMode == dbiwmWindowAndTray || newMode == dbiwmTrayOnly)) {
|
||||||
cSetSeenTrayTooltip(false);
|
cSetSeenTrayTooltip(false);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue