Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b4db987217 | ||
|
|
9f46e710a9 |
@@ -296,6 +296,7 @@ setInterval(() => {
|
|||||||
"Move discord-screenaudio to the system tray instead of closing",
|
"Move discord-screenaudio to the system tray instead of closing",
|
||||||
window.discordScreenaudioTrayEnabled,
|
window.discordScreenaudioTrayEnabled,
|
||||||
(enabled) => {
|
(enabled) => {
|
||||||
|
window.discordScreenaudioTrayEnabled = enabled;
|
||||||
console.log(`!discord-screenaudio-tray-${enabled}`);
|
console.log(`!discord-screenaudio-tray-${enabled}`);
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -125,6 +125,8 @@ void MainWindow::setupTrayIcon() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::cleanTrayIcon() {
|
void MainWindow::cleanTrayIcon() {
|
||||||
|
if (m_trayIcon == nullptr)
|
||||||
|
return;
|
||||||
m_trayIcon->hide();
|
m_trayIcon->hide();
|
||||||
m_trayIconMenu->deleteLater();
|
m_trayIconMenu->deleteLater();
|
||||||
m_trayIcon->deleteLater();
|
m_trayIcon->deleteLater();
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ private:
|
|||||||
QWebEngineProfile *prepareProfile();
|
QWebEngineProfile *prepareProfile();
|
||||||
DiscordPage *m_discordPage;
|
DiscordPage *m_discordPage;
|
||||||
void closeEvent(QCloseEvent *event) override;
|
void closeEvent(QCloseEvent *event) override;
|
||||||
QSystemTrayIcon *m_trayIcon;
|
QSystemTrayIcon *m_trayIcon = nullptr;
|
||||||
QMenu *m_trayIconMenu;
|
QMenu *m_trayIconMenu;
|
||||||
QSettings *m_settings;
|
QSettings *m_settings;
|
||||||
bool m_wasMaximized;
|
bool m_wasMaximized;
|
||||||
|
|||||||
Reference in New Issue
Block a user