void PsMainWindow::psUpdateWorkmode() { if (!cSupportTray()) return; if (cWorkMode() == dbiwmWindowOnly) { if (noQtTrayIcon) { if (useAppIndicator) { ps_app_indicator_set_status(_trayIndicator, APP_INDICATOR_STATUS_PASSIVE); } else if (useStatusIcon) { ps_gtk_status_icon_set_visible(_trayIcon, false); } } else { if (trayIcon) { trayIcon->setContextMenu(0); trayIcon->deleteLater(); } trayIcon = 0; } } else { if (noQtTrayIcon) { if (useAppIndicator) { ps_app_indicator_set_status(_trayIndicator, APP_INDICATOR_STATUS_ACTIVE); } else if (useStatusIcon) { ps_gtk_status_icon_set_visible(_trayIcon, true); } } else { psSetupTrayIcon(); } } }
void PsMainWindow::psUpdateWorkmode() { psSetupTrayIcon(); if (cWorkMode() == dbiwmWindowOnly) { if (trayIcon) { trayIcon->setContextMenu(0); delete trayIcon; } trayIcon = 0; } psUpdateDelegate(); setWindowIcon(wndIcon); }