systemsettings/GSAccessoryPlugin/src/gsacctvoutview.cpp
branchRCL_3
changeset 20 c2c61fdca848
parent 19 924385140d98
--- a/systemsettings/GSAccessoryPlugin/src/gsacctvoutview.cpp	Tue Aug 31 15:24:25 2010 +0300
+++ b/systemsettings/GSAccessoryPlugin/src/gsacctvoutview.cpp	Wed Sep 01 12:24:48 2010 +0100
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2005-2008 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies). 
 * All rights reserved.
 * This component and the accompanying materials are made available
 * under the terms of "Eclipse Public License v1.0"
@@ -262,28 +262,27 @@
 void CGSAccTvoutView::ChangeTvSystemSettingL()
     {
     FUNC_LOG;
-
     TInt currentValue = iServerEngine->TvSystemL();
 
-    // If PALM is not supported, index correction
-    if( !iModel.PalmSupport() && currentValue )
+    // If PALM is not supported only toggle values
+    // pal = 0, palm = 1, ntsc = 2
+    TInt pal = 0;
+    TInt ntsc = 2;
+    if( !iModel.PalmSupport() )
         {
-        currentValue--;
+        iServerEngine->SetTvSystemL( currentValue == pal ? ntsc : pal );
+        UpdateListBoxL( EGSSettIdTvSystem );
+        iSettingChanged = ETrue;
+        return;
         }
 
+    // otherwise when palm is supported and more than two options
+    // available show the dialog
     if ( ShowRadioButtonSettingsPageL(
             R_ACC_TV_SYSTEM_SETTING_PAGE,
-            iModel.PalmSupport() ?
-                R_ACC_TV_SYSTEM_SETTING_PAGE_LBX :
-                R_ACC_TV_SYSTEM_SETTING_PAGE_NO_PALM_LBX,
+            R_ACC_TV_SYSTEM_SETTING_PAGE_LBX,
             currentValue ) )
         {
-        if( !iModel.PalmSupport() && currentValue )
-            {
-            //In case PALM support is missing fix the NTSC value index
-            currentValue++;
-            }
-
         iServerEngine->SetTvSystemL( currentValue );
         UpdateListBoxL( EGSSettIdTvSystem );
         iSettingChanged = ETrue;