[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdegames/kgoldrunner/src
From: Ian Wadham <ianw2 () optusnet ! com ! au>
Date: 2008-05-31 5:44:36
Message-ID: 1212212676.570755.30573.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 814671 by ianw:
BUG: 162811 The sound feature is written and working, but is temporarily disabled \
until final testing, including testing the playing of simultaneous sounds in Phonon. \
This fix disables the Settings action for sound.
M +8 -1 kgoldrunner.cpp
M +2 -0 kgrconsts.h
M +3 -1 kgrgame.cpp
--- trunk/KDE/kdegames/kgoldrunner/src/kgoldrunner.cpp #814670:814671
@@ -438,7 +438,14 @@
actionCollection()->addAction ("options_sounds", setSounds);
connect (setSounds, SIGNAL (triggered (bool)), game, SLOT (setPlaySounds \
(bool))); KConfigGroup gameGroup (KGlobal::config(), "KDEGame");
- setSounds->setChecked (gameGroup.readEntry ("Sound", true));
+#ifdef ENABLE_SOUND_SUPPORT
+ bool soundOnOff = gameGroup.readEntry ("Sound", true);
+ setSounds->setChecked (soundOnOff);
+ game->setPlaySounds (soundOnOff); // KGrGame has created a sound player.
+#else
+ setSounds->setChecked (false); // No support for sound in this version.
+ setSounds->setEnabled (false);
+#endif
// Configure Shortcuts...
// Configure Toolbars...
--- trunk/KDE/kdegames/kgoldrunner/src/kgrconsts.h #814670:814671
@@ -13,6 +13,8 @@
#ifndef KGRCONSTS_H
#define KGRCONSTS_H
+// #define ENABLE_SOUND_SUPPORT // Ian W. moved it here - 31 May 2008.
+
enum Owner {SYSTEM, USER};
const char FREE = ' ';
--- trunk/KDE/kdegames/kgoldrunner/src/kgrgame.cpp #814670:814671
@@ -51,7 +51,7 @@
#endif
-// #define ENABLE_SOUND_SUPPORT
+// Moved this to kgrconsts.h, Ian W. 31 May 08 // #define ENABLE_SOUND_SUPPORT
/******************************************************************************/
/*********************** KGOLDRUNNER GAME CLASS *************************/
@@ -457,7 +457,9 @@
{
KConfigGroup gameGroup (KGlobal::config(), "KDEGame");
gameGroup.writeEntry ("Sound", on_off);
+#ifdef ENABLE_SOUND_SUPPORT
effects->setMuted (!on_off);
+#endif
}
void KGrGame::freeze()
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic