--- a/voicerecorder/AppSrc/CVRSettingsDialogMMCSupported.cpp Wed Sep 15 12:15:47 2010 +0300
+++ b/voicerecorder/AppSrc/CVRSettingsDialogMMCSupported.cpp Wed Oct 13 14:34:59 2010 +0300
@@ -36,15 +36,8 @@
#include <AknCommonDialogsDynMem.h>
#include <driveinfo.h>
#include <CAknMemorySelectionDialogMultiDrive.h>
-#include <CAknMemorySelectionSettingItemMultiDrive.h>
#endif
-// ListBox item index
-enum TListItemIndex
- {
- EListItemQualityIndex = 0,
- ElistItemMemoStoreIndex,
- };
// ---------------------------------------------------------------------------
// CVRSettingsDialog::~CVRSettingsDialog
//
@@ -138,6 +131,7 @@
CAknSettingItem* settingItem;
HBufC* itemTitle;
+ TInt id( 0 );
if ( VRUtils::FeatureEnabled( EVRFeatureShowQualitySetting ) )
{
// Add quality setting
@@ -151,7 +145,7 @@
CleanupStack::PushL( settingItem );
itemTitle = iCoeEnv->AllocReadResourceLC( R_QTN_VOREC_SET_QUALITY );
- settingItem->ConstructL( EFalse, EListItemQualityIndex, *itemTitle, NULL,
+ settingItem->ConstructL( EFalse, id, *itemTitle, NULL,
R_VR_SETTINGS_DEFAULT_SPEAKER_PAGE, EAknCtPopupField, NULL,
R_VR_SETTINGS_QUALITY_TEXTS );
CleanupStack::PopAndDestroy(); // itemTitle
@@ -159,6 +153,7 @@
// Add quality item to the settings array
iSettingItemArray.AppendL( settingItem );
CleanupStack::Pop(); // settingItem
+ id++;
}
if ( VRUtils::MultipleMassStorageAvailable() )
@@ -178,16 +173,21 @@
CleanupStack::Pop(); // settingItem
#else //multiple drives
- settingItem = new( ELeave ) CAknMemorySelectionSettingItemMultiDrive(0, iDrive );
- CleanupStack::PushL( settingItem );
- TInt includedMedias = AknCommonDialogsDynMem::EMemoryTypeInternalMassStorage |
- AknCommonDialogsDynMem::EMemoryTypeMMCExternal;
- static_cast< CAknMemorySelectionSettingItemMultiDrive *> ( settingItem )->SetIncludedMediasL( includedMedias );
- // Set memo store item's title
- settingItem->ConstructL( EFalse, ElistItemMemoStoreIndex, *itemTitle, NULL, 0, EAknSetListBox );
- // Add memo store item to the settings array
- iSettingItemArray.AppendL( settingItem );
- CleanupStack::Pop(); // settingItem
+
+ CAknMemorySelectionDialogMultiDrive* dlg = CAknMemorySelectionDialogMultiDrive::NewL(
+ ECFDDialogTypeNormal,
+ R_VOREC_MEMORY_SELECTION_DIALOG, // Default resource Id
+ EFalse,
+ AknCommonDialogsDynMem::EMemoryTypeInternalMassStorage |
+ AknCommonDialogsDynMem::EMemoryTypeMMCExternal);
+
+ CleanupStack::PushL( dlg );
+ TBool value = dlg->ExecuteL( iDrive );
+ CleanupStack::PopAndDestroy( dlg );
+ if (value)
+ {
+ VRUtils::SetMemoDriveL( iDrive );
+ }
#endif
@@ -226,17 +226,8 @@
case EEventEditingStarted: // From ProcessCommand->ECmdChange
{
TInt index( aListBox->CurrentItemIndex() );
- TInt driveDefaultMassStorage = VRUtils::DefaultMemoDriveL();
- TInt driveRemovableMassStorage = VRUtils::GetRemovableMassStorageL();
-
if ( index >=0 ) // index is -1 if there are no items in the list
{
- if(index == ElistItemMemoStoreIndex &&
- !VRUtils::DriveValid(driveDefaultMassStorage) &&
- !VRUtils::DriveValid(driveRemovableMassStorage) )
- {
- break;
- }
iSettingItemArray.At( index )->EditItemL(
aEventType == EEventEditingStarted );
aListBox->DrawItem( index );
@@ -344,10 +335,7 @@
iDrive = (TDriveNumber)defaultDrive;
}
}
- if(iDrive == defaultDrive || iDrive == VRUtils::GetRemovableMassStorageL())
- {
VRUtils::SetMemoDriveL( iDrive );
- }
#endif
if ( VRUtils::FeatureEnabled( EVRFeatureShowQualitySetting ) )