profilesapplication/Profiles/ProfileApp/SettingsViewSrc/CProfileSettingsContainer.cpp
--- a/profilesapplication/Profiles/ProfileApp/SettingsViewSrc/CProfileSettingsContainer.cpp Mon Mar 15 12:40:33 2010 +0200
+++ b/profilesapplication/Profiles/ProfileApp/SettingsViewSrc/CProfileSettingsContainer.cpp Wed Mar 31 21:31:25 2010 +0300
@@ -51,6 +51,7 @@
#include <featmgr.h>
#include <MProfileExtended.h>
+#include <MProfileTones.h>
#include <MProfile3DToneSettings.h>
#include <MProfileFeedbackSettings.h>
#include <MProfileExtraSettings.h>
@@ -76,6 +77,7 @@
#include <psmsrvdomaincrkeys.h>
#include <e32property.h>
#include <ProfileEnginePrivatePSKeys.h>
+#include <TProfileToneSettings.h>
namespace
{
@@ -536,7 +538,9 @@
CAknSettingItemArray* array = SettingItemArray();
TUint32 flags( iProfile->VisibleFlags() );
TInt profileId( 0 );
-
+ const MProfileTones& tones = iProfile->ProfileTones();
+ const TProfileToneSettings& toneSettings = tones.ToneSettings();
+
TBool hide3DEcho = EFalse;
TInt effect = iProfile->ProfileExtraSettings().Profile3DToneSettings().Effect();
if ( effect == EProfile3DEffectOff || effect == EProfile3DEffectStereoWidening )
@@ -614,10 +618,17 @@
SetItemHidden( EProfileSettingVibratingAlertId, array,
~flags & EProfileFlagVibratingAlert );
-
- SetItemHidden( EProfileSettingEmailVibratingAlertId, array,
- ~flags & EProfileFlagVibratingAlert );
- SetItemHidden( EProfileSettingKeypadVolumeId, array,
+
+ if(!iCopyProfile->iVibratingAlert)
+ {
+ SetItemHidden( EProfileSettingEmailVibratingAlertId, array,ETrue );
+ }
+ else
+ {
+ SetItemHidden( EProfileSettingEmailVibratingAlertId, array,EFalse );
+ }
+
+ SetItemHidden( EProfileSettingKeypadVolumeId, array,
~flags & EProfileFlagKeypadVolume );
SetItemHidden( EProfileSettingWarningAndGameTonesId, array,
@@ -788,7 +799,13 @@
{
iIndexHandler->StoreIndices();
}
-
+
+ TInt vibratingAlert = iCopyProfile->iVibratingAlert;
+ if( identifier == EProfileSettingVibratingAlertId && iIndexHandler )
+ {
+ iIndexHandler->StoreIndices();
+ }
+
// Set boolean value to ETrue that we know that the settings container
// is in editing mode.
iItemEdited = ETrue;
@@ -834,6 +851,11 @@
{
UpdateSettingsL( EFalse ); // hide 3DEcho if 3DEffect is off
}
+
+ if ( vibratingAlert != iCopyProfile->iVibratingAlert )
+ {
+ UpdateSettingsL( EFalse ); //hide emailVibrating alert if vibrating alert is off
+ }
}
// If the setting is an external (= only in Tones View):
iExternalSettingsHandler.StoreIfChangedL( identifier );