systemsettings/GSAccessoryPlugin/src/gsacctvoutview.cpp
branchRCL_3
changeset 3 096dad6e50a9
parent 0 2e3d3ce01487
child 19 924385140d98
--- a/systemsettings/GSAccessoryPlugin/src/gsacctvoutview.cpp	Fri Mar 12 15:43:21 2010 +0200
+++ b/systemsettings/GSAccessoryPlugin/src/gsacctvoutview.cpp	Mon Mar 15 12:41:10 2010 +0200
@@ -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;