Disable systray icon on Mac

This commit is contained in:
Christophe Dumez
2010-06-09 15:48:20 +00:00
parent 25998d69a7
commit 1a2cb6aee7
3 changed files with 44 additions and 11 deletions

View File

@@ -151,7 +151,12 @@ options_imp::options_imp(QWidget *parent):QDialog(parent){
// Load options
loadOptions();
// Disable systray integration if it is not supported by the system
#ifdef Q_WS_MAC
if(1){
#else
if(!QSystemTrayIcon::isSystemTrayAvailable()){
#endif
checkNoSystray->setChecked(true);
checkNoSystray->setEnabled(false);
}
// Connect signals / slots
@@ -277,7 +282,11 @@ options_imp::options_imp(QWidget *parent):QDialog(parent){
connect(textWebUiPassword, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton()));
// Disable apply Button
applyButton->setEnabled(false);
#ifdef Q_WS_MAC
if(1) {
#else
if(!QSystemTrayIcon::supportsMessages()){
#endif
// Mac OS X doesn't support it yet
checkSystrayBalloons->setChecked(false);
checkSystrayBalloons->setEnabled(false);
@@ -1023,6 +1032,9 @@ bool options_imp::startMinimized() const {
}
bool options_imp::systrayIntegration() const{
#ifdef Q_WS_MAC
return false;
#endif
if (!QSystemTrayIcon::isSystemTrayAvailable()) return false;
return (!checkNoSystray->isChecked());
}