emailuis/emailui/src/FreestyleEmailUiSettingsListView.cpp
branchRCL_3
changeset 52 efd4f1afd43e
parent 26 67369d1b217f
equal deleted inserted replaced
29:6b8f3b30d0ec 52:efd4f1afd43e
    85    	if ( iStylusPopUpMenu )
    85    	if ( iStylusPopUpMenu )
    86    		{
    86    		{
    87    		delete iStylusPopUpMenu;
    87    		delete iStylusPopUpMenu;
    88    		iStylusPopUpMenu = NULL;
    88    		iStylusPopUpMenu = NULL;
    89    		}
    89    		}
       
    90    	
       
    91    	delete iCoeControl;
    90 	}
    92 	}
    91 
    93 
    92 
    94 
    93 // ---------------------------------------------------------------------------
    95 // ---------------------------------------------------------------------------
    94 // Symbian two-phase constructor.
    96 // Symbian two-phase constructor.
   177     	iStylusPopUpMenu->SetPosition( aPosition, CAknStylusPopUpMenu::EPositionTypeLeftBottom );
   179     	iStylusPopUpMenu->SetPosition( aPosition, CAknStylusPopUpMenu::EPositionTypeLeftBottom );
   178     	iStylusPopUpMenu->ShowMenu();
   180     	iStylusPopUpMenu->ShowMenu();
   179     	}
   181     	}
   180 	}
   182 	}
   181 
   183 
       
   184 // -----------------------------------------------------------------------------
       
   185 // CFsEmailSettingsListView::HideStylusPopUpMenu()
       
   186 // Hides the pop-up menu.
       
   187 // -----------------------------------------------------------------------------
       
   188 //
       
   189 void CFsEmailSettingsListView::HideStylusPopUpMenu()
       
   190     {
       
   191     if ( iStylusPopUpMenu )
       
   192         {
       
   193         TRAP_IGNORE( iStylusPopUpMenu->HandleControlEventL( iCoeControl,
       
   194                         MCoeControlObserver::EEventRequestExit ) );
       
   195         }
       
   196     }
   182 
   197 
   183 // -----------------------------------------------------------------------------
   198 // -----------------------------------------------------------------------------
   184 // CFsEmailSettingsListView::DisplayCreateQuery
   199 // CFsEmailSettingsListView::DisplayCreateQuery
   185 // -----------------------------------------------------------------------------
   200 // -----------------------------------------------------------------------------
   186 //
   201 //
   295             iFsEmailSettingsList->PageDown();
   310             iFsEmailSettingsList->PageDown();
   296             break;
   311             break;
   297         	}
   312         	}
   298         case KErrCancel:
   313         case KErrCancel:
   299         	{
   314         	{
   300         	// The pop-up menu was cancelled.
   315         	if ( iFsEmailSettingsList )
   301         	iFsEmailSettingsList->ClearFocus();
   316         	    {
       
   317                 // The pop-up menu was cancelled.
       
   318                 iFsEmailSettingsList->ClearFocus();
       
   319         	    }
   302         	break;
   320         	break;
   303         	}
   321         	}
   304 		default:
   322 		default:
   305 			{
   323 			{
   306 			break;
   324 			break;
   462 			iFsEmailSettingsList->CreateAccountListL();
   480 			iFsEmailSettingsList->CreateAccountListL();
   463 			}
   481 			}
   464 		}
   482 		}
   465 	// setup status pane title
   483 	// setup status pane title
   466     SetupStatusPaneL();
   484     SetupStatusPaneL();
       
   485     
       
   486     if ( !iCoeControl )
       
   487         {
       
   488         // dymmy control for closing stylus pop up menu
       
   489         iCoeControl = new( ELeave )CCoeControl;
       
   490         }
   467 
   491 
   468     if( !iStylusPopUpMenu )
   492     if( !iStylusPopUpMenu )
   469         {
   493         {
   470         // Construct the long tap pop-up menu.
   494         // Construct the long tap pop-up menu.
   471         TPoint point( 0, 0 );
   495         TPoint point( 0, 0 );
   529 // DynInitMenuPaneL
   553 // DynInitMenuPaneL
   530 // From CAknView.
   554 // From CAknView.
   531 // ---------------------------------------------------------------------------
   555 // ---------------------------------------------------------------------------
   532 //
   556 //
   533 void CFsEmailSettingsListView::DynInitMenuPaneL( 
   557 void CFsEmailSettingsListView::DynInitMenuPaneL( 
   534 		TInt aResourceId, 
   558         TInt aResourceId, 
   535 		CEikMenuPane* aMenuPane )
   559         CEikMenuPane* aMenuPane )
   536 	{
   560     {
   537     FUNC_LOG;
   561     FUNC_LOG;
   538 
   562 
   539 	if ( iFsEmailSettingsList && aResourceId == R_FS_EMAIL_SETTINGS_LIST_MENU_PANE )
   563     if ( iFsEmailSettingsList && aResourceId == R_FS_EMAIL_SETTINGS_LIST_MENU_PANE )
   540 		{
   564         {
   541 		
   565         aMenuPane->SetItemDimmed( EFsEmailUiCmdSettingsRemoveAccount, ETrue );
   542 	    if ( FeatureManager::FeatureSupported( KFeatureIdFfCmailIntegration ) )
   566 
   543 		   {
   567         if ( FeatureManager::FeatureSupported( KFeatureIdFfCmailIntegration ) )
   544 		   // remove help support in pf5250
   568            {
   545 		   aMenuPane->SetItemDimmed( EFsEmailUiCmdHelp, ETrue);      
   569            // remove help support in pf5250
   546 		   }
   570            aMenuPane->SetItemDimmed( EFsEmailUiCmdHelp, ETrue);      
   547 	    		
   571            }
       
   572         
   548         TInt lastIndex = iFsEmailSettingsList->Count()-1;
   573         TInt lastIndex = iFsEmailSettingsList->Count()-1;
   549 		// Dimm add/remove in 2nd level
   574         // Dimm add/remove in 2nd level
   550         if ( iFsEmailSettingsList->Get2ndLevelListIndicator() )
   575         if ( iFsEmailSettingsList->Get2ndLevelListIndicator() )
   551             {
   576             {
   552             aMenuPane->SetItemDimmed(EFsEmailUiCmdSettingsAddAccount, ETrue );
   577             aMenuPane->SetItemDimmed(EFsEmailUiCmdSettingsAddAccount, ETrue );
   553             aMenuPane->SetItemDimmed( EFsEmailUiCmdSettingsRemoveAccount, ETrue );
       
   554             }
   578             }
   555 		// Else dimm remove mailbox if no mailbox selected 
   579         }
   556 		else if ( iFsEmailSettingsList->ListBox()->CurrentItemIndex() == 0
   580 
   557 			|| ( iFsEmailSettingsList->ListBox()->CurrentItemIndex() == lastIndex
   581     // Add shortcut hints
   558 			&& iFsEmailSettingsList->PIMSyncItemVisible())  )
   582     iAppUi.ShortcutBinding().AppendShortcutHintsL( *aMenuPane, 
   559 			{
   583                                  CFSEmailUiShortcutBinding::EContextSettings );
   560 			aMenuPane->SetItemDimmed( EFsEmailUiCmdSettingsRemoveAccount, ETrue );
   584     }
   561 			}
       
   562 		}
       
   563 
       
   564 	// Add shortcut hints
       
   565 	iAppUi.ShortcutBinding().AppendShortcutHintsL( *aMenuPane, 
       
   566 	                             CFSEmailUiShortcutBinding::EContextSettings );	
       
   567 	}
       
   568 
   585 
   569 // ---------------------------------------------------------------------------
   586 // ---------------------------------------------------------------------------
   570 // SetupStatusPaneL()
   587 // SetupStatusPaneL()
   571 // 
   588 // 
   572 // ---------------------------------------------------------------------------
   589 // ---------------------------------------------------------------------------