# HG changeset patch # User teknolog # Date 1270302859 -3600 # Node ID 2360220943029e0988b26be07d53a2a2474c7bb1 # Parent 4d1286f7f982f1a4249be31e8fc322217b8579b8 Fix for bug 2338 - Podcatcher doesn't know about disk F: diff -r 4d1286f7f982 -r 236022094302 application/data/PodcastClient_english.rls --- a/application/data/PodcastClient_english.rls Sat Apr 03 13:33:15 2010 +0100 +++ b/application/data/PodcastClient_english.rls Sat Apr 03 14:54:19 2010 +0100 @@ -50,7 +50,7 @@ // Settings view rls_string STRING_r_podcast_settings_title "Settings" -rls_string STRING_r_podcast_setting_showdir "Podcast directory" +rls_string STRING_r_podcast_setting_showdir "Podcast folder" rls_string STRING_r_podcast_setting_autoupdate "Automatic update" rls_string STRING_r_podcast_setting_autodownload "Automatic download" rls_string STRING_r_podcast_setting_connection "Connection" @@ -58,6 +58,7 @@ rls_string STRING_r_podcast_setting_alwaysask "Always ask" rls_string STRING_r_podcast_setting_useiap "Select access point" rls_string STRING_r_podcast_setting_iaplist "Access points" +rls_string STRING_r_podcast_setting_directory "Select folder" rls_string STRING_r_on "On" rls_string STRING_r_off "Off" diff -r 4d1286f7f982 -r 236022094302 application/data/PodcastSettingsView.ra --- a/application/data/PodcastSettingsView.ra Sat Apr 03 13:33:15 2010 +0100 +++ b/application/data/PodcastSettingsView.ra Sat Apr 03 14:54:19 2010 +0100 @@ -225,6 +225,18 @@ }; } +RESOURCE MEMORYSELECTIONDIALOG r_podcast_memory_selection + { + title = "Select memory:"; + softkey_1 = text_softkey_ok; // The text for the left softkey. + softkey_2 = text_softkey_cancel; // The text for the right softkey. + locations = + { + LOCATION { root_path = text_phone_memory_root_path; }, + LOCATION { root_path = text_memory_card_root_path; } + }; + } + RESOURCE TBUF r_podcast_softkey_select { buf = STRING_r_view_export_feeds_softkey; } RESOURCE TBUF r_settings_title { buf = STRING_r_podcast_settings_title; } diff -r 4d1286f7f982 -r 236022094302 application/data/PodcastStrings.ra --- a/application/data/PodcastStrings.ra Sat Apr 03 13:33:15 2010 +0100 +++ b/application/data/PodcastStrings.ra Sat Apr 03 14:54:19 2010 +0100 @@ -64,3 +64,4 @@ RESOURCE TBUF r_exit_shows_downloading {buf=STRING_r_exit_shows_downloading;} RESOURCE TBUF r_search_results {buf=STRING_r_search_results;} RESOURCE TBUF r_podcast_no_feeds {buf=STRING_r_podcast_no_feeds;} +RESOURCE TBUF r_podcast_setting_directory {buf = STRING_r_podcast_setting_directory;} diff -r 4d1286f7f982 -r 236022094302 application/src/PodcastSettingsView.cpp --- a/application/src/PodcastSettingsView.cpp Sat Apr 03 13:33:15 2010 +0100 +++ b/application/src/PodcastSettingsView.cpp Sat Apr 03 14:54:19 2010 +0100 @@ -25,8 +25,9 @@ #include #include "SettingsEngine.h" -#include -#include +//#include +//#include +#include #include @@ -289,42 +290,26 @@ { DP("EditItemL BEGIN"); if (aIndex == 0) { - CAknMemorySelectionDialog* memDlg = - CAknMemorySelectionDialog::NewL(ECFDDialogTypeNormal, ETrue); - CleanupStack::PushL(memDlg); - CAknMemorySelectionDialog::TMemory memory = - CAknMemorySelectionDialog::EPhoneMemory; - - if (memDlg->ExecuteL(memory)) + TFileName selectedFolder; + selectedFolder.Copy(iShowDir); + TFileName startFolder; + startFolder.Zero(); + TInt types = AknCommonDialogsDynMem::EMemoryTypePhone | AknCommonDialogsDynMem::EMemoryTypeMMC |AknCommonDialogsDynMem::EMemoryTypeInternalMassStorage| AknCommonDialogsDynMem::EMemoryTypeRemote; + + HBufC *title = iCoeEnv->AllocReadResourceLC(R_PODCAST_SETTING_DIRECTORY); + if (AknCommonDialogsDynMem::RunFolderSelectDlgLD (types, selectedFolder, + startFolder, NULL, NULL, *title)) { - TFileName importName; - - if (memory==CAknMemorySelectionDialog::EMemoryCard) - { - importName = PathInfo:: MemoryCardRootPath(); - } - else - { - importName = PathInfo:: PhoneMemoryRootPath(); + _LIT(KPodcastsDir, "Podcasts"); + if (selectedFolder.Find(KPodcastsDir) != selectedFolder.Length()-9) + { + // append "Podcasts" if the folder isn't already called this + selectedFolder.Append(KPodcastsDir); + } + iShowDir.Copy(selectedFolder); + LoadSettingsL(); } - - CAknFileSelectionDialog* dlg = CAknFileSelectionDialog::NewL(ECFDDialogTypeSave, R_PODCAST_SHOWDIR_SELECTOR); - HBufC* select = iEikonEnv->AllocReadResourceLC(R_PODCAST_SOFTKEY_SELECT); - dlg->SetLeftSoftkeyFileL(*select); - CleanupStack::PopAndDestroy(select); - CleanupStack::PushL(dlg); - - dlg->SetDefaultFolderL(importName); - - if(dlg->ExecuteL(importName)) - { - importName.Append(_L("Podcasts")); - iShowDir.Copy(importName); - LoadSettingsL(); - } - CleanupStack::PopAndDestroy(dlg); - } - CleanupStack::PopAndDestroy(memDlg); + CleanupStack::PopAndDestroy(title); } else { CAknSettingItemList::EditItemL(aIndex,aCalledFromMenu);