equal
deleted
inserted
replaced
172 CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>( AppUi() ); |
172 CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>( AppUi() ); |
173 switch ( aCommand ) |
173 switch ( aCommand ) |
174 { |
174 { |
175 case EAknSoftkeyBack: // go back to the main view |
175 case EAknSoftkeyBack: // go back to the main view |
176 { |
176 { |
177 const TVwsViewId viewId( TUid::Uid( KUidFMRadioApplication ), Id() ); |
177 appUi->ActivateLocalViewL( KFMRadioChannelListViewId ); |
178 if ( appUi->BackSteppingWrapper().HandleBackCommandL( viewId ) ) |
178 break; |
179 { |
|
180 // Command was consumed |
|
181 break; |
|
182 } |
|
183 // Fall through to activate previous view |
|
184 } |
179 } |
185 case EEikBidCancel: |
180 case EEikBidCancel: |
186 { |
181 { |
187 if ( iFaded ) |
182 if ( iFaded ) |
188 { |
183 { |
1170 limit = chCount; |
1165 limit = chCount; |
1171 } |
1166 } |
1172 |
1167 |
1173 TInt savedChannelCount = 0; |
1168 TInt savedChannelCount = 0; |
1174 |
1169 |
1175 if( aSavingMode == EAppend ) |
1170 if ( aSavingMode == EAppend ) |
1176 { |
1171 { |
1177 /** Append found channels to preset list */ |
1172 /** Append found channels to preset list */ |
1178 for( TInt freqIx = 0; KMaxNumberOfChannelListItems > iObserver.Channels()->Count() && |
1173 for ( TInt freqIx = 0; KMaxNumberOfChannelListItems > iObserver.Channels().Count() && |
1179 chCount > freqIx; freqIx++ ) |
1174 chCount > freqIx; freqIx++ ) |
1180 { |
1175 { |
1181 const TDesC& name = iScannedChannels[ freqIx ]->PresetNameValid() ? |
1176 const TDesC& name = iScannedChannels[ freqIx ]->PresetNameValid() ? |
1182 iScannedChannels[ freqIx ]->PresetName() : KNullDesC; |
1177 iScannedChannels[ freqIx ]->PresetName() : KNullDesC; |
1183 |
1178 |
1184 iObserver.AddChannelToListL( name, |
1179 iObserver.AddChannelToListL( name, |
1185 iScannedChannels[ freqIx ]->PresetFrequency() ); |
1180 iScannedChannels[ freqIx ]->PresetFrequency() ); |
1186 |
1181 |
1187 savedChannelCount++; |
1182 savedChannelCount++; |
1505 // Handle single channel save |
1500 // Handle single channel save |
1506 // -------------------------------------------------------------------------------- |
1501 // -------------------------------------------------------------------------------- |
1507 // |
1502 // |
1508 void CFMRadioScanLocalStationsView::HandleOneChannelSaveL() |
1503 void CFMRadioScanLocalStationsView::HandleOneChannelSaveL() |
1509 { |
1504 { |
1510 TInt currentPresetCount = iObserver.Channels()->Count(); |
1505 TInt currentPresetCount = iObserver.Channels().Count(); |
1511 TInt chIndex = iContainer->CurrentlySelectedChannel(); |
1506 TInt chIndex = iContainer->CurrentlySelectedChannel(); |
1512 TBool continueWithSave = ETrue; |
1507 TBool continueWithSave = ETrue; |
1513 |
1508 |
1514 if ( !ChannelInUse( chIndex ) ) |
1509 if ( !ChannelInUse( chIndex ) ) |
1515 { |
1510 { |
1516 User::Leave( KErrNotFound ); |
1511 User::Leave( KErrNotFound ); |
1517 } |
1512 } |