summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-12-24 10:08:47 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-12-24 11:00:04 (GMT)
commit3e2a3a4cdb0b6bc0cf79423c48400c544830177a (patch)
treedcc53224fd0b0ed0bd704a4b097f5c425dbd672e /Swift/QtUI/QtLoginWindow.cpp
parentf69d027b7e3b4260e514a77f7195ec511977b63e (diff)
downloadswift-contrib-3e2a3a4cdb0b6bc0cf79423c48400c544830177a.zip
swift-contrib-3e2a3a4cdb0b6bc0cf79423c48400c544830177a.tar.bz2
Enable "Show notifications" toggle when Growl isn't installed.
Diffstat (limited to 'Swift/QtUI/QtLoginWindow.cpp')
-rw-r--r--Swift/QtUI/QtLoginWindow.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/Swift/QtUI/QtLoginWindow.cpp b/Swift/QtUI/QtLoginWindow.cpp
index 5a8b9ab..43abd91 100644
--- a/Swift/QtUI/QtLoginWindow.cpp
+++ b/Swift/QtUI/QtLoginWindow.cpp
@@ -185,9 +185,6 @@ QtLoginWindow::QtLoginWindow(UIEventStream* uiEventStream, bool eagleMode) : QMa
toggleNotificationsAction_->setCheckable(true);
toggleNotificationsAction_->setChecked(true);
connect(toggleNotificationsAction_, SIGNAL(toggled(bool)), SLOT(handleToggleNotifications(bool)));
-#if defined(SWIFTEN_PLATFORM_LINUX) || defined(SWIFTEN_PLATFORM_WINDOWS)
- generalMenu_->addAction(toggleNotificationsAction_);
-#endif
#ifndef SWIFTEN_PLATFORM_MACOSX
swiftMenu_->addSeparator();
@@ -216,6 +213,15 @@ QtLoginWindow::QtLoginWindow(UIEventStream* uiEventStream, bool eagleMode) : QMa
this->show();
}
+void QtLoginWindow::setShowNotificationToggle(bool toggle) {
+ if (toggle) {
+ generalMenu_->addAction(toggleNotificationsAction_);
+ }
+ else {
+ generalMenu_->removeAction(toggleNotificationsAction_);
+ }
+}
+
bool QtLoginWindow::eventFilter(QObject *obj, QEvent *event) {
if (obj == username_->view() && event->type() == QEvent::KeyPress) {
QKeyEvent *keyEvent = static_cast<QKeyEvent*>(event);