emailuis/emailui/src/FreestyleEmailUiLauncherGridVisualiser.cpp
branchRCL_3
changeset 12 f5907b1a1053
parent 8 e1b6206813b4
child 16 4ce476e64c59
equal deleted inserted replaced
8:e1b6206813b4 12:f5907b1a1053
   142     iConstructionCompleted = EFalse;
   142     iConstructionCompleted = EFalse;
   143     iDoubleClickLock = EFalse;
   143     iDoubleClickLock = EFalse;
   144     iUiOperationLaunched = EFalse;
   144     iUiOperationLaunched = EFalse;
   145 
   145 
   146     iMailboxDeleter = CFSEmailUiMailboxDeleter::NewL( *iAppUi.GetMailClient(), *this );
   146     iMailboxDeleter = CFSEmailUiMailboxDeleter::NewL( *iAppUi.GetMailClient(), *this );
       
   147 
       
   148     // Create startup timer
       
   149     iStartupCallbackTimer = CFSEmailUiGenericTimer::NewL( this );
       
   150 
   147     }
   151     }
   148 
   152 
   149 // ----------------------------------------------------------------------------
   153 // ----------------------------------------------------------------------------
   150 // CFSEmailUiLauncherGridVisualiser::DoFirstStartL()
   154 // CFSEmailUiLauncherGridVisualiser::DoFirstStartL()
   151 // Purpose of this function is to do first start only when grid is really
   155 // Purpose of this function is to do first start only when grid is really
   292     }
   296     }
   293 
   297 
   294 CFSEmailUiLauncherGridVisualiser::~CFSEmailUiLauncherGridVisualiser()
   298 CFSEmailUiLauncherGridVisualiser::~CFSEmailUiLauncherGridVisualiser()
   295     {
   299     {
   296     FUNC_LOG;
   300     FUNC_LOG;
       
   301     
       
   302     if ( iStartupCallbackTimer )
       
   303     	{
       
   304     	iStartupCallbackTimer->Cancel();
       
   305     	delete iStartupCallbackTimer;
       
   306     	}
       
   307     
   297     iPluginIdIconIdPairs.Reset();
   308     iPluginIdIconIdPairs.Reset();
   298     iIconArray.Close();
   309     iIconArray.Close();
   299     iMailboxRequestIds.Close();
   310     iMailboxRequestIds.Close();
   300     iLauncherItems.ResetAndDestroy();
   311     iLauncherItems.ResetAndDestroy();
   301     iLauncherItemUids.Close();
   312     iLauncherItemUids.Close();
  2675 	// Display the menu.
  2686 	// Display the menu.
  2676 	iStylusPopUpMenu->ShowMenu();
  2687 	iStylusPopUpMenu->ShowMenu();
  2677 	iStylusPopUpMenuLaunched = ETrue;
  2688 	iStylusPopUpMenuLaunched = ETrue;
  2678 	}
  2689 	}
  2679 
  2690 
  2680 
  2691 void CFSEmailUiLauncherGridVisualiser::HandleAppForegroundEventL( TBool aForeground )
  2681 // End of file.
  2692 	{
       
  2693 	CFsEmailUiViewBase::HandleAppForegroundEventL( aForeground );
       
  2694 	// If the view is not visible try to visualise it after a while
       
  2695 	if ( aForeground && ( !iWasActiveControlGroup ) )
       
  2696 		{
       
  2697 		//
       
  2698 		iStartupCallbackTimer->Cancel(); // just in case
       
  2699 		iStartupCallbackTimer->SetPriority( CActive::EPriorityIdle );
       
  2700 		// EPriorityIdle, EPriorityLow, EPriorityStandard 
       
  2701 		iStartupCallbackTimer->Start( 200 );
       
  2702 		}
       
  2703 	}
       
  2704 
       
  2705 // Fire timer callback
       
  2706 void CFSEmailUiLauncherGridVisualiser::TimerEventL( CFSEmailUiGenericTimer* /* aTriggeredTimer */ )
       
  2707 {
       
  2708   // if view is still active then 
       
  2709   if ( ( NULL != iAppUi.CurrentActiveView() ) && ( iAppUi.CurrentActiveView()->Id() == Id() ) )	  
       
  2710 		  {
       
  2711 		  iWasActiveControlGroup = ETrue;
       
  2712 		  HandleAppForegroundEventL( ETrue );
       
  2713 		  }
       
  2714 };
       
  2715