systemsettings/GSAccessoryPlugin/src/gsacctvoutview.cpp
branchRCL_3
changeset 63 c2c61fdca848
parent 62 924385140d98
equal deleted inserted replaced
62:924385140d98 63:c2c61fdca848
     1 /*
     1 /*
     2 * Copyright (c) 2005-2008 Nokia Corporation and/or its subsidiary(-ies). 
     2 * Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). 
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
   260 // ---------------------------------------------------------------------------
   260 // ---------------------------------------------------------------------------
   261 //
   261 //
   262 void CGSAccTvoutView::ChangeTvSystemSettingL()
   262 void CGSAccTvoutView::ChangeTvSystemSettingL()
   263     {
   263     {
   264     FUNC_LOG;
   264     FUNC_LOG;
   265 
       
   266     TInt currentValue = iServerEngine->TvSystemL();
   265     TInt currentValue = iServerEngine->TvSystemL();
   267 
   266 
   268     // If PALM is not supported, index correction
   267     // If PALM is not supported only toggle values
   269     if( !iModel.PalmSupport() && currentValue )
   268     // pal = 0, palm = 1, ntsc = 2
   270         {
   269     TInt pal = 0;
   271         currentValue--;
   270     TInt ntsc = 2;
   272         }
   271     if( !iModel.PalmSupport() )
   273 
   272         {
       
   273         iServerEngine->SetTvSystemL( currentValue == pal ? ntsc : pal );
       
   274         UpdateListBoxL( EGSSettIdTvSystem );
       
   275         iSettingChanged = ETrue;
       
   276         return;
       
   277         }
       
   278 
       
   279     // otherwise when palm is supported and more than two options
       
   280     // available show the dialog
   274     if ( ShowRadioButtonSettingsPageL(
   281     if ( ShowRadioButtonSettingsPageL(
   275             R_ACC_TV_SYSTEM_SETTING_PAGE,
   282             R_ACC_TV_SYSTEM_SETTING_PAGE,
   276             iModel.PalmSupport() ?
   283             R_ACC_TV_SYSTEM_SETTING_PAGE_LBX,
   277                 R_ACC_TV_SYSTEM_SETTING_PAGE_LBX :
       
   278                 R_ACC_TV_SYSTEM_SETTING_PAGE_NO_PALM_LBX,
       
   279             currentValue ) )
   284             currentValue ) )
   280         {
   285         {
   281         if( !iModel.PalmSupport() && currentValue )
       
   282             {
       
   283             //In case PALM support is missing fix the NTSC value index
       
   284             currentValue++;
       
   285             }
       
   286 
       
   287         iServerEngine->SetTvSystemL( currentValue );
   286         iServerEngine->SetTvSystemL( currentValue );
   288         UpdateListBoxL( EGSSettIdTvSystem );
   287         UpdateListBoxL( EGSSettIdTvSystem );
   289         iSettingChanged = ETrue;
   288         iSettingChanged = ETrue;
   290         }
   289         }
   291     }
   290     }