Revision: 201003 RCL_3 PDK_3.0.h
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Fri, 19 Feb 2010 22:51:16 +0200
branchRCL_3
changeset 3 42dc287846be
parent 0 f3d95d9c00ab
child 5 108d9820af01
Revision: 201003 Kit: 201007
fmradio/fmradio/inc/fmradiochannellistcontainer.h
fmradio/fmradio/src/fmradioappui.cpp
fmradio/fmradio/src/fmradiochannellistcontainer.cpp
fmradio/fmradio/src/fmradiochannellistview.cpp
fmradio/help/data/xhtml.zip
fmradio/help/inc/radio.hlp.hrh
--- a/fmradio/fmradio/inc/fmradiochannellistcontainer.h	Tue Feb 02 00:17:10 2010 +0200
+++ b/fmradio/fmradio/inc/fmradiochannellistcontainer.h	Fri Feb 19 22:51:16 2010 +0200
@@ -228,6 +228,8 @@
         MChannelListHandler& iObserver;
         // not owned
         CFMRadioChannelListView* iChannelView;
+        // flag for rocker key move activation
+        TBool iKeyMoveActivated;
     };
 
 #endif
--- a/fmradio/fmradio/src/fmradioappui.cpp	Tue Feb 02 00:17:10 2010 +0200
+++ b/fmradio/fmradio/src/fmradioappui.cpp	Fri Feb 19 22:51:16 2010 +0200
@@ -69,8 +69,6 @@
 #endif
 // CONSTANTS 
 
-const TInt KMaxAlfredFrameRate = 25; 
-
 // ---------------------------------------------------------------------------------
 // CFMInformationNote::CFMInformationNote
 // ---------------------------------------------------------------------------------
@@ -185,8 +183,7 @@
 	UpdateLandscapeInformation();	
 	
 	// Create alfred environment
-	iAlfEnv = CAlfEnv::NewL();
-	iAlfEnv->SetMaxFrameRate( KMaxAlfredFrameRate );
+    iAlfEnv = CAlfEnv::NewL();
 	
 	// Create alfred display
 	TRect rect;
--- a/fmradio/fmradio/src/fmradiochannellistcontainer.cpp	Tue Feb 02 00:17:10 2010 +0200
+++ b/fmradio/fmradio/src/fmradiochannellistcontainer.cpp	Fri Feb 19 22:51:16 2010 +0200
@@ -527,6 +527,7 @@
         case EKeyUpArrow:
         	if ( iMoveAction )	
         		{
+                iKeyMoveActivated = ETrue;
         		MoveUpL();
 	            }
         	else
@@ -541,6 +542,7 @@
         case EKeyDownArrow:
         	if ( iMoveAction )	
         		{
+                iKeyMoveActivated = ETrue;
         		MoveDownL();
 	            }
         	else
@@ -638,11 +640,11 @@
 //
 void CFMRadioChannelListContainer::ActivateMoveL()
     {
-    
     iMoveAction = ETrue;
     iMoveIndex = iChannelList->CurrentItemIndex();
     iTouchMoveIndex = iMoveIndex;
     UpdateItemIconL( iMoveIndex, KMoveIconIndexChList );
+    iKeyMoveActivated = EFalse;;
 	}
 
 // ---------------------------------------------------------
@@ -926,32 +928,33 @@
 // ---------------------------------------------------------
 //
 TBool CFMRadioChannelListContainer::MoveCanceledL()
-	{
-	TBool wasmove = EFalse;
-	
-	if ( iMoveAction )
-		{
-		iMoveAction = EFalse;
-		
-		TInt index = iChannelList->CurrentItemIndex();
-		
-		HBufC* channelItem = HBufC::NewLC( KLengthOfChannelItemString );
-		channelItem->Des().Copy( iChannelItemArray->MdcaPoint( index ) );
-		TPtr ptr( channelItem->Des() );	
-		
-		TBuf<KLengthOfChannelItemIconIndexString> textChIconIndex;
-		TPtrC iconIndexPtr( textChIconIndex );
-	  	TInt err = TextUtils::ColumnText( iconIndexPtr, 3, &ptr );
-		iChannelItemArray->Delete( index );
-	    iChannelList->HandleItemRemovalL();
-	    
-	    iChannelItemArray->InsertL( iMoveIndex, *channelItem );
-	    iChannelList->HandleItemAdditionL();
-	    iChannelList->SetCurrentItemIndex( iMoveIndex );	    
-        CleanupStack::PopAndDestroy( channelItem );
+    {
+    TBool wasmove = EFalse;
+    
+    if ( iMoveAction )
+        {
+        HideIconsL();
+        iMoveAction = EFalse;
         
-        iChannelList->ScrollToMakeItemVisible( index );
-        HideIconsL();
+        if ( iKeyMoveActivated )
+            {
+			TInt index = iChannelList->CurrentItemIndex();
+            HBufC* channelItem = HBufC::NewLC( KLengthOfChannelItemString );
+            channelItem->Des().Copy( iChannelItemArray->MdcaPoint( index ) );
+            TPtr ptr( channelItem->Des() );	
+            
+            TBuf<KLengthOfChannelItemIconIndexString> textChIconIndex;
+            TPtrC iconIndexPtr( textChIconIndex );
+            TInt err = TextUtils::ColumnText( iconIndexPtr, 3, &ptr );
+            iChannelItemArray->Delete( index );
+            iChannelList->HandleItemRemovalL();
+            
+            iChannelItemArray->InsertL( iMoveIndex, *channelItem );
+            iChannelList->HandleItemAdditionL();
+            iChannelList->SetCurrentItemIndex( iMoveIndex );
+            CleanupStack::PopAndDestroy( channelItem );
+            iChannelList->ScrollToMakeItemVisible( index );
+            }
         iChannelList->UpdateScrollBarsL();
         iChannelList->DrawDeferred();
         wasmove = ETrue;
--- a/fmradio/fmradio/src/fmradiochannellistview.cpp	Tue Feb 02 00:17:10 2010 +0200
+++ b/fmradio/fmradio/src/fmradiochannellistview.cpp	Fri Feb 19 22:51:16 2010 +0200
@@ -660,41 +660,60 @@
 // state of application data.
 // ---------------------------------------------------------------------------
 //
-void CFMRadioChannelListView::DynInitMenuPaneL(
-    TInt aResourceId,
-    CEikMenuPane* aMenuPane )
+void CFMRadioChannelListView::DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane )
     {
     if ( aResourceId == R_FMRADIO_CH_LIST_OPTIONS_MENU ) // Main menu
         {
         if ( iRadioEngine->IsAudioRoutingPossible() )
-        	{        		        	        
-	        if ( iRadioEngine->GetAudioOutput() == CRadioEngine::EFMRadioOutputIHF )
-	            {
-	            // Delete existing menu option and add a new one
-	            aMenuPane->DeleteMenuItem( EFMRadioCmdActivateIhf );
-	            if ( iRadioEngine->IsHeadsetConnected() )
-	                {
-	                aMenuPane->SetItemTextL( EFMRadioCmdDeactivateIhf,R_QTN_FMRADIO_OPTIONS_DEACTIVATE );
-	                }
-	            }
-	        else
-	            {
-	            // Delete existing menu option and add a new one
-	            aMenuPane->DeleteMenuItem( EFMRadioCmdDeactivateIhf );
-	            aMenuPane->SetItemTextL( EFMRadioCmdActivateIhf,R_QTN_FMRADIO_OPTIONS_ACTIVATE );
-	            }
-        	}
-		else
-			{
-			aMenuPane->SetItemDimmed( EFMRadioCmdDeactivateIhf, ETrue );	
-			aMenuPane->SetItemDimmed( EFMRadioCmdActivateIhf, ETrue );
-			}         	
+            {
+            if ( iRadioEngine->GetAudioOutput() == CRadioEngine::EFMRadioOutputIHF )
+                {
+                // Delete existing menu option and add a new one
+                aMenuPane->DeleteMenuItem( EFMRadioCmdActivateIhf );
+                if ( iRadioEngine->IsHeadsetConnected() )
+                    {
+                    aMenuPane->SetItemTextL( EFMRadioCmdDeactivateIhf, R_QTN_FMRADIO_OPTIONS_DEACTIVATE );
+                    }
+                }
+            else
+                {
+                // Delete existing menu option and add a new one
+                aMenuPane->DeleteMenuItem( EFMRadioCmdDeactivateIhf );
+                aMenuPane->SetItemTextL( EFMRadioCmdActivateIhf, R_QTN_FMRADIO_OPTIONS_ACTIVATE );
+                }
+            }
+        else
+            {
+            aMenuPane->SetItemDimmed( EFMRadioCmdDeactivateIhf, ETrue );
+            aMenuPane->SetItemDimmed( EFMRadioCmdActivateIhf, ETrue );
+            }
         
         // if help is not enabled, disable help option
         if ( !FeatureManager::FeatureSupported( KFeatureIdHelp ) )
             {
             aMenuPane->SetItemDimmed( EAknCmdHelp, ETrue );
             }
+        
+        // don't show stylus pop-up menu during move operation
+        if ( iObserver.Channels()->Count() > 1 && !iMoveMode )
+            {
+            aMenuPane->SetItemDimmed( EFMRadioCmdMove, EFalse );
+            }
+        else
+            {
+            aMenuPane->SetItemDimmed( EFMRadioCmdMove, ETrue );
+            }
+        
+        if ( iMoveMode )
+            {
+            aMenuPane->SetItemDimmed( EFMRadioCmdRename, ETrue );
+            aMenuPane->SetItemDimmed( EFMRadioCmdErase, ETrue );
+            }
+        else
+            {
+            aMenuPane->SetItemDimmed( EFMRadioCmdRename, EFalse );
+            aMenuPane->SetItemDimmed( EFMRadioCmdErase, EFalse );
+            }
         }
     }
 
Binary file fmradio/help/data/xhtml.zip has changed
--- a/fmradio/help/inc/radio.hlp.hrh	Tue Feb 02 00:17:10 2010 +0200
+++ b/fmradio/help/inc/radio.hlp.hrh	Fri Feb 19 22:51:16 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* Copyright (c) 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"