From e98c30f633053a7a8ac125d7ccf83b08a25f3805 Mon Sep 17 00:00:00 2001 From: Felix Geyer Date: Sat, 10 Oct 2015 17:08:56 +0200 Subject: [PATCH] Disable systray on OS X. It's not useful on that platform. Refs #326 --- src/gui/MainWindow.cpp | 5 +++++ src/gui/SettingsWidget.cpp | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/gui/MainWindow.cpp b/src/gui/MainWindow.cpp index 94cdf2124..9a06ac893 100644 --- a/src/gui/MainWindow.cpp +++ b/src/gui/MainWindow.cpp @@ -599,6 +599,11 @@ void MainWindow::lockDatabasesAfterInactivity() bool MainWindow::isTrayIconEnabled() const { +#ifdef Q_OS_MAC + // systray not useful on OS X + return false; +#else return config()->get("GUI/ShowTrayIcon").toBool() && QSystemTrayIcon::isSystemTrayAvailable(); +#endif } diff --git a/src/gui/SettingsWidget.cpp b/src/gui/SettingsWidget.cpp index e774ed21a..8b536a53d 100644 --- a/src/gui/SettingsWidget.cpp +++ b/src/gui/SettingsWidget.cpp @@ -41,6 +41,11 @@ SettingsWidget::SettingsWidget(QWidget* parent) m_generalUi->autoTypeShortcutWidget->setVisible(autoType()->isAvailable()); m_generalUi->autoTypeShortcutLabel->setVisible(autoType()->isAvailable()); +#ifdef Q_OS_MAC + // systray not useful on OS X + m_generalUi->systrayShowCheckBox->setVisible(false); + m_generalUi->systrayMinimizeToTrayCheckBox->setVisible(false); +#endif connect(this, SIGNAL(accepted()), SLOT(saveSettings())); connect(this, SIGNAL(rejected()), SLOT(reject()));