diff options
| author | manuel <manuel@mausz.at> | 2011-04-09 17:36:08 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2011-04-09 17:36:08 +0200 |
| commit | c13a773ef924f7edaa93ab2d2b9f461324d0d447 (patch) | |
| tree | 81b6d4d09af17185bc20bbdce753c9fd84e50154 /pacman-c++/client.cpp | |
| parent | d5d691acfb99257d0f02d296bc8ba8522cce5bda (diff) | |
| download | foop-c13a773ef924f7edaa93ab2d2b9f461324d0d447.tar.gz foop-c13a773ef924f7edaa93ab2d2b9f461324d0d447.tar.bz2 foop-c13a773ef924f7edaa93ab2d2b9f461324d0d447.zip | |
make audioplayer an empty object in server context
Diffstat (limited to 'pacman-c++/client.cpp')
| -rw-r--r-- | pacman-c++/client.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pacman-c++/client.cpp b/pacman-c++/client.cpp index d4324b7..fbcde6d 100644 --- a/pacman-c++/client.cpp +++ b/pacman-c++/client.cpp | |||
| @@ -19,12 +19,13 @@ void Client::createMenu() | |||
| 19 | fileMenu->addAction(quitAction); | 19 | fileMenu->addAction(quitAction); |
| 20 | 20 | ||
| 21 | ClickLabel *toggleSound = new ClickLabel("Toggle Sound", this); | 21 | ClickLabel *toggleSound = new ClickLabel("Toggle Sound", this); |
| 22 | toggleSound->setToolTip("Toggle Sound"); | ||
| 22 | toggleSound->setFixedWidth(20); | 23 | toggleSound->setFixedWidth(20); |
| 23 | toggleSound->setFixedHeight(16); | 24 | toggleSound->setFixedHeight(16); |
| 24 | toggleSound->setAlignment(Qt::AlignBottom); | 25 | toggleSound->setAlignment(Qt::AlignBottom); |
| 25 | 26 | ||
| 26 | bool sound = AudioPlayer::self()->isWorking(); | 27 | bool sound = AudioPlayer::self()->isWorking(); |
| 27 | bool muted = sound && m_settings->value("muted", false).toBool(); | 28 | bool muted = !(sound && m_settings->value("muted", false).toBool()); |
| 28 | AudioPlayer::self()->setMuted(muted); | 29 | AudioPlayer::self()->setMuted(muted); |
| 29 | 30 | ||
| 30 | QImage img(muted ? ":/soundoff" : ":/soundon"); | 31 | QImage img(muted ? ":/soundoff" : ":/soundon"); |
