equal
deleted
inserted
replaced
22 #include <aknlists.h> |
22 #include <aknlists.h> |
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 #include <akntitle.h> |
27 |
28 |
28 #include <akncommondialogsdynmem.h> |
29 #include <akncommondialogsdynmem.h> |
29 #include <pathinfo.h> |
30 #include <pathinfo.h> |
30 #include <aknquerydialog.h> |
31 #include <aknquerydialog.h> |
31 |
32 |
254 }break; |
255 }break; |
255 } |
256 } |
256 |
257 |
257 DP1("Download automatically: %d", iAutoDownload); |
258 DP1("Download automatically: %d", iAutoDownload); |
258 se.SetDownloadAutomatically(iAutoDownload); |
259 se.SetDownloadAutomatically(iAutoDownload); |
|
260 |
|
261 DP1("Delete automatically: %d", iAutoDownload); |
|
262 se.SetDeleteAutomatically((TAutoDeleteSetting)iAutoDelete); |
259 se.SaveSettingsL(); |
263 se.SaveSettingsL(); |
260 DP("StoreSettings END"); |
264 DP("StoreSettings END"); |
261 } |
265 } |
262 |
266 |
263 void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType) |
267 void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType) |
373 iConnection = EConnectionAlwaysAsk; |
377 iConnection = EConnectionAlwaysAsk; |
374 } |
378 } |
375 } |
379 } |
376 |
380 |
377 iAutoDownload = se.DownloadAutomatically(); |
381 iAutoDownload = se.DownloadAutomatically(); |
|
382 iAutoDelete = se.DeleteAutomatically(); |
378 |
383 |
379 switch(aSettingId) |
384 switch(aSettingId) |
380 { |
385 { |
381 case EPodcastSettingShowDir: |
386 case EPodcastSettingShowDir: |
382 DP("EPodcastSettingShowDir"); |
387 DP("EPodcastSettingShowDir"); |
399 case EPodcastSettingAutoDownload: |
404 case EPodcastSettingAutoDownload: |
400 DP("EPodcastSettingAutoDownload"); |
405 DP("EPodcastSettingAutoDownload"); |
401 iSettingAutoDownload = new (ELeave) CAknBinaryPopupSettingItem (aSettingId, iAutoDownload); |
406 iSettingAutoDownload = new (ELeave) CAknBinaryPopupSettingItem (aSettingId, iAutoDownload); |
402 return iSettingAutoDownload; |
407 return iSettingAutoDownload; |
403 break; |
408 break; |
|
409 case EPodcastSettingAutoDelete: |
|
410 DP("EPodcastSettingAutoDelete"); |
|
411 iSettingAutoDelete = new (ELeave) CAknEnumeratedTextPopupSettingItem (aSettingId, iAutoDelete); |
|
412 return iSettingAutoDelete; |
|
413 break; |
404 default: |
414 default: |
405 return CAknSettingItemList::CreateSettingItemL(aSettingId); |
415 return CAknSettingItemList::CreateSettingItemL(aSettingId); |
406 break; |
416 break; |
407 } |
417 } |
408 DP("CreateSettingItemL END"); |
418 DP("CreateSettingItemL END"); |
414 TInt iAutoUpdate; |
424 TInt iAutoUpdate; |
415 CAknSettingItem *iSettingAutoUpdate; |
425 CAknSettingItem *iSettingAutoUpdate; |
416 |
426 |
417 TInt iAutoDownload; |
427 TInt iAutoDownload; |
418 CAknSettingItem *iSettingAutoDownload; |
428 CAknSettingItem *iSettingAutoDownload; |
|
429 |
|
430 TInt iAutoDelete; |
|
431 CAknSettingItem *iSettingAutoDelete; |
419 |
432 |
420 TInt iConnection; |
433 TInt iConnection; |
421 |
434 |
422 TInt iIap; |
435 TInt iIap; |
423 CIapSetting *iSettingIAP; |
436 CIapSetting *iSettingIAP; |
485 iListbox->ActivateL(); |
498 iListbox->ActivateL(); |
486 |
499 |
487 DP("Creating navipane"); |
500 DP("Creating navipane"); |
488 iNaviPane =( CAknNavigationControlContainer * ) StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) ); |
501 iNaviPane =( CAknNavigationControlContainer * ) StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidNavi ) ); |
489 |
502 |
490 HBufC *titleBuffer = iEikonEnv->AllocReadResourceL(R_SETTINGS_TITLE); |
503 CAknTitlePane* titlePane = static_cast<CAknTitlePane*> |
491 iNaviDecorator = iNaviPane->CreateNavigationLabelL(*titleBuffer); |
504 ( StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) ); |
492 delete titleBuffer; |
505 |
493 |
506 HBufC *titleBuffer = iEikonEnv->AllocReadResourceLC(R_SETTINGS_TITLE); |
|
507 titlePane->SetTextL(*titleBuffer); |
|
508 CleanupStack::PopAndDestroy(titleBuffer); |
|
509 |
494 DP("Updating listbox"); |
510 DP("Updating listbox"); |
495 AppUi()->AddToStackL(*this, iListbox); |
511 AppUi()->AddToStackL(*this, iListbox); |
496 iListbox->UpdateSettingVisibility(); |
512 iListbox->UpdateSettingVisibility(); |
497 iListbox->MakeVisible(ETrue); |
513 iListbox->MakeVisible(ETrue); |
498 iListbox->DrawNow(); |
514 iListbox->DrawNow(); |
501 if(iNaviDecorator && iNaviPane) |
517 if(iNaviDecorator && iNaviPane) |
502 { |
518 { |
503 iNaviPane->PushL(*iNaviDecorator); |
519 iNaviPane->PushL(*iNaviDecorator); |
504 } |
520 } |
505 |
521 |
|
522 ((CPodcastAppUi*)AppUi())->SetTabsDimmed(ETrue); |
506 DP("CPodcastSettingsView::DoActivateL END"); |
523 DP("CPodcastSettingsView::DoActivateL END"); |
507 } |
524 } |
508 |
525 |
509 void CPodcastSettingsView::DoDeactivate() |
526 void CPodcastSettingsView::DoDeactivate() |
510 { |
527 { |
520 { |
537 { |
521 iNaviPane->Pop(iNaviDecorator); |
538 iNaviPane->Pop(iNaviDecorator); |
522 delete iNaviDecorator; |
539 delete iNaviDecorator; |
523 iNaviDecorator = NULL; |
540 iNaviDecorator = NULL; |
524 } |
541 } |
|
542 |
|
543 ((CPodcastAppUi*)AppUi())->SetTabsDimmed(EFalse); |
525 DP("CPodcastSettingsView::DoDeactivate END"); |
544 DP("CPodcastSettingsView::DoDeactivate END"); |
526 } |
545 } |
527 |
546 |
528 /** |
547 /** |
529 * Command handling function intended for overriding by sub classes. |
548 * Command handling function intended for overriding by sub classes. |