application/src/PodcastSettingsView.cpp
branch3rded
changeset 176 1c8b56cb6409
parent 164 000f9fc147b2
child 177 269e3f3e544a
equal deleted inserted replaced
175:cd124c4eb6b9 176:1c8b56cb6409
    23 #include <aknsettingitemlist.h>
    23 #include <aknsettingitemlist.h>
    24 #include <aknnavide.h> 
    24 #include <aknnavide.h> 
    25 #include <podcast.rsg>
    25 #include <podcast.rsg>
    26 #include "SettingsEngine.h"
    26 #include "SettingsEngine.h"
    27 
    27 
    28 #include <akncommondialogsdynmem.h> 
    28 //#include <akncommondialogsdynmem.h> 
    29 #include <pathinfo.h>
    29 #include <pathinfo.h>
    30 #include <aknquerydialog.h>
    30 #include <aknquerydialog.h>
    31 
    31 
    32 
    32 
    33 class CIapSetting: public CAknEnumeratedTextPopupSettingItem 
    33 class CIapSetting: public CAknEnumeratedTextPopupSettingItem 
   286 		}
   286 		}
   287 
   287 
   288 	void  EditItemL (TInt aIndex, TBool aCalledFromMenu)
   288 	void  EditItemL (TInt aIndex, TBool aCalledFromMenu)
   289 		{
   289 		{
   290 		DP("EditItemL BEGIN");
   290 		DP("EditItemL BEGIN");
   291 		if (aIndex == 0) {
   291 //		if (aIndex == 0) {
   292 			TFileName selectedFolder;
   292 //			TFileName selectedFolder;
   293 			selectedFolder.Copy(iShowDir);
   293 //			selectedFolder.Copy(iShowDir);
   294 			TFileName startFolder;
   294 //			TFileName startFolder;
   295 			startFolder.Zero();
   295 //			startFolder.Zero();
   296 			TInt types = AknCommonDialogsDynMem::EMemoryTypePhone | AknCommonDialogsDynMem::EMemoryTypeMMC |AknCommonDialogsDynMem::EMemoryTypeInternalMassStorage| AknCommonDialogsDynMem::EMemoryTypeRemote;
   296 //			TInt types = AknCommonDialogsDynMem::EMemoryTypePhone | AknCommonDialogsDynMem::EMemoryTypeMMC |AknCommonDialogsDynMem::EMemoryTypeInternalMassStorage| AknCommonDialogsDynMem::EMemoryTypeRemote;
   297 			
   297 //			
   298 			HBufC *title = iCoeEnv->AllocReadResourceLC(R_PODCAST_SELECT_FOLDER);
   298 //			HBufC *title = iCoeEnv->AllocReadResourceLC(R_PODCAST_SELECT_FOLDER);
   299 			if (AknCommonDialogsDynMem::RunFolderSelectDlgLD (types, selectedFolder,
   299 //			if (AknCommonDialogsDynMem::RunFolderSelectDlgLD (types, selectedFolder,
   300 					startFolder, NULL, NULL, *title))
   300 //					startFolder, NULL, NULL, *title))
   301 				{
   301 //				{
   302 				_LIT(KPodcastsDir, "Podcasts");
   302 //				_LIT(KPodcastsDir, "Podcasts");
   303 				TInt pos = selectedFolder.Find(KPodcastsDir);
   303 //				TInt pos = selectedFolder.Find(KPodcastsDir);
   304 				if (pos == KErrNotFound || pos != selectedFolder.Length()-9)
   304 //				if (pos == KErrNotFound || pos != selectedFolder.Length()-9)
   305 					{
   305 //					{
   306 					// append "Podcasts" if the folder isn't already called this
   306 //					// append "Podcasts" if the folder isn't already called this
   307 					selectedFolder.Append(KPodcastsDir);
   307 //					selectedFolder.Append(KPodcastsDir);
   308 					}
   308 //					}
   309 				
   309 //				
   310 				if (selectedFolder[selectedFolder.Length()-1] != '\\')
   310 //				if (selectedFolder[selectedFolder.Length()-1] != '\\')
   311 					{
   311 //					{
   312 					selectedFolder.Append(_L("\\"));
   312 //					selectedFolder.Append(_L("\\"));
   313 					}
   313 //					}
   314 				
   314 //				
   315 				iShowDir.Copy(selectedFolder);
   315 //				iShowDir.Copy(selectedFolder);
   316 				LoadSettingsL();
   316 //				LoadSettingsL();
   317 				}
   317 //				}
   318 			CleanupStack::PopAndDestroy(title);
   318 //			CleanupStack::PopAndDestroy(title);
   319 			}
   319 //			}
   320 		else {
   320 //		else {
   321 			CAknSettingItemList::EditItemL(aIndex,aCalledFromMenu);
   321 //			CAknSettingItemList::EditItemL(aIndex,aCalledFromMenu);
   322 		}
   322 //		}
   323 			StoreSettingsL();
   323 //			StoreSettingsL();
   324 			UpdateSettingVisibility();
   324 //			UpdateSettingVisibility();
   325 		DP("EditItemL END");
   325 		DP("EditItemL END");
   326 		}
   326 		}
   327 	
   327 	
   328 	/**
   328 	/**
   329 	 * Framework method to create a setting item based upon the user id aSettingId. The 
   329 	 * Framework method to create a setting item based upon the user id aSettingId. The