43 #include <AknCommonDialogsDynMem.h> |
43 #include <AknCommonDialogsDynMem.h> |
44 #endif |
44 #endif |
45 |
45 |
46 const TUid KVRAppUID = { KVoiceRecorderAppUID3 }; |
46 const TUid KVRAppUID = { KVoiceRecorderAppUID3 }; |
47 |
47 |
|
48 // ListBox item index |
|
49 enum TListItemIndex |
|
50 { |
|
51 EListItemQualityIndex = 0, |
|
52 ElistItemMemoStoreIndex, |
|
53 }; |
|
54 |
48 // ========================= MEMBER FUNCTIONS ================================ |
55 // ========================= MEMBER FUNCTIONS ================================ |
49 |
56 |
50 // --------------------------------------------------------------------------- |
57 // --------------------------------------------------------------------------- |
51 // CVRGSPluginContainer::ConstructL |
58 // CVRGSPluginContainer::ConstructL |
52 // Symbian OS default constructor |
59 // Symbian OS default constructor |
172 settingItem = new( ELeave ) CAknBinaryPopupSettingItem ( 0, ( TInt& ) iQuality ); |
178 settingItem = new( ELeave ) CAknBinaryPopupSettingItem ( 0, ( TInt& ) iQuality ); |
173 #endif |
179 #endif |
174 CleanupStack::PushL( settingItem ); |
180 CleanupStack::PushL( settingItem ); |
175 |
181 |
176 itemTitle = iCoeEnv->AllocReadResourceLC( R_QTN_VOREC_SET_QUALITY ); |
182 itemTitle = iCoeEnv->AllocReadResourceLC( R_QTN_VOREC_SET_QUALITY ); |
177 settingItem->ConstructL( EFalse, id, *itemTitle, NULL, |
183 settingItem->ConstructL( EFalse, EListItemQualityIndex, *itemTitle, NULL, |
178 R_VR_SETTINGS_DEFAULT_SPEAKER_PAGE, |
184 R_VR_SETTINGS_DEFAULT_SPEAKER_PAGE, |
179 EAknCtPopupField, NULL, |
185 EAknCtPopupField, NULL, |
180 R_VR_SETTINGS_QUALITY_TEXTS ); |
186 R_VR_SETTINGS_QUALITY_TEXTS ); |
181 |
187 |
182 CleanupStack::PopAndDestroy(); // itemTitle |
188 CleanupStack::PopAndDestroy(); // itemTitle |
183 |
189 |
184 // Add quality item to the settings array |
190 // Add quality item to the settings array |
185 iSettingItemArray->AppendL( settingItem ); |
191 iSettingItemArray->AppendL( settingItem ); |
186 CleanupStack::Pop(); // settingItem |
192 CleanupStack::Pop(); // settingItem |
187 id++; |
193 } |
188 } |
194 if ( VRUtils::MultipleMassStorageAvailable() ) |
189 if ( VRUtils::MultipleMassStorageAvailable() ) |
|
190 { |
195 { |
191 // Add memo store setting |
196 // Add memo store setting |
192 // Create the memo store item |
197 // Create the memo store item |
193 #ifndef RD_MULTIPLE_DRIVE |
198 #ifndef RD_MULTIPLE_DRIVE |
194 settingItem = |
199 settingItem = |
209 #ifndef RD_MULTIPLE_DRIVE |
214 #ifndef RD_MULTIPLE_DRIVE |
210 // Set memo store item's title |
215 // Set memo store item's title |
211 settingItem->ConstructL( EFalse, id, *itemTitle, NULL, |
216 settingItem->ConstructL( EFalse, id, *itemTitle, NULL, |
212 R_VOREC_MEMORY_SELECTION_DIALOG, EAknCtPopupSettingList ); |
217 R_VOREC_MEMORY_SELECTION_DIALOG, EAknCtPopupSettingList ); |
213 #else |
218 #else |
214 settingItem->ConstructL( EFalse, id, *itemTitle, NULL, 0, EAknCtPopupSettingList ); |
219 settingItem->ConstructL( EFalse, ElistItemMemoStoreIndex, *itemTitle, NULL, 0, EAknCtPopupSettingList ); |
215 #endif |
220 #endif |
216 |
221 |
217 CleanupStack::PopAndDestroy(); // itemTitle |
222 CleanupStack::PopAndDestroy(); // itemTitle |
218 |
223 |
219 // Add memo store item to the settings array |
224 // Add memo store item to the settings array |
220 iSettingItemArray->AppendL( settingItem ); |
225 iSettingItemArray->AppendL( settingItem ); |
221 CleanupStack::Pop(); // settingItem |
226 CleanupStack::Pop(); // settingItem |
222 id++; |
|
223 } |
227 } |
224 } |
228 } |
225 |
229 |
226 |
230 |
227 // --------------------------------------------------------------------------- |
231 // --------------------------------------------------------------------------- |
266 } |
270 } |
267 |
271 |
268 void CVRGSPluginContainer::HandleListBoxSelectionL( TInt aCommand ) |
272 void CVRGSPluginContainer::HandleListBoxSelectionL( TInt aCommand ) |
269 { |
273 { |
270 TInt index( iListBox->CurrentItemIndex() ); |
274 TInt index( iListBox->CurrentItemIndex() ); |
271 |
275 TInt driveDefaultMassStorage = VRUtils::DefaultMemoDriveL(); |
|
276 TInt driveRemovableMassStorage = VRUtils::GetRemovableMassStorageL(); |
|
277 |
272 if ( index >=0 ) // index is -1 if there are no items in the list |
278 if ( index >=0 ) // index is -1 if there are no items in the list |
273 { |
279 { |
|
280 if(index == ElistItemMemoStoreIndex && |
|
281 !VRUtils::DriveValid(driveDefaultMassStorage) && |
|
282 !VRUtils::DriveValid(driveRemovableMassStorage) ) |
|
283 { |
|
284 return; |
|
285 } |
274 // Open edit dialog if EAknCmdOpen, invert the value otherwise |
286 // Open edit dialog if EAknCmdOpen, invert the value otherwise |
275 iSettingItemArray->At( index )->EditItemL( aCommand == EAknCmdOpen ); |
287 iSettingItemArray->At( index )->EditItemL( aCommand == EAknCmdOpen ); |
276 iListBox->DrawItem( index ); |
288 iListBox->DrawItem( index ); |
277 //Store all settings after change |
289 //Store all settings after change |
278 StoreAllL(); |
290 StoreAllL(); |
337 |
349 |
338 // use default device drive to save files |
350 // use default device drive to save files |
339 iDrive = (TDriveNumber)defaultDrive; |
351 iDrive = (TDriveNumber)defaultDrive; |
340 } |
352 } |
341 } |
353 } |
|
354 if(iDrive == defaultDrive || iDrive == VRUtils::GetRemovableMassStorageL()) |
|
355 { |
342 VRUtils::SetMemoDriveL( iDrive ); |
356 VRUtils::SetMemoDriveL( iDrive ); |
|
357 } |
343 #endif |
358 #endif |
344 |
359 |
345 // Save quality setting |
360 // Save quality setting |
346 if ( VRUtils::FeatureEnabled( EVRFeatureShowQualitySetting ) ) |
361 if ( VRUtils::FeatureEnabled( EVRFeatureShowQualitySetting ) ) |
347 { |
362 { |