313 // |
313 // |
314 void CFMRadioScanLocalStationsView::FadeAndShowExit( TBool aFaded ) |
314 void CFMRadioScanLocalStationsView::FadeAndShowExit( TBool aFaded ) |
315 { |
315 { |
316 TInt err = KErrNone; |
316 TInt err = KErrNone; |
317 iFaded = aFaded; |
317 iFaded = aFaded; |
318 if( iContainer ) |
318 SetToolbarDimmedState( aFaded ); |
|
319 if ( iContainer ) |
319 { |
320 { |
320 if ( aFaded ) // Fade |
321 if ( aFaded ) // Fade |
321 { |
322 { |
322 // In case options menu is open when headset is disconnected |
323 // In case options menu is open when headset is disconnected |
323 StopDisplayingMenuBar(); |
324 StopDisplayingMenuBar(); |
324 SetToolbarDimmedState( ETrue ); |
|
325 iContainer->SetFaded( aFaded ); |
325 iContainer->SetFaded( aFaded ); |
326 TRAP( err,Cba()->SetCommandSetL( R_FMRADIO_SOFTKEYS_EXIT ) ); |
326 TRAP( err,Cba()->SetCommandSetL( R_FMRADIO_SOFTKEYS_EXIT ) ); |
327 } |
327 } |
328 else |
328 else |
329 { |
329 { |
330 SetToolbarDimmedState( EFalse ); |
330 iContainer->SetFaded( aFaded ); |
331 iContainer->SetFaded(aFaded); |
|
332 TRAP( err,Cba()->SetCommandSetL( R_AVKON_SOFTKEYS_OPTIONS_BACK ) ); |
331 TRAP( err,Cba()->SetCommandSetL( R_AVKON_SOFTKEYS_OPTIONS_BACK ) ); |
333 // Update index to be sure it is up-to-date (in case if list was scrolled in idle state) |
332 // Update index to be sure it is up-to-date (in case if list was scrolled in idle state) |
334 iContainer->UpdateLastListenedChannel( iChIndex ); |
333 iContainer->UpdateLastListenedChannel( iChIndex ); |
335 |
334 |
336 if( iScannedChannels.Count() > 0 ) |
335 if( iScannedChannels.Count() > 0 ) |
337 { |
336 { |
338 TRAP_IGNORE( SetMiddleSoftKeyIconL(); ) |
337 TRAP_IGNORE( SetMiddleSoftKeyIconL(); ) |
339 |
338 |
340 if ( ( CurrentlyPlayingChannel() == CurrentlySelectedChannel() ) ) |
339 if ( ( CurrentlyPlayingChannel() == CurrentlySelectedChannel() ) ) |
341 { |
340 { |
342 SetContextMenu( R_FMRADIO_SCAN_STATIONS_CTX_MENUBAR_SAVE ); |
341 SetContextMenu( R_FMRADIO_SCAN_STATIONS_CTX_MENUBAR_SAVE ); |
343 } |
342 } |
344 else |
343 else |
345 { |
344 { |
346 SetContextMenu( R_FMRADIO_SCAN_STATIONS_CTX_MENUBAR ); |
345 SetContextMenu( R_FMRADIO_SCAN_STATIONS_CTX_MENUBAR ); |
347 } |
346 } |
348 } |
347 } |
349 } |
348 } |
350 Cba()->DrawDeferred(); |
349 Cba()->DrawDeferred(); |
351 } |
350 } |
352 } |
351 } |
353 |
352 |
595 else |
594 else |
596 { |
595 { |
597 aMenuPane->SetItemDimmed( EFMRadioCmdDeactivateIhf, ETrue ); |
596 aMenuPane->SetItemDimmed( EFMRadioCmdDeactivateIhf, ETrue ); |
598 aMenuPane->SetItemDimmed( EFMRadioCmdActivateIhf, ETrue ); |
597 aMenuPane->SetItemDimmed( EFMRadioCmdActivateIhf, ETrue ); |
599 } |
598 } |
600 |
599 |
601 if ( iScannedChannels.Count() < 2 ) |
600 TInt scannedChannelCount = iScannedChannels.Count(); |
|
601 |
|
602 if ( scannedChannelCount < 2 ) |
602 { |
603 { |
603 aMenuPane->DeleteMenuItem( EFMRadioCmdSaveAllChannels ); |
604 aMenuPane->DeleteMenuItem( EFMRadioCmdSaveAllChannels ); |
604 } |
605 } |
605 |
606 |
|
607 if ( scannedChannelCount < 1) |
|
608 { |
|
609 aMenuPane->SetItemDimmed( EFMRadioCmdSaveChannel, ETrue ); |
|
610 } |
|
611 |
606 // if help is not enabled, disable help option |
612 // if help is not enabled, disable help option |
607 if ( !FeatureManager::FeatureSupported( KFeatureIdHelp ) ) |
613 if ( !FeatureManager::FeatureSupported( KFeatureIdHelp ) ) |
608 { |
614 { |
609 aMenuPane->SetItemDimmed( EAknCmdHelp, ETrue ); |
615 aMenuPane->SetItemDimmed( EAknCmdHelp, ETrue ); |
610 } |
616 } |
1062 // CFMRadioScanLocalStationsContainer::DisplayScanningInProgressNoteL |
1068 // CFMRadioScanLocalStationsContainer::DisplayScanningInProgressNoteL |
1063 // Display a wait note while the channel fill is occuring. |
1069 // Display a wait note while the channel fill is occuring. |
1064 // --------------------------------------------------------- |
1070 // --------------------------------------------------------- |
1065 // |
1071 // |
1066 void CFMRadioScanLocalStationsView::DisplayScanningInProgressNoteL() |
1072 void CFMRadioScanLocalStationsView::DisplayScanningInProgressNoteL() |
1067 { |
1073 { |
1068 iScanningNote = new (ELeave) CAknWaitDialog(REINTERPRET_CAST(CEikDialog**, &iScanningNote)); |
1074 iScanningNote = new ( ELeave ) CAknWaitDialog( reinterpret_cast<CEikDialog**>( &iScanningNote ) ); |
1069 iScanningNote->SetCallback( this ); |
1075 iScanningNote->SetCallback( this ); |
1070 |
1076 |
1071 CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>( iCoeEnv->AppUi() ); |
1077 CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>( iCoeEnv->AppUi() ); |
1072 |
1078 |
1073 if ( appUi->IsStartupWizardRunning() ) |
1079 if ( appUi->IsStartupWizardRunning() ) |
1074 { |
1080 { |
1075 iScanningNote->PrepareLC( R_FMRADIO_SEARCH_STATIONS_WAIT_CANCEL_NOTE ); |
1081 iScanningNote->PrepareLC( R_FMRADIO_SEARCH_STATIONS_WAIT_CANCEL_NOTE ); |
1076 } |
1082 } |
1077 else |
1083 else |
1078 { |
1084 { |
1079 iScanningNote->PrepareLC( R_FMRADIO_SEARCH_STATIONS_WAIT_NOTE ); |
1085 iScanningNote->PrepareLC( R_FMRADIO_SEARCH_STATIONS_WAIT_NOTE ); |
1080 } |
1086 } |
1081 |
1087 |
1082 iScanningNote->RunLD(); |
1088 iScanningNote->RunLD(); |
1083 } |
1089 } |
1084 |
1090 |
1085 // --------------------------------------------------------- |
1091 // --------------------------------------------------------- |
1086 // CFMRadioScanLocalStationsContainer::RemoveScanningInProgressNoteL |
1092 // CFMRadioScanLocalStationsContainer::RemoveScanningInProgressNoteL |
1087 // Remove and destroy the scanning fill note. |
1093 // Remove and destroy the scanning fill note. |
1088 // --------------------------------------------------------- |
1094 // --------------------------------------------------------- |
1089 // |
1095 // |