photosgallery/viewframework/views/listview/src/glxlistviewimp.cpp
branchRCL_3
changeset 13 bcb43dc84c44
parent 12 ce1c7ad1f18b
child 14 2dac0fdba72b
equal deleted inserted replaced
12:ce1c7ad1f18b 13:bcb43dc84c44
    42 #include <glxsetappstate.h>
    42 #include <glxsetappstate.h>
    43 #include <glxthumbnailattributeinfo.h>
    43 #include <glxthumbnailattributeinfo.h>
    44 #include <glxcollectionpluginalbums.hrh>
    44 #include <glxcollectionpluginalbums.hrh>
    45 #include <glxcollectionpluginmonths.hrh>
    45 #include <glxcollectionpluginmonths.hrh>
    46 #include <glxcollectionplugintype.hrh>
    46 #include <glxcollectionplugintype.hrh>
       
    47 #include <glxnavigationalstate.h>
       
    48 
       
    49 #include <AknTransEffect.h>  // For transition effects
       
    50 #include <GfxTransEffect/GfxTransEffect.h>  // For transition effects
       
    51 #include "glxgfxtranseffect.h"  // For transition effects
    47 
    52 
    48 const TInt KListDataWindowSize(25);
    53 const TInt KListDataWindowSize(25);
    49 const TInt KNoOfPages(2);
    54 const TInt KNoOfPages(2);
    50 const TInt KBufferTresholdSize(6);
    55 const TInt KBufferTresholdSize(6);
       
    56 const TInt KGlxCollectionRootLevel = 1;
    51 
    57 
    52 
    58 
    53 // ======== MEMBER FUNCTIONS ========
    59 // ======== MEMBER FUNCTIONS ========
    54 
    60 
    55 // ---------------------------------------------------------------------------
    61 // ---------------------------------------------------------------------------
    56 // C++ default constructor can NOT contain any code that might leave.
    62 // C++ default constructor can NOT contain any code that might leave.
    57 // ---------------------------------------------------------------------------
    63 // ---------------------------------------------------------------------------
    58 //
    64 //
    59 CGlxListViewImp::CGlxListViewImp(TInt aViewUid, const TListViewResourceIds& aResourceIds):        
    65 CGlxListViewImp::CGlxListViewImp(TInt aViewUid,
    60         iViewUid(aViewUid),
    66         const TListViewResourceIds& aResourceIds) :
    61         iResourceIds(aResourceIds)  
    67     iViewUid(aViewUid), iResourceIds(aResourceIds), iIsRefreshNeeded(EFalse),
    62     {
    68     iBackwardNavigation(EFalse), isTnGenerationComplete(ETrue)
    63     }
    69     {
    64 
    70     }
    65 
    71 
    66 // ---------------------------------------------------------------------------
    72 // ---------------------------------------------------------------------------
    67 // Two-phased constructor.
    73 // Two-phased constructor.
    68 // ---------------------------------------------------------------------------
    74 // ---------------------------------------------------------------------------
    69 //
    75 //
   107     TRACER("CGlxListViewImp::ConsrtuctL");
   113     TRACER("CGlxListViewImp::ConsrtuctL");
   108     
   114     
   109     BaseConstructL(iResourceIds.iViewId);
   115     BaseConstructL(iResourceIds.iViewId);
   110     ViewBaseConstructL();
   116     ViewBaseConstructL();
   111     MLViewBaseConstructL(aMediaListFactory, aTitle);
   117     MLViewBaseConstructL(aMediaListFactory, aTitle);
       
   118     
       
   119     // Create navigational state 
       
   120     iNavigationalState = CGlxNavigationalState::InstanceL();
       
   121     iNavigationalState->AddObserverL( *this );
       
   122  
   112     CAknToolbar* toolbar = Toolbar();
   123     CAknToolbar* toolbar = Toolbar();
   113     if(toolbar)
   124     if(toolbar)
   114         {
   125         {
   115         toolbar->DisableToolbarL(ETrue);  
   126         toolbar->DisableToolbarL(ETrue);  
   116         }
   127         }
   117     
   128     
   118     //Register the view to recieve toolbar events. ViewBase handles the events    
   129     //Register the view to recieve toolbar events. ViewBase handles the events    
   119     SetToolbarObserver(this);
   130     SetToolbarObserver(this);
   120     iBackwardNavigation = EFalse;
   131 	iMMCNotifier = CGlxMMCNotifier::NewL(*this);
   121     iIsRefreshNeeded = EFalse;
       
   122 	isTnGenerationComplete = ETrue;
       
   123     }
   132     }
   124 
   133 
   125 // ---------------------------------------------------------------------------
   134 // ---------------------------------------------------------------------------
   126 // Destructor
   135 // Destructor
   127 // ---------------------------------------------------------------------------
   136 // ---------------------------------------------------------------------------
   128 //
   137 //
   129 CGlxListViewImp::~CGlxListViewImp()
   138 CGlxListViewImp::~CGlxListViewImp()
   130     {    
   139     {    
   131     TRACER("CGlxListViewImp::~CGlxListViewImp");
   140     TRACER("CGlxListViewImp::~CGlxListViewImp");
       
   141     delete iMMCNotifier;
       
   142     iMMCNotifier = NULL;
       
   143     
       
   144     if ( iNavigationalState )
       
   145         {
       
   146         iNavigationalState->RemoveObserver(*this);
       
   147         iNavigationalState->Close();
       
   148         }
       
   149     
   132     delete iTitletext;  
   150     delete iTitletext;  
   133     }
   151     }
   134 
   152 
   135 // ---------------------------------------------------------------------------
   153 // ---------------------------------------------------------------------------
   136 // ControlGroupId
   154 // ControlGroupId
   160 //
   178 //
   161 void CGlxListViewImp::DoMLViewActivateL(const TVwsViewId& /* aPrevViewId */, 
   179 void CGlxListViewImp::DoMLViewActivateL(const TVwsViewId& /* aPrevViewId */, 
   162         TUid /* aCustomMessageId */, const TDesC8& /* aCustomMessage */)
   180         TUid /* aCustomMessageId */, const TDesC8& /* aCustomMessage */)
   163     {
   181     {
   164     TRACER("CGlxListViewImp::DoMLViewActivateL");  
   182     TRACER("CGlxListViewImp::DoMLViewActivateL");  
       
   183     
       
   184     TUint transitionID = (iUiUtility->ViewNavigationDirection()==
       
   185           EGlxNavigationForwards)?KActivateTransitionId:KDeActivateTransitionId;
       
   186 
       
   187     GfxTransEffect::BeginFullScreen( transitionID, TRect(),
       
   188                                    AknTransEffect::EParameterType, 
       
   189                          AknTransEffect::GfxTransParam( KPhotosUid, 
       
   190                                  AknTransEffect::TParameter::EEnableEffects) );   
       
   191     GfxTransEffect::EndFullScreen();
       
   192     
   165     iNextViewActivationEnabled = ETrue;
   193     iNextViewActivationEnabled = ETrue;
   166     if(StatusPane())
   194     if(StatusPane())
   167         {
   195         {
   168         StatusPane()->MakeVisible(ETrue);
   196         StatusPane()->MakeVisible(ETrue);
   169         CEikStatusPane* statusPane = iEikonEnv->AppUiFactory()->StatusPane();
   197         CEikStatusPane* statusPane = iEikonEnv->AppUiFactory()->StatusPane();
   211         iBackwardNavigation = ETrue;
   239         iBackwardNavigation = ETrue;
   212         }
   240         }
   213 
   241 
   214     iPreviewTNBinding = CGlxPreviewThumbnailBinding::NewL(*this);
   242     iPreviewTNBinding = CGlxPreviewThumbnailBinding::NewL(*this);
   215     CreateListL();
   243     CreateListL();
   216     if (iPreviewTNBinding)
   244     if (iPreviewTNBinding && iBackwardNavigation && iMediaList->FocusIndex()
   217         {
   245             == 0)
   218         iPopulateListTNs  = ETrue;
   246         {
   219         CMPXCollectionPath* path = iMediaList->PathLC( 
   247         GLX_LOG_INFO("CGlxListViewImp::DoMLViewActivateL() - HandleItemChangedL()");        
   220                 NGlxListDefs::EPathFocusOrSelection );
   248         iPopulateListTNs = ETrue;
   221         iPreviewTNBinding->HandleItemChangedL(*path, 
   249         CMPXCollectionPath* path = iMediaList->PathLC(
   222                 iPopulateListTNs, iIsRefreshNeeded, iBackwardNavigation);
   250                 NGlxListDefs::EPathFocusOrSelection);
   223         CleanupStack::PopAndDestroy( path );        
   251         iPreviewTNBinding->HandleItemChangedL(*path, iPopulateListTNs,
   224         }
   252                 iIsRefreshNeeded, iBackwardNavigation);
   225 
   253         CleanupStack::PopAndDestroy(path);
       
   254         }
       
   255     iProgressIndicator = CGlxProgressIndicator::NewL(*this);
   226     }
   256     }
   227 
   257 
   228 // ---------------------------------------------------------------------------
   258 // ---------------------------------------------------------------------------
   229 // From CAknView
   259 // From CAknView
   230 // View deactivation function.
   260 // View deactivation function.
   443             {
   473             {
   444             delete iProgressIndicator;
   474             delete iProgressIndicator;
   445             iProgressIndicator = NULL;
   475             iProgressIndicator = NULL;
   446             }
   476             }
   447         iProgressIndicator = CGlxProgressIndicator::NewL(*this);
   477         iProgressIndicator = CGlxProgressIndicator::NewL(*this);
       
   478         if(iSchedulerWait)
       
   479             {
       
   480             delete iSchedulerWait;
       
   481             iSchedulerWait = NULL;
       
   482             }
       
   483         iSchedulerWait = new (ELeave) CActiveSchedulerWait();
       
   484         iSchedulerWait->Start();
   448         }
   485         }
   449 #endif
   486 #endif
   450 	if( iNextViewActivationEnabled && ( aIndex >= 0 && aIndex < 
   487 	if( iNextViewActivationEnabled && ( aIndex >= 0 && aIndex < 
   451 	        iMediaList->Count()) && isTnGenerationComplete)
   488 	        iMediaList->Count()) && isTnGenerationComplete )
   452 	    {
   489 	    {
   453 	    	//Delete the PreviewTNMBinding as in forward navigation
   490 	    	//Delete the PreviewTNMBinding as in forward navigation
   454 		//we do not get the medialist callback.
   491 		//we do not get the medialist callback.
   455         delete iPreviewTNBinding;
   492         delete iPreviewTNBinding;
   456         iPreviewTNBinding = NULL;
   493         iPreviewTNBinding = NULL;
   467         
   504         
   468 	    }
   505 	    }
   469     }
   506     }
   470 
   507 
   471 void CGlxListViewImp::PreviewTNReadyL(CFbsBitmap* aBitmap, CFbsBitmap* 
   508 void CGlxListViewImp::PreviewTNReadyL(CFbsBitmap* aBitmap, CFbsBitmap* 
   472         /*aMask*/, TBool aPopulateList)
   509         /*aMask*/)
   473     {
   510     {
   474     TRACER("CGlxListViewImp::PreviewTNReadyL");
   511     TRACER("CGlxListViewImp::PreviewTNReadyL");
   475 
   512 
       
   513     if (!iPopulateListTNs)
       
   514         {
       
   515         GLX_LOG_INFO("CGlxListViewImp::PreviewTNReadyL()- Ignore!");
       
   516         return;
       
   517         }
   476     iPreviewTNBinding->StopTimer();
   518     iPreviewTNBinding->StopTimer();
   477 
   519 
   478 	TInt focusIndex = iMediaList->FocusIndex();
   520 	TInt focusIndex = iMediaList->FocusIndex();
   479     TInt mediaCount = iMediaList->Count();
   521     TInt mediaCount = iMediaList->Count();
   480     iPopulateListTNs = aPopulateList;
   522     GLX_LOG_INFO1("CGlxListViewImp::PreviewTNReadyL() focusIndex(%d)",
   481     
   523             focusIndex);      
       
   524     
       
   525     TGlxIdSpaceId id = iMediaList->IdSpaceId(0);        
   482     if (aBitmap)
   526     if (aBitmap)
   483 	    {	
   527 	    {
   484 	    iList->ItemL(focusIndex).SetIcon(CGulIcon::NewL(aBitmap));
   528         iList->ItemL(focusIndex).SetIcon(CGulIcon::NewL(aBitmap));
   485 	    }
   529         if (id == KGlxIdSpaceIdRoot && focusIndex == EGlxListItemAll)
       
   530             {
       
   531             CFbsBitmap* bitmap = new (ELeave) CFbsBitmap;
       
   532             bitmap->Duplicate(aBitmap->Handle());
       
   533             iList->ItemL(EGlxListItemMonth).SetIcon(CGulIcon::NewL(bitmap));
       
   534             }
       
   535         else if (iBackwardNavigation && id == KGlxIdSpaceIdRoot && focusIndex
       
   536                 == EGlxListItemMonth)
       
   537             {
       
   538             CFbsBitmap* bitmap = new (ELeave) CFbsBitmap;
       
   539             bitmap->Duplicate(aBitmap->Handle());
       
   540             iList->ItemL(EGlxListItemAll).SetIcon(CGulIcon::NewL(bitmap));
       
   541             }
       
   542         }
   486     else
   543     else
   487     	{
   544     	{
       
   545 	    // In main list view, default thumbnails will be set according 
       
   546 	    // to the list items.
   488     	//Displays default thumbnail if aBitmap is NULL 
   547     	//Displays default thumbnail if aBitmap is NULL 
   489         SetDefaultThumbnailL(focusIndex);
   548         SetDefaultThumbnailL(focusIndex);
       
   549         if(id == KGlxIdSpaceIdRoot && focusIndex == EGlxListItemAll)
       
   550             {
       
   551             SetDefaultThumbnailL(EGlxListItemMonth);
       
   552             }
   490     	}
   553     	}
   491     
   554     
   492     TInt firstIndex = iList->FirstIndexOnScreen();
   555     TInt firstIndex = iList->FirstIndexOnScreen();
   493     TInt itemsOnScreen = iList->ItemsOnScreen();
   556     TInt itemsOnScreen = iList->ItemsOnScreen();
   494     TInt lastOnScreen = firstIndex + itemsOnScreen - 1;
   557     TInt lastOnScreen = firstIndex + itemsOnScreen - 1;
   495     if (lastOnScreen > (mediaCount - 1))
   558     if (lastOnScreen > (mediaCount - 1))
   496 	    {
   559 	    {
   497 		lastOnScreen = mediaCount;	    	
   560 		lastOnScreen = mediaCount;	    	
   498 	    }
   561 	    }
   499     
   562     
   500     if (!iPopulateListTNs || focusIndex == lastOnScreen)
   563     GLX_DEBUG2("CGlxListViewImp::PreviewTNReadyL()"
   501         {
   564             " RefreshScreen - focusIndex(%d)", focusIndex);
   502         GLX_DEBUG2("CGlxListViewImp::PreviewTNReadyL()"
   565     iList->RefreshScreen(focusIndex);
   503                " RefreshScreen - focusIndex(%d)", focusIndex);        
       
   504 		iList->RefreshScreen(focusIndex);
       
   505 	    } 
       
   506 	
   566 	
   507 	if (iPopulateListTNs)
   567 	if (iPopulateListTNs)
   508 		{
   568 		{
   509 		if(iStartIndex == KErrNotFound)
   569 		if(iStartIndex == KErrNotFound)
   510 			{
   570 			{
   512 			}
   572 			}
   513 		
   573 		
   514 		TInt count = iMediaList->Count();
   574 		TInt count = iMediaList->Count();
   515 		if(count)
   575 		if(count)
   516 		    {
   576 		    {
   517             TInt focus = (focusIndex+1)%count;
   577             TInt focus = (focusIndex + 1) % count;
       
   578             if (!iBackwardNavigation && id == KGlxIdSpaceIdRoot && focus
       
   579                     == EGlxListItemMonth)
       
   580                 {
       
   581                 focus += 1;
       
   582                 }
   518             if (focus != iStartIndex)
   583             if (focus != iStartIndex)
   519                 {
   584                 {
   520                 iMediaList->SetFocusL(NGlxListDefs::EAbsolute, focus);			
   585                 iMediaList->SetFocusL(NGlxListDefs::EAbsolute, focus);
   521                 }
   586                 }
   522             else
   587             else
   523                 {
   588                 {
   524                 iPopulateListTNs = EFalse;	
   589                 iPopulateListTNs = EFalse;	
   525                 iIsRefreshNeeded = EFalse;
   590                 iIsRefreshNeeded = EFalse;
   545                  */
   610                  */
   546                 if(count==1)
   611                 if(count==1)
   547                     {                        
   612                     {                        
   548                     CMPXCollectionPath* path = iMediaList->PathLC( 
   613                     CMPXCollectionPath* path = iMediaList->PathLC( 
   549                             NGlxListDefs::EPathFocusOrSelection );
   614                             NGlxListDefs::EPathFocusOrSelection );
       
   615                     GLX_LOG_INFO("CGlxListViewImp::PreviewTNReadyL() - HandleItemChangedL()");                    
   550                     iPreviewTNBinding->HandleItemChangedL(*path, 
   616                     iPreviewTNBinding->HandleItemChangedL(*path, 
   551                             iPopulateListTNs, iIsRefreshNeeded, iBackwardNavigation);
   617                             iPopulateListTNs, iIsRefreshNeeded, iBackwardNavigation);
   552                     CleanupStack::PopAndDestroy( path );
   618                     CleanupStack::PopAndDestroy( path );
   553                     }
   619                     }
   554                 }
   620                 }
   562 // 
   628 // 
   563 void CGlxListViewImp::CreateListL()
   629 void CGlxListViewImp::CreateListL()
   564     {
   630     {
   565     TRACER("CGlxListViewImp::CreateListL");
   631     TRACER("CGlxListViewImp::CreateListL");
   566     
   632     
   567 	iPopulateListTNs = ETrue;
       
   568 	iStartIndex = KErrNotFound;
   633 	iStartIndex = KErrNotFound;
   569 	TInt mediaCount = iMediaList->Count();
   634 	TInt mediaCount = iMediaList->Count();
   570     GLX_DEBUG2("CGlxListViewImp::CreateListL() mediaCount=%d", mediaCount);
   635     GLX_DEBUG2("CGlxListViewImp::CreateListL() mediaCount=%d", mediaCount);
   571 	
   636 	
   572 	if (!iList)
   637 	if (!iList)
   627 		TGlxIdSpaceId id = iMediaList->IdSpaceId(0);
   692 		TGlxIdSpaceId id = iMediaList->IdSpaceId(0);
   628 		if((id == KGlxIdSpaceIdRoot) && (mediaCount > 0))
   693 		if((id == KGlxIdSpaceIdRoot) && (mediaCount > 0))
   629 		    {            
   694 		    {            
   630             for (TInt i = 0; i < mediaCount; i++)
   695             for (TInt i = 0; i < mediaCount; i++)
   631                 {
   696                 {
   632                     SetDefaultThumbnailL(i);
   697                 SetDefaultThumbnailL(i);
   633                 }
   698                 }
   634 		    }
   699 		    }
   635         // Set the scrollbar type for albums list
   700         // Set the scrollbar type for albums list
   636         if (path->Id() == KGlxCollectionPluginAlbumsImplementationUid)
   701         if (path->Id() == KGlxCollectionPluginAlbumsImplementationUid)
   637             {
   702             {
   721 // ----------------------------------------------------------------------------
   786 // ----------------------------------------------------------------------------
   722 // HandleAttributesAvailableL
   787 // HandleAttributesAvailableL
   723 // ----------------------------------------------------------------------------
   788 // ----------------------------------------------------------------------------
   724 //	
   789 //	
   725 void CGlxListViewImp::HandleAttributesAvailableL( TInt aItemIndex, 
   790 void CGlxListViewImp::HandleAttributesAvailableL( TInt aItemIndex, 
   726 	const RArray<TMPXAttribute>& aAttributes, MGlxMediaList* /*aList*/ )
   791 	const RArray<TMPXAttribute>& aAttributes, MGlxMediaList* aList)
   727 	{
   792 	{
   728 	TRACER("CGlxListViewImp::HandleAttributesAvailableL");
   793 	TRACER("CGlxListViewImp::HandleAttributesAvailableL");
   729 
   794 
   730 	TMPXAttribute titleAttrib(KMPXMediaGeneralTitle);
   795 	TMPXAttribute titleAttrib(KMPXMediaGeneralTitle);
   731 	TMPXAttribute subTitleAttrib(KGlxMediaCollectionPluginSpecificSubTitle);
   796 	TMPXAttribute subTitleAttrib(KGlxMediaCollectionPluginSpecificSubTitle);
   749 		// iIsRefreshNeeded flag to ETrue		
   814 		// iIsRefreshNeeded flag to ETrue		
   750 		if (!iIsRefreshNeeded && iUiUtility->ViewNavigationDirection()
   815 		if (!iIsRefreshNeeded && iUiUtility->ViewNavigationDirection()
   751 				== EGlxNavigationBackwards)
   816 				== EGlxNavigationBackwards)
   752 			{
   817 			{
   753 			iIsRefreshNeeded = ETrue;
   818 			iIsRefreshNeeded = ETrue;
   754 			iPopulateListTNs = EFalse;
       
   755 			}
   819 			}
   756 
   820 
   757 		// Set iPopulateListTNs to ETrue and refresh all the items in
   821 		// Set iPopulateListTNs to ETrue and refresh all the items in
   758 		// list view if subtitle is updated
   822 		// list view if subtitle is updated
   759 		if (iPreviewTNBinding && !iPopulateListTNs)
   823 		if (iPreviewTNBinding && ((!iPopulateListTNs && aItemIndex
   760 			{
   824                 == aList->Count() - 1) || (iIsRefreshNeeded)))
       
   825             {
   761 			iPopulateListTNs = ETrue;
   826 			iPopulateListTNs = ETrue;
   762 			iStartIndex = KErrNotFound;
   827 			iStartIndex = KErrNotFound;
   763 			CMPXCollectionPath* path = iMediaList->PathLC(
   828 			CMPXCollectionPath* path = iMediaList->PathLC(
   764 					NGlxListDefs::EPathFocusOrSelection);
   829 					NGlxListDefs::EPathFocusOrSelection);
       
   830             GLX_LOG_INFO("CGlxListViewImp::HandleAttributesAvailableL() - HandleItemChangedL()");		
   765 			iPreviewTNBinding->HandleItemChangedL(*path, iPopulateListTNs,
   831 			iPreviewTNBinding->HandleItemChangedL(*path, iPopulateListTNs,
   766 					iIsRefreshNeeded, iBackwardNavigation);
   832 					iIsRefreshNeeded, iBackwardNavigation);
   767 			CleanupStack::PopAndDestroy(path);
   833 			CleanupStack::PopAndDestroy(path);
   768 			}
   834 			}
   769 		}
   835 		}
   777 	TFocusChangeType /*aType*/, TInt /*aNewIndex*/, TInt /*aOldIndex*/,
   843 	TFocusChangeType /*aType*/, TInt /*aNewIndex*/, TInt /*aOldIndex*/,
   778 	MGlxMediaList* /*aList*/ )
   844 	MGlxMediaList* /*aList*/ )
   779 	{
   845 	{
   780 	TRACER( "CGlxListViewImp::HandleFocusChangedL");
   846 	TRACER( "CGlxListViewImp::HandleFocusChangedL");
   781 	 
   847 	 
   782 	if (iPreviewTNBinding)
   848 	if (iPreviewTNBinding && iPopulateListTNs)
   783 		{
   849 		{
   784 		CMPXCollectionPath* path = iMediaList->PathLC( 
   850         CMPXCollectionPath* path = iMediaList->PathLC(
   785 		        NGlxListDefs::EPathFocusOrSelection );
   851                 NGlxListDefs::EPathFocusOrSelection);
   786         iPreviewTNBinding->HandleItemChangedL(*path, 
   852         if (!iBackwardNavigation && path->Levels() == KGlxCollectionRootLevel
   787                 iPopulateListTNs, iIsRefreshNeeded, iBackwardNavigation);
   853                 && path->Id(0) == KGlxCollectionPluginMonthsImplementationUid)
   788 		CleanupStack::PopAndDestroy( path );		
   854             {
   789 		}
   855             CleanupStack::PopAndDestroy(path);
       
   856             return;
       
   857             }
       
   858         GLX_LOG_INFO("CGlxListViewImp::HandleFocusChangedL() - HandleItemChangedL()");        
       
   859         iPreviewTNBinding->HandleItemChangedL(*path, iPopulateListTNs,
       
   860                 iIsRefreshNeeded, iBackwardNavigation);
       
   861         CleanupStack::PopAndDestroy(path);
       
   862         }
   790 	}
   863 	}
   791 
   864 
   792 // ----------------------------------------------------------------------------
   865 // ----------------------------------------------------------------------------
   793 // HandleItemSelected
   866 // HandleItemSelected
   794 // ----------------------------------------------------------------------------
   867 // ----------------------------------------------------------------------------
   959 //	
  1032 //	
   960 void CGlxListViewImp::HandleDialogDismissedL()
  1033 void CGlxListViewImp::HandleDialogDismissedL()
   961     {
  1034     {
   962     TRACER("CGlxListViewImp::HandleDialogDismissedL()");
  1035     TRACER("CGlxListViewImp::HandleDialogDismissedL()");
   963     isTnGenerationComplete = ETrue;
  1036     isTnGenerationComplete = ETrue;
       
  1037     if(iSchedulerWait)
       
  1038         {
       
  1039         iSchedulerWait->AsyncStop();    
       
  1040         delete iSchedulerWait;
       
  1041         iSchedulerWait = NULL;
       
  1042         }
       
  1043     }
       
  1044 
       
  1045 // ---------------------------------------------------------------------------
       
  1046 // HandleMMCInsertionL
       
  1047 // 
       
  1048 // ---------------------------------------------------------------------------
       
  1049 void CGlxListViewImp::HandleMMCInsertionL()
       
  1050     {
       
  1051     TRACER("CGlxListViewImp::HandleMMCInsertionL()");
       
  1052     iMMCState = ETrue;
       
  1053     NavigateToMainListL();
       
  1054     
       
  1055     }
       
  1056 
       
  1057 // ---------------------------------------------------------------------------
       
  1058 // HandleMMCRemovalL
       
  1059 // 
       
  1060 // ---------------------------------------------------------------------------
       
  1061 void CGlxListViewImp::HandleMMCRemovalL()
       
  1062     {
       
  1063     TRACER("CGlxListViewImp::HandleMMCRemovalL()");
       
  1064     ProcessCommandL(EAknSoftkeyExit);
       
  1065     }
       
  1066 
       
  1067 // ---------------------------------------------------------------------------
       
  1068 // HandleForegroundEventL
       
  1069 // 
       
  1070 // ---------------------------------------------------------------------------
       
  1071 void CGlxListViewImp::HandleForegroundEventL(TBool aForeground)
       
  1072     {
       
  1073     TRACER("CGlxListViewImp::HandleForegroundEventL()");
       
  1074     CAknView::HandleForegroundEventL(aForeground);
       
  1075     if(iMMCState)
       
  1076         {
       
  1077         iMMCState = EFalse;
       
  1078         NavigateToMainListL();
       
  1079         }
       
  1080     }
       
  1081 
       
  1082 // ---------------------------------------------------------------------------
       
  1083 // NavigateToMainListL
       
  1084 // 
       
  1085 // ---------------------------------------------------------------------------
       
  1086 void CGlxListViewImp::NavigateToMainListL()
       
  1087     {
       
  1088     TRACER("CGlxListViewImp::NavigateToMainListL()");
       
  1089     CMPXCollectionPath* naviState = iNavigationalState->StateLC();
       
  1090     GLX_LOG_INFO1("From listview level = %d",naviState->Levels());
       
  1091 //    if ( naviState->Levels() >= 1)
       
  1092         {
       
  1093         ProcessCommandL(EAknSoftkeyClose);
       
  1094         }
       
  1095     CleanupStack::PopAndDestroy(naviState);
   964     }
  1096     }
   965 //  End of File
  1097 //  End of File