equal
deleted
inserted
replaced
192 // |
192 // |
193 // --------------------------------------------------------------------------- |
193 // --------------------------------------------------------------------------- |
194 // |
194 // |
195 void CGSConnSettingsPlugin::DoDeactivate() |
195 void CGSConnSettingsPlugin::DoDeactivate() |
196 { |
196 { |
197 //Save current settings when we leave the view |
197 CGSBaseView::DoDeactivate(); |
|
198 } |
|
199 |
|
200 // --------------------------------------------------------------------------- |
|
201 // CGSConnSettingsPlugin:: HandleForegroundEventL |
|
202 // |
|
203 // |
|
204 // --------------------------------------------------------------------------- |
|
205 // |
|
206 void CGSConnSettingsPlugin::HandleForegroundEventL( TBool aForeground ) |
|
207 { |
|
208 //Load saved settings from Connection Settings API |
198 //If function leaves it is trapped and ignored as there is nothing that we can do about it |
209 //If function leaves it is trapped and ignored as there is nothing that we can do about it |
199 if ( iModel ) |
210 if ( iModel && aForeground ) |
200 { |
211 { |
201 TRAP_IGNORE(iModel->SaveSettingsL()); |
212 TRAP_IGNORE( iModel->LoadSettingsL() ); |
202 } |
213 UpdateListBoxL( EGSSettIdDataUsageHomeNw ); |
203 CGSBaseView::DoDeactivate(); |
214 } |
204 } |
215 } |
205 |
216 |
206 // ---------------------------------------------------------------------------- |
217 // ---------------------------------------------------------------------------- |
207 // CGSConnSettingsPlugin::HandleCommandL |
218 // CGSConnSettingsPlugin::HandleCommandL |
208 // |
219 // |
371 // ----------------------------------------------------------------------------- |
382 // ----------------------------------------------------------------------------- |
372 // |
383 // |
373 void CGSConnSettingsPlugin::GetHelpContext( TCoeHelpContext& aContext ) |
384 void CGSConnSettingsPlugin::GetHelpContext( TCoeHelpContext& aContext ) |
374 { |
385 { |
375 aContext.iMajor = KUidGS; |
386 aContext.iMajor = KUidGS; |
376 aContext.iContext = KCP_HLP_ADMINISTRATIVE_SETTINGS; |
387 aContext.iContext = KHLP_OCC_CONN_SETTINGS; |
377 } |
388 } |
378 |
389 |
379 // --------------------------------------------------------------------------- |
390 // --------------------------------------------------------------------------- |
380 // CGSConnSettingsPlugin::GetCaptionL() |
391 // CGSConnSettingsPlugin::GetCaptionL() |
381 // |
392 // |
464 |
475 |
465 if( currentItem != oldItem ) |
476 if( currentItem != oldItem ) |
466 { |
477 { |
467 iModel->SetUsageOfWlan( currentItem ); |
478 iModel->SetUsageOfWlan( currentItem ); |
468 UpdateListBoxL( EGSSettIdUsageOfWlan ); |
479 UpdateListBoxL( EGSSettIdUsageOfWlan ); |
|
480 //Save current settings when the setting is changed |
|
481 //If function leaves it is trapped and ignored as there is nothing that we can do about it |
|
482 TRAP_IGNORE(iModel->SaveSettingsL()); |
469 } |
483 } |
470 } |
484 } |
471 |
485 |
472 CleanupStack::PopAndDestroy( items ); |
486 CleanupStack::PopAndDestroy( items ); |
473 |
487 |
507 |
521 |
508 if( currentItem != oldItem ) |
522 if( currentItem != oldItem ) |
509 { |
523 { |
510 iModel->SetDataUsageAbroad( currentItem ); |
524 iModel->SetDataUsageAbroad( currentItem ); |
511 UpdateListBoxL( EGSSettIdDataUsageAbroad ); |
525 UpdateListBoxL( EGSSettIdDataUsageAbroad ); |
|
526 //Save current settings when the setting is changed |
|
527 //If function leaves it is trapped and ignored as there is nothing that we can do about it |
|
528 TRAP_IGNORE(iModel->SaveSettingsL()); |
512 } |
529 } |
513 } |
530 } |
514 CleanupStack::PopAndDestroy( items ); |
531 CleanupStack::PopAndDestroy( items ); |
515 } |
532 } |
516 |
533 |
548 |
565 |
549 if( currentItem != oldItem ) |
566 if( currentItem != oldItem ) |
550 { |
567 { |
551 iModel->SetDataUsageInHomeNw( currentItem ); |
568 iModel->SetDataUsageInHomeNw( currentItem ); |
552 UpdateListBoxL( EGSSettIdDataUsageHomeNw ); |
569 UpdateListBoxL( EGSSettIdDataUsageHomeNw ); |
|
570 //Save current settings when the setting is changed |
|
571 //If function leaves it is trapped and ignored as there is nothing that we can do about it |
|
572 TRAP_IGNORE(iModel->SaveSettingsL()); |
553 } |
573 } |
554 } |
574 } |
555 CleanupStack::PopAndDestroy( items ); |
575 CleanupStack::PopAndDestroy( items ); |
556 } |
576 } |
557 |
577 |