uifw/AvKon/src/AknAppUi.cpp
branchRCL_3
changeset 16 71dd06cfe933
parent 15 08e69e956a8c
child 18 0aa5fbdfbc30
equal deleted inserted replaced
15:08e69e956a8c 16:71dd06cfe933
     1 /*
     1 /*
     2 * Copyright (c) 2002 - 2008 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2002-2010 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".
   554     {
   554     {
   555     }
   555     }
   556 
   556 
   557 EXPORT_C CAknAppUiBase::~CAknAppUiBase()
   557 EXPORT_C CAknAppUiBase::~CAknAppUiBase()
   558     {
   558     {
       
   559     AknItemActionMenuRegister::RemoveConstructingMenuBarOwner( this );
       
   560 
   559     if (iAppUiBaseExtension)
   561     if (iAppUiBaseExtension)
   560         {
   562         {
   561         MTouchFeedback::DestroyInstance();
   563         MTouchFeedback::DestroyInstance();
   562         iAppUiBaseExtension->iFeedbackAdaptation = NULL;
   564         iAppUiBaseExtension->iFeedbackAdaptation = NULL;
   563         RemoveFromStack( iAppUiBaseExtension->iDiallerLauncher );
   565         RemoveFromStack( iAppUiBaseExtension->iDiallerLauncher );
   659             orientationFlags = value;
   661             orientationFlags = value;
   660             }
   662             }
   661         delete defaultOrientationCr;
   663         delete defaultOrientationCr;
   662         defaultOrientationCr = NULL;
   664         defaultOrientationCr = NULL;
   663         }
   665         }
       
   666 
   664     iAknFlags.Assign(EOrientationSpecified, orientationFlags&EAppOrientationSpecifiedFlag);
   667     iAknFlags.Assign(EOrientationSpecified, orientationFlags&EAppOrientationSpecifiedFlag);
   665     iAknFlags.Assign(EOrientationLandscape, orientationFlags&EAppOrientationLandscapeFlag);
   668     iAknFlags.Assign(EOrientationLandscape, orientationFlags&EAppOrientationLandscapeFlag);
   666     iAknFlags.Assign(EOrientationAutomatic, orientationFlags&EAppOrientationAutomaticFlag);
   669     iAknFlags.Assign(EOrientationAutomatic, orientationFlags&EAppOrientationAutomaticFlag);
   667     iAknFlags.Assign(EMSKEnabled, aAppUiFlags&EAknEnableMSKflag);
   670     iAknFlags.Assign(EMSKEnabled, aAppUiFlags&EAknEnableMSKflag);
   668     iAknFlags.Assign( ESingleClickCompatible,
   671     iAknFlags.Assign( ESingleClickCompatible,
   670 
   673 
   671     if ( aAppUiFlags & EAknTouchCompatibleFlag )
   674     if ( aAppUiFlags & EAknTouchCompatibleFlag )
   672         {
   675         {
   673         iAknFlags.Set( ETouchCompatible );
   676         iAknFlags.Set( ETouchCompatible );
   674         }
   677         }
       
   678     else if ( aAppUiFlags & EAknSingleClickCompatibleFlag )
       
   679         {
       
   680         // If application is single click compatible then it needs to
       
   681         // be also touch compatible, so set that flag also if application
       
   682         // has forgotten.
       
   683         iAknFlags.Set( ETouchCompatible );
       
   684         }
   675     else
   685     else
   676         {
   686         {
       
   687         // Set the touch compatible flag for all applications that
       
   688         // reside on the ROM, since all platform applications should
       
   689         // be touch compatible. 
   677         RProcess process;
   690         RProcess process;
   678         TFileName fileName = process.FileName();
   691         TFileName fileName = process.FileName();
   679         _LIT(KRomDrive,"z:");
   692         _LIT( KRomDrive, "z:" );
   680         
   693         
   681         if ( fileName.FindF( KRomDrive ) == 0 )
   694         if ( fileName.FindF( KRomDrive ) == 0 )
   682             {
   695             {
   683             iAknFlags.Set( ETouchCompatible );
   696             iAknFlags.Set( ETouchCompatible );
   684             }
   697             }