From 8f9072747d3b68d61e5d66367cfa131fab95c7a6 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Wed, 18 Oct 2006 20:48:41 +0000 Subject: [PATCH] - Added some checks for systray messages because these are not supported by Mac OS X yet --- src/options_imp.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/options_imp.cpp b/src/options_imp.cpp index 1b37ba8ae..37e991a6a 100644 --- a/src/options_imp.cpp +++ b/src/options_imp.cpp @@ -23,6 +23,7 @@ #include #include #include +#include #include "options_imp.h" #include "misc.h" @@ -145,6 +146,11 @@ options_imp::options_imp(QWidget *parent):QDialog(parent){ connect(neverOSD, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton())); // Disable apply Button applyButton->setEnabled(false); + if(!QSystemTrayIcon::supportsMessages()){ + // Mac OS X doesn't support it yet + neverOSD->setChecked(true); + groupOSD->setEnabled(false); + } } // save options to options.xml file @@ -535,11 +541,19 @@ QPair options_imp::getLimits() const{ // Should the program use OSD? bool options_imp::getUseOSDAlways() const{ + if(!QSystemTrayIcon::supportsMessages()){ + // Mac OS X doesn't support it yet + return false; + } return alwaysOSD->isChecked(); } // Should the program use OSD when the window is hidden only? bool options_imp::getUseOSDWhenHiddenOnly() const{ + if(!QSystemTrayIcon::supportsMessages()){ + // Mac OS X doesn't support it yet + return false; + } return someOSD->isChecked(); }