systemsettings/GSAccessoryPlugin/src/gsacctvoutview.cpp
branchRCL_3
changeset 62 924385140d98
parent 13 096dad6e50a9
child 63 c2c61fdca848
equal deleted inserted replaced
58:0818dd463d41 62:924385140d98
     1 /*
     1 /*
     2 * Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). 
     2 * Copyright (c) 2005-2008 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 
   265     TInt currentValue = iServerEngine->TvSystemL();
   266     TInt currentValue = iServerEngine->TvSystemL();
   266 
   267 
   267     // If PALM is not supported only toggle values
   268     // If PALM is not supported, index correction
   268     // pal = 0, palm = 1, ntsc = 2
   269     if( !iModel.PalmSupport() && currentValue )
   269     TInt pal = 0;
   270         {
   270     TInt ntsc = 2;
   271         currentValue--;
   271     if( !iModel.PalmSupport() )
   272         }
   272         {
   273 
   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
       
   281     if ( ShowRadioButtonSettingsPageL(
   274     if ( ShowRadioButtonSettingsPageL(
   282             R_ACC_TV_SYSTEM_SETTING_PAGE,
   275             R_ACC_TV_SYSTEM_SETTING_PAGE,
   283             R_ACC_TV_SYSTEM_SETTING_PAGE_LBX,
   276             iModel.PalmSupport() ?
       
   277                 R_ACC_TV_SYSTEM_SETTING_PAGE_LBX :
       
   278                 R_ACC_TV_SYSTEM_SETTING_PAGE_NO_PALM_LBX,
   284             currentValue ) )
   279             currentValue ) )
   285         {
   280         {
       
   281         if( !iModel.PalmSupport() && currentValue )
       
   282             {
       
   283             //In case PALM support is missing fix the NTSC value index
       
   284             currentValue++;
       
   285             }
       
   286 
   286         iServerEngine->SetTvSystemL( currentValue );
   287         iServerEngine->SetTvSystemL( currentValue );
   287         UpdateListBoxL( EGSSettIdTvSystem );
   288         UpdateListBoxL( EGSSettIdTvSystem );
   288         iSettingChanged = ETrue;
   289         iSettingChanged = ETrue;
   289         }
   290         }
   290     }
   291     }