summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2012-02-21 19:37:42 (GMT)
committerKevin Smith <git@kismith.co.uk>2012-02-21 19:37:42 (GMT)
commit6f06e137304793cc0db1d85cabe8a6edaac0ca67 (patch)
tree1dfe9020078d4924a6d3f7a058f982e2f6a50540 /Swift/QtUI
parent6a26cf436f81495242481ae7a27287e48ebc532a (diff)
downloadswift-contrib-6f06e137304793cc0db1d85cabe8a6edaac0ca67.zip
swift-contrib-6f06e137304793cc0db1d85cabe8a6edaac0ca67.tar.bz2
Read in 'play sounds' toggle at launch
Diffstat (limited to 'Swift/QtUI')
-rw-r--r--Swift/QtUI/QtLoginWindow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Swift/QtUI/QtLoginWindow.cpp b/Swift/QtUI/QtLoginWindow.cpp
index 5b2cf5c..1cd3206 100644
--- a/Swift/QtUI/QtLoginWindow.cpp
+++ b/Swift/QtUI/QtLoginWindow.cpp
@@ -146,71 +146,71 @@ QtLoginWindow::QtLoginWindow(UIEventStream* uiEventStream, SettingsProvider* set
stack_->addWidget(loginWidgetWrapper_);
#ifdef SWIFTEN_PLATFORM_MACOSX
menuBar_ = new QMenuBar(NULL);
#else
menuBar_ = menuBar();
#endif
QApplication::setQuitOnLastWindowClosed(false);
swiftMenu_ = new QMenu(tr("&Swift"), this);
#ifdef SWIFTEN_PLATFORM_MACOSX
generalMenu_ = new QMenu(tr("&General"), this);
#else
generalMenu_ = swiftMenu_;
#endif
#ifdef SWIFTEN_PLATFORM_MACOSX
QAction* aboutAction = new QAction(QString("&About %1").arg("Swift"), this);
#else
QAction* aboutAction = new QAction(QString(tr("&About %1")).arg("Swift"), this);
#endif
connect(aboutAction, SIGNAL(triggered()), SLOT(handleAbout()));
swiftMenu_->addAction(aboutAction);
xmlConsoleAction_ = new QAction(tr("&Show Debug Console"), this);
connect(xmlConsoleAction_, SIGNAL(triggered()), SLOT(handleShowXMLConsole()));
generalMenu_->addAction(xmlConsoleAction_);
#ifdef SWIFT_EXPERIMENTAL_FT
fileTransferOverviewAction_ = new QAction(tr("Show &File Transfer Overview"), this);
connect(fileTransferOverviewAction_, SIGNAL(triggered()), SLOT(handleShowFileTransferOverview()));
generalMenu_->addAction(fileTransferOverviewAction_);
#endif
toggleSoundsAction_ = new QAction(tr("&Play Sounds"), this);
toggleSoundsAction_->setCheckable(true);
- toggleSoundsAction_->setChecked(true);
+ toggleSoundsAction_->setChecked(settings_->getSetting(SettingConstants::PLAY_SOUNDS));
connect(toggleSoundsAction_, SIGNAL(toggled(bool)), SLOT(handleToggleSounds(bool)));
generalMenu_->addAction(toggleSoundsAction_);
toggleNotificationsAction_ = new QAction(tr("Display Pop-up &Notifications"), this);
toggleNotificationsAction_->setCheckable(true);
toggleNotificationsAction_->setChecked(settings_->getSetting(SettingConstants::SHOW_NOTIFICATIONS));
connect(toggleNotificationsAction_, SIGNAL(toggled(bool)), SLOT(handleToggleNotifications(bool)));
#ifndef SWIFTEN_PLATFORM_MACOSX
swiftMenu_->addSeparator();
#endif
#ifdef SWIFTEN_PLATFORM_MACOSX
QAction* quitAction = new QAction("&Quit", this);
#else
QAction* quitAction = new QAction(tr("&Quit"), this);
#endif
connect(quitAction, SIGNAL(triggered()), SLOT(handleQuit()));
swiftMenu_->addAction(quitAction);
setInitialMenus();
settings_->onSettingChanged.connect(boost::bind(&QtLoginWindow::handleSettingChanged, this, _1));
bool eagle = settings_->getSetting(SettingConstants::FORGET_PASSWORDS);
remember_->setEnabled(!eagle);
loginAutomatically_->setEnabled(!eagle);
xmlConsoleAction_->setEnabled(!eagle);
if (eagle) {
remember_->setChecked(false);
loginAutomatically_->setChecked(false);
}
this->show();
}