Revision: 201009 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 15 Mar 2010 12:40:30 +0200
branchRCL_3
changeset 14 ce1c7ad1f18b
parent 13 71da52165949
child 18 bcb43dc84c44
Revision: 201009 Kit: 201010
photos_plat/gallery_utilities_api/inc/glxcollectionpluginpriority.hrh
photosgallery/collectionframework/datasource/manager/src/glxrequest.cpp
photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcemds.h
photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcemds.cpp
photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmds.cpp
photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdsattribute.cpp
photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdscommand.cpp
photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdsthumbnail.cpp
photosgallery/commonui/src/glxnavigationalstate.cpp
photosgallery/controllers/imageviewer/bwins/glximageviewermanageru.def
photosgallery/controllers/imageviewer/eabi/glximageviewermanageru.def
photosgallery/controllers/imageviewer/group/glximageviewermanager.mmp
photosgallery/controllers/imageviewer/inc/glximageviewermanager.h
photosgallery/controllers/imageviewer/src/glximageviewermanager.cpp
photosgallery/icons/iconlist.txt
photosgallery/slideshow/engine/controlsrc/shweffectcontrol.cpp
photosgallery/slideshow/engine/effectsrc/shwcrossfadeeffect.cpp
photosgallery/slideshow/engine/effectsrc/shwcrossfadelayout.cpp
photosgallery/slideshow/engine/effectsrc/shwcurvefactory.cpp
photosgallery/slideshow/engine/effectsrc/shwzoomandpaneffect.cpp
photosgallery/slideshow/engine/effectsrc/shwzoomandpanlayout.cpp
photosgallery/slideshow/view/group/shwslideshowviewplugin.mmp
photosgallery/slideshow/view/inc/shwslideshowview.h
photosgallery/slideshow/view/src/shwgesturecontrol.cpp
photosgallery/slideshow/view/src/shwslideshowkeyhandler.cpp
photosgallery/slideshow/view/src/shwslideshowview.cpp
photosgallery/viewframework/commandhandlers/commandhandlerbase/src/glxmedialistcommandhandler.cpp
photosgallery/viewframework/commandhandlers/commandhandlerbase/src/glxmpxcommandcommandhandler.cpp
photosgallery/viewframework/commandhandlers/commoncommandhandlers/group/glxcommoncommandhandlers.mmp
photosgallery/viewframework/commandhandlers/commoncommandhandlers/inc/glxcommandhandleraiwassign.h
photosgallery/viewframework/commandhandlers/commoncommandhandlers/inc/glxcommandhandleraiwedit.h
photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandleraiwassign.cpp
photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandleraiwbase.cpp
photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandleraiwedit.cpp
photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandleraiwshowmap.cpp
photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandleraiwshowonmaphardkey.cpp
photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlerback.cpp
photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlerdetails.cpp
photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlerrotate.cpp
photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlersend.cpp
photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlerslideshow.cpp
photosgallery/viewframework/dataprovider/src/glxmulmodelproviderbase.cpp
photosgallery/viewframework/dataprovider/src/glxthumbnailvarianttype.cpp
photosgallery/viewframework/drmutility/bwins/glxdrmutilityu.def
photosgallery/viewframework/drmutility/eabi/glxdrmutilityu.def
photosgallery/viewframework/drmutility/inc/glxdrmutility.h
photosgallery/viewframework/drmutility/src/glxdrmutility.cpp
photosgallery/viewframework/medialists/inc/glxcachemanager.h
photosgallery/viewframework/medialists/inc/glximagereader.h
photosgallery/viewframework/medialists/src/glxcachemanager.cpp
photosgallery/viewframework/medialists/src/glximagereader.cpp
photosgallery/viewframework/medialists/src/glxmedialist.cpp
photosgallery/viewframework/texturemanager/bwins/glxtexturemanageru.def
photosgallery/viewframework/texturemanager/eabi/glxtexturemanageru.def
photosgallery/viewframework/texturemanager/inc/glxtexturemanager.h
photosgallery/viewframework/texturemanager/inc/glxtexturemanagerimpl.h
photosgallery/viewframework/texturemanager/src/glxtexturemanager.cpp
photosgallery/viewframework/texturemanager/src/glxtexturemanagerimpl.cpp
photosgallery/viewframework/tvout/bwins/glxtvoutu.def
photosgallery/viewframework/tvout/eabi/glxtvoutu.def
photosgallery/viewframework/tvout/inc/glxhdmicontroller.h
photosgallery/viewframework/tvout/inc/glxhdmisurfaceupdater.h
photosgallery/viewframework/tvout/src/glxhdmicontroller.cpp
photosgallery/viewframework/tvout/src/glxhdmisurfaceupdater.cpp
photosgallery/viewframework/uiutilities/bwins/glxuiutilitiesu.def
photosgallery/viewframework/uiutilities/data/glxuiutilities.rss
photosgallery/viewframework/uiutilities/eabi/glxuiutilitiesu.def
photosgallery/viewframework/uiutilities/group/glxuiutilities.mmp
photosgallery/viewframework/uiutilities/inc/glxprogressindicator.h
photosgallery/viewframework/uiutilities/inc/glxuiutility.h
photosgallery/viewframework/uiutilities/src/glxprogressindicator.cpp
photosgallery/viewframework/uiutilities/src/glxuiutility.cpp
photosgallery/viewframework/views/cloudview/group/glxcloudview.mmp
photosgallery/viewframework/views/cloudview/inc/glxcloudviewcontrol.h
photosgallery/viewframework/views/cloudview/inc/glxcloudviewimp.h
photosgallery/viewframework/views/cloudview/inc/glxtagscontextmenucontrol.h
photosgallery/viewframework/views/cloudview/src/glxcloudviewcontrol.cpp
photosgallery/viewframework/views/cloudview/src/glxcloudviewimp.cpp
photosgallery/viewframework/views/cloudview/src/glxtagscontextmenucontrol.cpp
photosgallery/viewframework/views/fullscreenview/eabi/glxfullscreenviewu.def
photosgallery/viewframework/views/fullscreenview/group/glxfullscreenview.mmp
photosgallery/viewframework/views/fullscreenview/inc/glxfullscreenbusyicon.h
photosgallery/viewframework/views/fullscreenview/inc/glxfullscreenviewimp.h
photosgallery/viewframework/views/fullscreenview/src/glxfullscreenbusyicon.cpp
photosgallery/viewframework/views/fullscreenview/src/glxfullscreenviewimp.cpp
photosgallery/viewframework/views/gridview/group/glxgridview.mmp
photosgallery/viewframework/views/gridview/inc/glxgridviewcontainer.h
photosgallery/viewframework/views/gridview/src/glxgridviewcontainer.cpp
photosgallery/viewframework/views/listview/group/glxlistview.mmp
photosgallery/viewframework/views/listview/inc/glxlistviewimp.h
photosgallery/viewframework/views/listview/src/glxlistviewimp.cpp
photosgallery/viewframework/views/metadatadialog/group/glxmetadatadialog.mmp
photosgallery/viewframework/views/metadatadialog/inc/glxmetadatadialog.h
photosgallery/viewframework/views/metadatadialog/src/glximgvwrmetadatacontainer.cpp
photosgallery/viewframework/views/metadatadialog/src/glxmetadatacontainer.cpp
photosgallery/viewframework/views/metadatadialog/src/glxmetadatadialog.cpp
photosgallery/viewframework/views/zoomview/inc/glxzoomcontrol.h
photosgallery/viewframework/views/zoomview/src/glxzoomcontrol.cpp
photosgallery/viewframework/visuallistmanager/src/glxitemvisual.cpp
--- a/photos_plat/gallery_utilities_api/inc/glxcollectionpluginpriority.hrh	Fri Mar 12 15:42:44 2010 +0200
+++ b/photos_plat/gallery_utilities_api/inc/glxcollectionpluginpriority.hrh	Mon Mar 15 12:40:30 2010 +0200
@@ -15,7 +15,9 @@
 *
 */
 
-
+//IMPORTANT NOTE: If anyone wants to changed priority or order of priority then please 
+//done appropriate changes in glxlistviewimp.h and glxlistviewimp.cpp. SetDefaultThumbnail()
+//function has dependancy with priority order of colleciton plugins.
 
 
 #ifndef __GLXCOLLECTIONPLUGINPRIORITY_HRH
--- a/photosgallery/collectionframework/datasource/manager/src/glxrequest.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/collectionframework/datasource/manager/src/glxrequest.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -58,7 +58,7 @@
 	    }
 	else
 	    {
-	    // No filter supplied, so create a default filter;
+        // No filter supplied, so create a default filter
 	    iFilter = TGlxFilterFactory::CreateAlphabeticSortFilterL();
 	    }
 	}
--- a/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcemds.h	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcemds.h	Mon Mar 15 12:40:30 2010 +0200
@@ -63,9 +63,7 @@
 #endif
 class CGlxDataSourceMde ;
 
-// Use this till MDS bug is fixed. Then KMdSPSShutdown is to be used.   
 const TUid KHarvesterPSShutdown = { 0x200009F5 } ;
-//const TUid KMdSPSShutdown   = { 0x20022E94 };
 const TInt KMdSShutdown     = 0x00000002; // values 1 = shutdown, 0 = restart, normal state
 
 static _LIT_SECURITY_POLICY_PASS(KAllowAllPolicy);
--- a/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcemds.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcemds.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -724,7 +724,6 @@
 void CGlxDataSourceMde::ProcessItemUpdateL()
     {
     TRACER("CGlxDataSourceMde::ProcessItemUpdateL()");
-    //__ASSERT_DEBUG(iUpdateData.Count(), Panic(EGlxPanicIllegalState));
 	if ( !iUpdateData.Count() || iPauseUpdate )
         {
         return;
--- a/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmds.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmds.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -70,8 +70,6 @@
 _LIT(KPropertyDefNameCreationDate, "CreationDate");
 _LIT(KPropertyDefNameLastModifiedDate, "LastModifiedDate");
 _LIT(KPropertyDefNameTitle, "Title");
-//Code commented cout below, so commenting the below line to remove BAD warning
-//_LIT(KPropertyDefNameDRM, "DRM");
 _LIT(KPropertyDefNameFrameCount, "FrameCount");
 _LIT(KPropertyDefNameOrigin, "Origin");
 
@@ -363,7 +361,6 @@
         
     if( aFilterProperties.iExcludeAnimation )
         {
-        //__ASSERT_DEBUG((EGlxFilterImage == aFilterProperties.iItemType), Panic(EGlxPanicIllegalArgument));
         // Exclude any image with a frame count > 1
         const TInt excludeAllImagesAboveOrEqualToThisFrameCount = 2;
         CMdEPropertyDef& frameCountProperty = DataSource()->ImageDef().GetPropertyDefL(
@@ -376,9 +373,6 @@
         {
         __ASSERT_DEBUG((EGlxFilterImage == aFilterProperties.iItemType), Panic(
                 EGlxPanicIllegalArgument));
-        // Exclude any image which is DRM protected
-        //CMdEPropertyDef& drmProperty = DataSource()->ImageDef().GetPropertyDefL(KPropertyDefNameDRM);
-        //aLogicCondition.AddPropertyConditionL(drmProperty, EFalse);
         }
         
     if( aFilterProperties.iPath )          // If this is set. Then we need to filter on the Ids it supplies
--- a/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdsattribute.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdsattribute.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -127,26 +127,8 @@
     	}
     else
     	{
-        
-     /*  __ASSERT_DEBUG(dynamic_cast<CGlxGetRequest*>(iRequest), Panic(EGlxPanicLogicError));
-        CGlxGetRequest* request = static_cast<CGlxGetRequest*>(iRequest);   
-        
-    	QueueImageVideoObjectQueriesL(request->MediaIds(), iFilterProperties);
-    	QueueAlbumObjectQueryL(request->MediaIds());
-        QueueTagObjectQueryL(request->MediaIds());
-        QueueMonthObjectQueryL(request->MediaIds());
-        
-	    if (LocationAttributeRequested())
-	        {
-	        QueueLocaitonQueryL();
-	        }
-	    
-    	*/
-    	
         __ASSERT_DEBUG(dynamic_cast<CGlxGetRequest*>(iRequest), Panic(EGlxPanicLogicError));
         CGlxGetRequest* request = static_cast<CGlxGetRequest*>(iRequest);   
-// Not used anywhere, commenting out this line to avoid BAD warning
-//        const RArray<TItemId>& mediaIds = reinterpret_cast<const RArray<TItemId>&>(request->MediaIds());
         
         switch(iFilterProperties.iItemType)
             {
@@ -400,11 +382,6 @@
 					filterProperties.iOrigin = EGlxFilterOriginAll;
                     break;
                     }
-              /*  case KGlxCollectionPluginDownloadsImplementationUid:
-                    {
-                    filterProperties.iOrigin = EGlxFilterOriginDownload;
-                    break;
-                    }*/
                 default:
                     {
                     // default gallery query returns all objects as per filter
--- a/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdscommand.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdscommand.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -639,7 +639,6 @@
     	// Append the file name
     	destinationFileName.Append(fileNameWithoutRoot);
     	
-/// @todo minor: Rowland Cook 12/06/2007 majic number.
     	if (destinationFileName.CompareF(sourceFileName) != 0)
     		{
     		// If source and destination are not identical, perform the copy.	
@@ -770,8 +769,6 @@
 TInt CGlxDataSourceTaskMdeCommand::ContainerObjectDef(CMdEObjectDef*& aContainerObjectDef)
 {
     TRACER("CGlxDataSourceTaskMdeCommand::ContainerObjectDef()");
-    //__ASSERT_DEBUG( (iCollectionUid == TUid::Uid(KGlxTagCollectionPluginImplementationUid) 
-    //|| iCollectionUid == TUid::Uid(KGlxCollectionPluginAlbumsImplementationUid)), Panic(EGlxPanicInvalidCollectionUid));
     TInt err = KErrNone;
 	if (iCollectionUid == TUid::Uid(KGlxTagCollectionPluginImplementationUid))
         {
--- a/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdsthumbnail.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdsthumbnail.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -66,7 +66,6 @@
 _LIT(KPropertyDefNameLastModifiedDate, "LastModifiedDate");
 _LIT(KPropertyDefNameDRM, "DRM");
 _LIT(KPropertyDefNameItemType, "ItemType");
-//_LIT(KPropertyDefNameLastModifiedDate, "LastModifiedDate");
 _LIT(KPropertyDefNameSize, "Size");
 _LIT(KUnsupportedItemType,  "video/x-pn-realvideo");
 _LIT(KUnsupportedItemType1, "video/x-pn-multirate-realvideo");
--- a/photosgallery/commonui/src/glxnavigationalstate.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/commonui/src/glxnavigationalstate.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -141,14 +141,16 @@
      */
     inline void NavigateToParentL()
         {
+        TRACER("CGlxNavigationalStateImp::NavigateToParentL()");
         if ( ViewingMode()== NGlxNavigationalState::EView )
             {
+            GLX_LOG_INFO("CGlxNavigationalStateImp::NavigateToParentL() -1");
             iViewingMode = NGlxNavigationalState::EBrowse;
-            //Collection().BackL(); // added by gopakumar
             NotifyObserversOfStateChange();
             }
         else 
             {
+            GLX_LOG_INFO("CGlxNavigationalStateImp::NavigateToParentL() -2");
             Collection().BackL();
             }
         }
@@ -295,8 +297,6 @@
     MMPXCollectionUtility* iCollectionUtility;
     MMPXViewUtility*        iViewUtility; 
     NGlxNavigationalState::TViewingMode  iViewingMode; 
-    // commented off by gopakumar as this is not used anymore
-   // TVwsViewId   iViewId;
     /// List of observers
     RPointerArray< MGlxNavigationalStateObserver > iObservers;
     
--- a/photosgallery/controllers/imageviewer/bwins/glximageviewermanageru.def	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/controllers/imageviewer/bwins/glximageviewermanageru.def	Mon Mar 15 12:40:30 2010 +0200
@@ -7,4 +7,5 @@
 	?ImageUri@CGlxImageViewerManager@@QAEPAVHBufC16@@XZ @ 6 NONAME ; class HBufC16 * CGlxImageViewerManager::ImageUri(void)
 	?ImageFileHandle@CGlxImageViewerManager@@QAEAAVRFile64@@XZ @ 7 NONAME ; class RFile64 & CGlxImageViewerManager::ImageFileHandle(void)
 	?InstanceL@CGlxImageViewerManager@@SAPAV1@XZ @ 8 NONAME ; class CGlxImageViewerManager * CGlxImageViewerManager::InstanceL(void)
+	?IsPrivateGif@CGlxImageViewerManager@@QAEHXZ @ 9 NONAME ; int CGlxImageViewerManager::IsPrivateGif(void)
 
--- a/photosgallery/controllers/imageviewer/eabi/glximageviewermanageru.def	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/controllers/imageviewer/eabi/glximageviewermanageru.def	Mon Mar 15 12:40:30 2010 +0200
@@ -9,4 +9,5 @@
 	_ZN22CGlxImageViewerManager9IsPrivateEv @ 8 NONAME
 	_ZTI22CGlxImageViewerManager @ 9 NONAME
 	_ZTV22CGlxImageViewerManager @ 10 NONAME
+	_ZN22CGlxImageViewerManager12IsPrivateGifEv @ 11 NONAME
 
--- a/photosgallery/controllers/imageviewer/group/glximageviewermanager.mmp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/controllers/imageviewer/group/glximageviewermanager.mmp	Mon Mar 15 12:40:30 2010 +0200
@@ -40,7 +40,10 @@
 
 LIBRARY 				efsrv.lib
 LIBRARY					euser.lib
+LIBRARY                 caf.lib             // ContentAccess::CManager
 LIBRARY                 flogger.lib         // For Logging Tracer
 LIBRARY                 glxcommon.lib       // CGlxSingetonStore
+LIBRARY                 cone.lib            // ConeUtils
+LIBRARY                 platformenv.lib     // DriveInfo
 
 //EXPORTUNFROZEN
\ No newline at end of file
--- a/photosgallery/controllers/imageviewer/inc/glximageviewermanager.h	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/controllers/imageviewer/inc/glximageviewermanager.h	Mon Mar 15 12:40:30 2010 +0200
@@ -22,6 +22,7 @@
 // INCLUDES
 #include <e32std.h>
 #include <e32base.h>
+#include <caf/manager.h>
 
 // CLASS DECLARATION
 class RFile;
@@ -49,6 +50,7 @@
     IMPORT_C HBufC* ImageUri();
     IMPORT_C RFile64& ImageFileHandle();
     IMPORT_C TBool IsPrivate();
+    IMPORT_C TBool IsPrivateGif();
     IMPORT_C void DeleteInstance( void );
     IMPORT_C void SetImageUriL(const TDesC& aFileName);
     IMPORT_C void SetImageFileHandleL(const RFile& aFileHandle);
@@ -86,6 +88,13 @@
     /// Flag that stores if the image file is in a private folder. 
     /// ETrue means the image is private, else EFalse 
     TBool iIsPrivate;
+
+    /// Content Access Manager
+    ContentAccess::CManager* iManager;
+    
+    /// Flag that stores if the gif file is in a private folder. 
+    /// ETrue means the gif is from private path, else EFalse 
+    TBool iIsPrivateGif;
     };
 
 #endif // GLXIMAGEVIEWERMANAGER_H
--- a/photosgallery/controllers/imageviewer/src/glximageviewermanager.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/controllers/imageviewer/src/glximageviewermanager.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -19,9 +19,17 @@
 #include "glximageviewermanager.h"
 #include <glxsingletonstore.h>
 #include <glxtracer.h>
+#include <glxlog.h>
 
 #include <f32file.h>
+#include <caf/manager.h>
+#include <driveinfo.h>
+#include <coeutils.h>
 
+_LIT( KPrivateFolder, "\\Private\\" );
+_LIT( KGifFileExt, ".gif" );
+_LIT( KTempFilePath, "?:\\data\\images\\200104E7.gif" );
+    
 EXPORT_C CGlxImageViewerManager* CGlxImageViewerManager::InstanceL()
     {
     TRACER("CGlxImageViewerManager::InstanceL()");
@@ -52,6 +60,12 @@
     return iIsPrivate;
     }
 
+EXPORT_C TBool CGlxImageViewerManager::IsPrivateGif()
+    {
+    TRACER("CGlxImageViewerManager::IsPrivateGif()");    
+    return iIsPrivateGif;
+    }
+
 CGlxImageViewerManager::CGlxImageViewerManager()
     : iImageUri(NULL), iFile(NULL), iIsPrivate(EFalse)
     {
@@ -121,6 +135,18 @@
     delete iFile;
     iFile = NULL;
 
+    if (iIsPrivateGif)
+        {
+        iManager->DeleteFile(iImageUri->Des());
+        iIsPrivateGif = EFalse;
+        }
+
+    if ( iManager )
+        {
+        delete iManager;
+        iManager = NULL;
+        }
+    
     if ( iImageUri )
         {
         delete iImageUri;
@@ -136,18 +162,34 @@
 EXPORT_C void CGlxImageViewerManager::SetImageFileHandleL(const RFile& aFileHandle)
     {
     TRACER("void CGlxImageViewerManager::SetImageFileHandleL()");
-    _LIT( KPrivateFolder, "\\Private\\" );    // Platsec private folder  
     TFileName filePath;
-    User::LeaveIfError( aFileHandle.FullName( filePath ) );
-    SetImageUriL( filePath );
-    TParsePtrC parse( filePath );
-    if( parse.PathPresent() &&
-        parse.Path().Length() > KPrivateFolder().Length() &&
-        parse.Path().Left( KPrivateFolder().Length() ).CompareF( KPrivateFolder ) == 0 )
+    User::LeaveIfError(aFileHandle.FullName(filePath));
+    TParsePtrC parse(filePath);
+    if (parse.PathPresent() && parse.Path().Length()
+            > KPrivateFolder().Length() && parse.Path().Left(
+            KPrivateFolder().Length()).CompareF(KPrivateFolder) == 0)
         {
         // File is in private folder; duplicate file handle
         iFile = new (ELeave) RFile64;
-        User::LeaveIfError( iFile->Duplicate( aFileHandle ) );
+        User::LeaveIfError(iFile->Duplicate(aFileHandle));
         iIsPrivate = ETrue;
+        if (parse.Ext().Compare(KGifFileExt) == 0)
+            {
+            // Gif file from private path, hence make a local copy.
+            TFileName ramFilePath(KTempFilePath);
+            TChar drive;
+            User::LeaveIfError(DriveInfo::GetDefaultDrive(
+                    DriveInfo::EDefaultRam, drive));
+            ramFilePath[0] = drive;
+            ConeUtils::EnsurePathExistsL(ramFilePath);
+            if (!iManager)
+                {
+                iManager = ContentAccess::CManager::NewL();    
+                }
+            iManager->CopyFile(*iFile, ramFilePath);
+            filePath.Copy(ramFilePath);
+            iIsPrivateGif = ETrue;
+            }
         }
+    SetImageUriL( filePath );
     }
--- a/photosgallery/icons/iconlist.txt	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/icons/iconlist.txt	Mon Mar 15 12:40:30 2010 +0200
@@ -41,5 +41,19 @@
 -c8,8 qgn_lgal_fav1.svg
 -c8,8 qgn_lgal_fav2.svg
 -c8,8 qgn_lgal_bg.svg
+-c8,8 qgn_prop_photo_album_large.svg
+-c8,8 qgn_prop_photo_tag_large
+-c8,8 qgn_prop_photo_all_large
+-c8,8 qgn_prop_photo_calendar_large
 -c8,8 save.svg
 -c8,8 use_as.svg
+-c8,8 qgn_graf_ring_wait_01.svg
+-c8,8 qgn_graf_ring_wait_02.svg
+-c8,8 qgn_graf_ring_wait_03.svg
+-c8,8 qgn_graf_ring_wait_04.svg
+-c8,8 qgn_graf_ring_wait_05.svg
+-c8,8 qgn_graf_ring_wait_06.svg
+-c8,8 qgn_graf_ring_wait_07.svg
+-c8,8 qgn_graf_ring_wait_08.svg
+-c8,8 qgn_graf_ring_wait_09.svg
+-c8,8 qgn_graf_ring_wait_10.svg
--- a/photosgallery/slideshow/engine/controlsrc/shweffectcontrol.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/slideshow/engine/controlsrc/shweffectcontrol.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -472,13 +472,6 @@
 		    }
 		else
 		    {
-		    // Set paused effect on current visual 
-		    //if(iPausedVisuals.Count())
-		    //    {
-		    //	iSplitter.SetLayoutL( &iPausedLayout, iCurrentVisual );
-		    //	}
-			//else
-			//    {
 	            // enter the view mode for visual
 	            // ask the layout chain and set that to the current visual
 	            // set also effect fade-in
@@ -488,7 +481,6 @@
 	    				iViewDuration, 
 	    				KFirstEffectFadeInDuration ), 
 	    			iCurrentVisual );
-		      //  }
 		    }
 		// bring the focus visual to the front
 		iCurrentVisual->MoveToFront();    
@@ -677,8 +669,7 @@
 	        {
             while (count > 0)
 		        {
-		        // unpause and remove the visuals
-    		    //iPausedVisuals[count]->Resume();
+		        //remove the visuals
 		        iPausedVisuals.Remove(--count);
 		        }
 	        }
--- a/photosgallery/slideshow/engine/effectsrc/shwcrossfadeeffect.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/slideshow/engine/effectsrc/shwcrossfadeeffect.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -188,8 +188,6 @@
 	GLX_LOG_INFO( "CShwCrossFadeEffect::InitializeL" );
 	// set the screen size
 	iImpl->iScreenSize = aScreenSize;
-	// set the layout full screen (slideshow is always run on landscape)
-//	iImpl->iSizeLayout.SetValue( aScreenSize.iWidth, aScreenSize.iHeight, 0 );
 	}
 
 // -----------------------------------------------------------------------------
@@ -219,9 +217,6 @@
 	TAlfTimedValue tranition(1.0,aFadeInDuration);
 	tranition.SetStyle(EAlfTimedValueStyleLinear);
 	aVisual->SetOpacity(tranition);
-	// set value, 0% -> 100%
-	//iImpl->iOpacityLayout.Set( KMinOpacity );
-	//iImpl->iOpacityLayout.Set( KMaxOpacity, aFadeInDuration );
 	return &iImpl->iOpacityLayout;
 	}
 
@@ -243,9 +238,6 @@
 	TRACER("CShwCrossFadeEffect::EnterTransitionL");
 	GLX_LOG_INFO1( "CShwCrossFadeEffect::EnterTransitionL( %d )", aDuration );
 
-	// set value, drop from 100% to 0%
-	//iImpl->iOpacityLayout.Set( KMaxOpacity );
-    //iImpl->iOpacityLayout.Set( KMinOpacity, aDuration );
 	TAlfTimedValue tranition(0.0,aDuration);
 	tranition.SetStyle(EAlfTimedValueStyleLinear);
 	aVisual->SetOpacity(tranition);
--- a/photosgallery/slideshow/engine/effectsrc/shwcrossfadelayout.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/slideshow/engine/effectsrc/shwcrossfadelayout.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -94,9 +94,6 @@
 	// ensure value is inside maximum and minimum opacity
     opacity = Min( opacity, KMaxOpacity );
     opacity = Max( opacity, KMinOpacity );
-
-	// set value to the info
-	//aInfo.iOpacity = opacity;
 	}
 
 // -----------------------------------------------------------------------------
--- a/photosgallery/slideshow/engine/effectsrc/shwcurvefactory.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/slideshow/engine/effectsrc/shwcurvefactory.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -28,10 +28,6 @@
 // -----------------------------------------------------------------------------
 namespace NShwCurveFactory
 	{
-	// constant for arc angle
-	//const TInt KStartAngle = 0;	// start at 0 degrees
-	//const TInt KStopAngle = 360;	// end in in 360 degrees
-	//const TInt KOrigo = 0;	// centre is in origo
 	// -------------------------------------------------------------------------
 	// CreateEllipsisL.
 	// -------------------------------------------------------------------------
@@ -41,20 +37,6 @@
 	//function no longer used
 	//needs to be refactored/removed
 		CAlfCurvePath* curve =NULL;
-	/*	CAlfCurvePath* curve = CAlfCurvePath::NewL();
-		CleanupStack::PushL( curve );
-		// HUI creates a double sized ellipsis so need to halve the sides
-		TSize realSize( aSize.iWidth / 2, aSize.iHeight / 2 );
-		// create the arch for given length
-		curve->AppendArcL( 
-			TPoint( KOrigo, KOrigo ),	// centre point
-			realSize,	// sides of the rect defining the ellipse
-			KStartAngle,	// start angle
-			KStopAngle, // end angle 
-			aLength );	// the whole circle
-		// enable loop
-        CleanupStack::Pop( curve );
-		curve->EnableLoop( ETrue );*/
 		return curve;
 		}
 	}
--- a/photosgallery/slideshow/engine/effectsrc/shwzoomandpaneffect.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/slideshow/engine/effectsrc/shwzoomandpaneffect.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -299,8 +299,6 @@
 	        iImpl->iCurve = curve;
 	        } );
 		}
-	// set the curve for the layout, its ok to set NULL
-//	iImpl->iZoomAndPanLayout.SetPanningCurve( iImpl->iCurve );
 
     // return the calculated thumbnail size
     return thumbnailSize;
--- a/photosgallery/slideshow/engine/effectsrc/shwzoomandpanlayout.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/slideshow/engine/effectsrc/shwzoomandpanlayout.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -98,8 +98,6 @@
 void TShwZoomAndPanLayout::ResetSizeToMinimum()
 	{
 	GLX_LOG_INFO( "TShwZoomAndPanLayout::ResetSizeToMinimum" );
-	// set initial size to minimum size
-//	iZoomedSize.Set( iMinimumSize );
 	}
 
 // -----------------------------------------------------------------------------
@@ -137,10 +135,7 @@
 		GLX_LOG_INFO2( 
 			"TShwZoomAndPanLayout:: Zooming out target(%.1f,%.1f)", 
 			iMinimumSize.iWidth, iMinimumSize.iHeight );
-		// zooming out so we start from maximum size
-		//iZoomedSize.Set( iMaximumSize );
-		// target is the minimum size
-	//	iZoomedSize.Set( iMinimumSize, aDuration );
+
 		// run the latter half of the curve
 		curveStart = curveLength / 2;
 		curveEnd = curveLength;
@@ -153,10 +148,6 @@
 		GLX_LOG_INFO2( 
 			"TShwZoomAndPanLayout:: Zooming in target(%.1f,%.1f)", 
 			iMaximumSize.iWidth, iMaximumSize.iHeight );
-		// zooming in so we start from minimum size
-//		iZoomedSize.Set( iMinimumSize );
-		// target is maximum size
-//		iZoomedSize.Set( iMaximumSize, aDuration );
 		}
 
 	// set position, if we have curve its either from start to half 
@@ -220,14 +211,10 @@
 	// ensure x is inside  maximum size and minimum size
     x_size = Min( x_size, iMaximumSize.iWidth );
     x_size = Max( x_size, iMinimumSize.iWidth );
-	// set x size, it is now inside the minimum and maximum
-	//aInfo.iSize.iX = x_size;
 
     // ensure y is inside  maximum size and minimum size
     y_size = Min( y_size, iMaximumSize.iHeight );
     y_size = Max( y_size, iMinimumSize.iHeight );
-	// set y size, it is now inside the minimum and maximum
-//	aInfo.iSize.iY = y_size;
 
 	// set position only if we have a panning curve, this enables the use of this
     // layout as only a zooming layout and then some other layout can define 
@@ -252,26 +239,6 @@
 		//         maximum.y - minimum.y
 		// and need to ensure maximum.y > minimum.y, otherwise scale becomes
 		// infinite
-		if( iMaximumSize.iHeight > iMinimumSize.iHeight )
-			{
-/*			TReal32 scale = ( aInfo.iSize.iY - iMinimumSize.iHeight ) /
-							( iMaximumSize.iHeight - iMinimumSize.iHeight );
-			// multiply the curve with scale
-			// set x position
-			aInfo.iPosition.iX = 
-				scale * iPanningCurve->MapValue( iCurvePosition.Now(), 0 );
-			// set y position
-			aInfo.iPosition.iY =
-				scale * iPanningCurve->MapValue( iCurvePosition.Now(), 1 );*/
-			}
-		else
-	        {
-	        // Panning curve defined but we either zoomed to screen size or
-	        // the image was smaller than or equal to screen size so
-	        // just set position to origo to see image centered on the screen
-		//	aInfo.iPosition.iX = 0;
-		//	aInfo.iPosition.iY = 0;
-	        }
 		}
 	}
 
@@ -281,10 +248,6 @@
 TBool TShwZoomAndPanLayout::DoChanged() const
 	{
 	TBool ret = EFalse;
-	if( iPanningCurve )
-		{
-//		ret = iPanningCurve->MappingFunctionChanged();
-		}
 	return iZoomedSize.Changed() || ret;
 	}
 
@@ -294,10 +257,6 @@
 void TShwZoomAndPanLayout::DoClearChanged() 
 	{
 	iZoomedSize.ClearChanged();
-	if( iPanningCurve )
-		{
-//		iPanningCurve->MappingFunctionClearChanged();
-		}
 	}
 
 // -----------------------------------------------------------------------------
--- a/photosgallery/slideshow/view/group/shwslideshowviewplugin.mmp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/slideshow/view/group/shwslideshowviewplugin.mmp	Mon Mar 15 12:40:30 2010 +0200
@@ -130,4 +130,5 @@
 LIBRARY         remconinterfacebase.lib
 //LIBRARY 		hgcontextutility.lib 					// For Teleport
 LIBRARY			glxtvout.lib
+LIBRARY	   		harvesterclient.lib
 // End of File
--- a/photosgallery/slideshow/view/inc/shwslideshowview.h	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/slideshow/view/inc/shwslideshowview.h	Mon Mar 15 12:40:30 2010 +0200
@@ -16,9 +16,6 @@
 */
 
 
-
-
-
 #ifndef C_SHWSLIDESHOWVIEW_H
 #define C_SHWSLIDESHOWVIEW_H
 
@@ -28,6 +25,7 @@
 #include <AknProgressDialog.h>
 #include <gestureobserver.h>
 #include <gesturehelper.h>
+#include <harvesterclient.h>
 #include "shwengineobserver.h"
 #include "shwmusicobserver.h"
 #include "shwconstants.h"
@@ -53,12 +51,10 @@
 class CShwTelephoneHandler;
 class CMPXCollectionPath;
 class CEikButtonGroupContainer;
-// CLASS DECLARATION
 class CShwGestureControl;
 class CShwTicker;
 class CShwMediaKeyUtility;
 class CGestureControl;
-//class CHgContextUtility;
 class CGlxHdmiController;
 /**
  *  Slideshow view.
@@ -71,7 +67,8 @@
                                        public MShwMusicObserver,
                                        public MProgressDialogCallback,
                                        public MShwTickObserver,
-                                       public MShwGestureObserver
+                                       public MShwGestureObserver,
+									   public MHarvesterEventObserver
     {
     public:
 
@@ -148,7 +145,13 @@
     	 * @ref CGlxViewBase::DoViewDeactivate
     	 */	
         void DoViewDeactivate();
-   
+   public:
+    // from MHarvesterEventObserver
+    void HarvestingUpdated( 
+                HarvesterEventObserverType aHEObserverType, 
+                HarvesterEventState aHarvesterEventState,
+                TInt aItemsLeft );
+
     private: // from MGlxMediaListObserver
 
     	/// @ref MGlxMediaListObserver::HandleItemAddedL
@@ -264,9 +267,9 @@
     	/**
     	 * @ref MShwTickObserver::HandleTickL
     	 */
-    	 
         void HandleTickL();
-    	/**
+
+        /**
     	 * @ref MShwTickObserver::HandleTickCancelled
     	 */
         void HandleTickCancelled();
@@ -280,33 +283,44 @@
 		 * Initializes the screen furniture for the slide show view
 		 */
         void InitializeShwFurnitureL();
-    	/**
+
+        /**
     	 * Initializes the soft keys
     	 */
 		void InitializeCbaL();
-    	/**
+
+		/**
     	 * Hides the screen furniture
     	 */
 		void HideShwFurniture();
-    	/**
+
+		/**
     	 * Makes the screen furniture visible
     	 */
 		void ShowShwFurnitureL();
-    	/**
+
+		/**
     	 * Replaces an existing command set with a new one
     	 *@
     	 */
 		void ReplaceCommandSetL(TInt aNewComandId, TInt aOldCommandSet );
+
 		/**
          * returns the index of item for which texture can be removed for cleanup
          * The index will be out the iterator offsets w.r.t focssed index.
          */
-		void SetImageL();
         TInt GetIndexToBeRemoved();
+
         /**
          * Remove the fullscreen texture.
          */
         void RemoveTexture();
+        
+        /**
+         * Set the current Item to HDMI.
+         */
+        void SetItemToHDMIL();
+
 	public:
 	//to keep in track which of the command set is active/on top
 		enum TShwState
@@ -332,8 +346,6 @@
        
         CAlfControlGroup* iVolumeControlGroup; // owned
 
-       // CGlxUiUtility* iUiUtility; // owned
-
         CAknWaitDialog*	iWaitDialog; // owned
 
         /// Own: Pause handler
@@ -396,9 +408,9 @@
 	CAlfControlGroup* iGestureControlGroup;
 	CShwTicker* iTicker;
 	CShwMediaKeyUtility* iMediaKeyHandler;
-//    CHgContextUtility* iContextUtility;
 	CGlxHdmiController* iHdmiController;
 	TBool iHdmiActive;
+	RHarvesterClient iHarvesterClient;
     };
 
 #endif  // C_SHWSLIDESHOWVIEW_H
--- a/photosgallery/slideshow/view/src/shwgesturecontrol.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/slideshow/view/src/shwgesturecontrol.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -54,7 +54,6 @@
 	{
 	TRACER("CShwGestureControl::ConstructL");
 	GLX_LOG_INFO( "CShwGestureControl::ConstructL" );
-	//CGestureControl::ConstructL(*this,aEnv,aDisplay,KShwgestureEventControlGroup);
 	CAlfControl::ConstructL(aEnv);    
     BindDisplay(aDisplay);
 	}
--- a/photosgallery/slideshow/view/src/shwslideshowkeyhandler.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/slideshow/view/src/shwslideshowkeyhandler.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -171,8 +171,6 @@
     // set the state 
     else if (aType == EEventKey && aKeyEvent.iScanCode == EStdKeyNo)
     	{
-  
- //       iState = CShwSlideshowView::EShwExiting;
     	iUiUtility->SetExitingState(ETrue);
     	} // end if else
 
--- a/photosgallery/slideshow/view/src/shwslideshowview.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/slideshow/view/src/shwslideshowview.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -124,7 +124,7 @@
     {
     TRACER("CShwSlideshowView::~CShwSlideshowView");
   	GLX_LOG_INFO( "CShwSlideshowView::~CShwSlideshowView()" );
-    
+  	iHarvesterClient.Close();
     // delete media list population call back
     delete iPopulateListCallBack;
     
@@ -314,6 +314,12 @@
 	// Glx view base construction
     ViewBaseConstructL();
     
+	TInt err = iHarvesterClient.Connect();
+	GLX_LOG_INFO1("iHarvesterClient.Connect() err = %d",err);
+	if(err == KErrNone)
+		{
+        iHarvesterClient.AddHarvesterEventObserver(*this, EHEObserverTypeMMC, 1000);
+		}
     // Create async engine starter with standard priority
 	iAsyncCallBack = new( ELeave ) CAsyncCallBack( CActive::EPriorityStandard );
 
@@ -355,10 +361,6 @@
         TShwCallBack< CShwSlideshowView, PopulateListL >( this ) );
     iMSKPressed = EFalse;
     iLSKPressed = EFalse;
-    
-    //Get the HgContextUtility instance
-//    iContextUtility = iUiUtility->ContextUtility();
-    
     }
    
 // ---------------------------------------------------------------------------
@@ -424,7 +426,10 @@
     // reset failure flag
     iEngineStartFailed = EFalse;
 
-    iHdmiController = CGlxHdmiController::NewL();
+	if(!iHdmiController)
+		{
+	    iHdmiController = CGlxHdmiController::NewL();
+		}
     // Engine related construction
     // Instantiate the slideshow engine, with this class as its observer
     __ASSERT_DEBUG( !iEngine, Panic( EGlxPanicAlreadyInitialised ) );
@@ -649,7 +654,7 @@
                 {
                 RemoveTexture();
                 }
-            SetImageL();
+            SetItemToHDMIL();
             }    
 	    }
     }
@@ -727,7 +732,7 @@
         iWaitDialog->ProcessFinishedL();
         }
     iShwState = EShwPlay;
-    SetImageL();
+    SetItemToHDMIL();
 	iHdmiActive = ETrue;
     ReplaceCommandSetL(R_SHW_SOFTKEYS_END_PAUSE,R_SHW_SOFTKEYS_END_PAUSE);
     ShowShwFurnitureL();
@@ -940,13 +945,9 @@
     // Create the soft keys
     // Left (bottom in landscape orientation)
     HBufC* softKeyTextLeft = StringLoader::LoadLC( R_SHW_SOFTKEY_LEFT );
-    // SetSoftKeyL takes ownership of softKeyText
-    //SetSoftkeyL( EGlxLeftSoftkey,  EShwSlideshowCmdContinue, softKeyTextLeft );
     CleanupStack::Pop( softKeyTextLeft );
     // Right (top in landscape orientation)
     HBufC* softKeyTextRight = StringLoader::LoadLC( R_SHW_SOFTKEY_RIGHT );
-    // SetSoftKeyL takes ownership of softKeyText
-    //SetSoftkeyL( EGlxRightSoftkey,  EAknSoftkeyBack, softKeyTextRight );
     CleanupStack::Pop( softKeyTextRight );
     
     }
@@ -1029,7 +1030,6 @@
             }
         }
     iFilteredList->SetFocusL( NGlxListDefs::EAbsolute, focusIndex );
-//    iContextUtility->PublishPhotoContextL(item.Uri());
     }
 
 
@@ -1258,27 +1258,49 @@
 // Set the image to external display - HDMI
 // -----------------------------------------------------------------------------
 //
-void CShwSlideshowView::SetImageL()
+void CShwSlideshowView::SetItemToHDMIL()
     {
-    TRACER("CShwSlideshowView::SetImageL() - CGlxHDMI");
-    TGlxMedia item = iFilteredList->Item(iFilteredList->FocusIndex());
-    TInt frameCount(0);
-    TSize orignalSize;
-    TBool aFramesPresent = item.GetFrameCount(frameCount);
-    TBool adimension = item.GetDimensions(orignalSize);
+    TRACER("CShwSlideshowView::SetImageToHDMIL() ");
+
+    TInt focusIndex = iFilteredList->FocusIndex();
+
+    // If we dont know what item we are focussing on 
+    // or if our filtered list is empty
+    // or if HDMI is not connected 
+    // or if there is no HDMI Controller at all 
+    // then dont SetImageToHDMI :)  
+    if( ( KErrNotFound == focusIndex)
+            || (0 == iFilteredList->Count())
+            || (NULL == iHdmiController)
+            || (!iHdmiController->IsHDMIConnected())) 
+        {
+        GLX_LOG_INFO("CShwSlideshowView::SetImageToHDMIL - Cant Set Image To HDMI");
+        return;
+        }
+    
+    TGlxMedia item = iFilteredList->Item(focusIndex);
     TInt error = GlxErrorManager::HasAttributeErrorL(item.Properties(),
-            KGlxMediaIdThumbnail);
-    if (error == KErrNone)
+        KGlxMediaIdThumbnail);
+    
+    // Item will be supported by HDMI ONLY if
+    // it is not a video
+    // and it has no attribute error 
+    if ( (item.Category() != EMPXVideo) 
+            && (error == KErrNone) )
         {
-        GLX_LOG_INFO("CShwSlideshowView::SetImageL() - CGlxHDMI call SetImageL");
+        GLX_LOG_INFO("CShwSlideshowView::SetImageToHDMIL - CGlxHdmi - Setting the Image");
+        TInt frameCount(0);
+        TSize orignalSize;
+        item.GetFrameCount(frameCount);
+        item.GetDimensions(orignalSize);
         iHdmiController->SetImageL(item.Uri(), orignalSize, frameCount);
         }
     else
         {
-        GLX_LOG_INFO1("CShwSlideshowView::SetImageL() - CGlxHDMI IsVideo , err=%d",error);
-        //Set the external display to cloning mode.
-        //If the current item is a video, corruted thumbnail
-        iHdmiController->IsVideo();
+        GLX_LOG_INFO("CShwSlideshowView::SetImageToHDMIL - Unsupported Item");
+        //Set the external display to cloning mode if
+        //the current item is something we wont support (e.g. video, corrupted item);
+        iHdmiController->ItemNotSupported();
         }
     }
 // ---------------------------------------------------------------------------
@@ -1322,3 +1344,20 @@
     const TGlxMedia& item = iFilteredList->Item(GetIndexToBeRemoved());
     iUiUtility->GlxTextureManager().RemoveTexture(item.Id(),EFalse);
     }
+
+// ---------------------------------------------------------------------------
+// HarvestingUpdated
+// 
+// ---------------------------------------------------------------------------
+//
+void CShwSlideshowView::HarvestingUpdated( 
+                HarvesterEventObserverType HarvestingUpdated, 
+                HarvesterEventState aHarvesterEventState,
+                TInt aItemsLeft )
+    {
+    TRACER("CShwSlideshowView::HarvestingUpdated()");
+    if(HarvestingUpdated == EHEObserverTypeMMC)
+        {
+        ProcessCommandL(EAknSoftkeyClose);
+        }
+    }
--- a/photosgallery/viewframework/commandhandlers/commandhandlerbase/src/glxmedialistcommandhandler.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/commandhandlers/commandhandlerbase/src/glxmedialistcommandhandler.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -167,9 +167,6 @@
 	        {
     		TInt num_items = aMenuPane->NumberOfItemsInPane();
     		TBool atLeastOneEnabledSupportedItem = EFalse;
-    		
-    		//CGlxUiUtility* uiUtility  = CGlxUiUtility::UtilityL();
-            //CleanupClosePushL(*uiUtility);
             
     		// Iterate through menu pane
     		for ( TInt i = 0; i < num_items; i++)
@@ -193,8 +190,6 @@
         	        }
     			}
     			
-    	   // CleanupStack::PopAndDestroy(uiUtility);
-    			
     	    if ( atLeastOneEnabledSupportedItem )
     	        {
     			DoDynInitMenuPaneL(aResourceId, aMenuPane);
@@ -385,7 +380,6 @@
 EXPORT_C const MGlxMediaList& CGlxMediaListCommandHandler::MediaList() const
 	{
 	return const_cast<CGlxMediaListCommandHandler*>(this)->MediaList();
-	//return iMediaListProvider->MediaList();
 	}
 
 // -----------------------------------------------------------------------------
--- a/photosgallery/viewframework/commandhandlers/commandhandlerbase/src/glxmpxcommandcommandhandler.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/commandhandlers/commandhandlerbase/src/glxmpxcommandcommandhandler.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -470,7 +470,6 @@
 void CGlxMpxCommandCommandHandler::ProgressNoteL(TInt aCommandId)
 	{
     TRACER("CGlxMpxCommandCommandHandler::ProgressNoteL(TInt aCommandId)");
-	//MGlxMediaList& mediaList = MediaList();
 
     // get progress note 
     HBufC* progressText = ProgressTextL(aCommandId);
--- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/group/glxcommoncommandhandlers.mmp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/group/glxcommoncommandhandlers.mmp	Mon Mar 15 12:40:30 2010 +0200
@@ -116,6 +116,7 @@
 LIBRARY         estor.lib 	// for RBufWriteStream
 LIBRARY         euser.lib
 LIBRARY         fbscli.lib
+LIBRARY         featdiscovery.lib 
 LIBRARY         glxcommandhandlerbase.lib
 LIBRARY         glxupnpcommandhandler.lib   // for CGlxUpnpRenderer
 LIBRARY         glxcommon.lib                   // for CResourceUtilities
--- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/inc/glxcommandhandleraiwassign.h	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/inc/glxcommandhandleraiwassign.h	Mon Mar 15 12:40:30 2010 +0200
@@ -27,7 +27,7 @@
 class CAiwGenericParamList;
 class CGlxMedia;
 class MGlxMediaListProvider;
-
+class CFeatureDiscovery;
 
 /**
  *  CGlxCommandHandlerAiwAssign
@@ -53,6 +53,8 @@
 	IMPORT_C static CGlxCommandHandlerAiwAssign* NewL(
 	    MGlxMediaListProvider* aMediaListProvider, TInt aMenuResource);
 	
+	~CGlxCommandHandlerAiwAssign();
+	
 protected: // From CGlxMediaListCommandHandler
 	/**
 	 * See @ref CGlxMediaListCommandHandler::DoGetRequiredAttributesL
@@ -75,6 +77,12 @@
      */
     CGlxCommandHandlerAiwAssign(MGlxMediaListProvider* aMediaListProvider, 
         TInt aMenuResource);
+    
+    void ConstructL();
+
+private: // Data Members
+    
+    CFeatureDiscovery* iFeatManager;
     };
 
 #endif // C_GLXCOMMANDHANDLERAIWASSIGN_H
--- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/inc/glxcommandhandleraiwedit.h	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/inc/glxcommandhandleraiwedit.h	Mon Mar 15 12:40:30 2010 +0200
@@ -29,7 +29,7 @@
 class MGlxMediaListProvider;
 class CAiwServiceHandler;
 class CGlxImageViewerManager;
-
+class CFeatureDiscovery;
 /**
  *  CGlxCommandHandlerAiwEdit
  *
@@ -94,6 +94,8 @@
     
     // Not own
     CGlxImageViewerManager* iImageViewerInstance;
+    
+    CFeatureDiscovery* iFeatManager;
     };
 
 #endif // C_GLXCOMMANDHANDLERAIWEDIT_H
--- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandleraiwassign.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandleraiwassign.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -32,6 +32,7 @@
 #include <mpxcollectionpath.h>
 #include <glxcollectionpluginimageviewer.hrh>
 #include "glxaiwservicehandler.h"
+#include <featdiscovery.h>
 
 const TInt KGlxAiwAssignCommandSpace = 0x00000100;
 
@@ -62,6 +63,19 @@
     TRACER("CGlxCommandHandlerAiwAssign::CGlxCommandHandlerAiwAssign");
     }
 
+CGlxCommandHandlerAiwAssign::~CGlxCommandHandlerAiwAssign()
+    {
+    delete iFeatManager;
+    }
+
+void CGlxCommandHandlerAiwAssign::ConstructL()
+    {
+    //Calling base class implementation
+    CGlxCommandHandlerAiwBase::ConstructL();
+    
+    iFeatManager = CFeatureDiscovery::NewL();
+    }
+
 // -----------------------------------------------------------------------------
 // CGlxCommandHandlerAiwAssign::DoGetRequiredAttributesL
 // -----------------------------------------------------------------------------
@@ -105,7 +119,13 @@
 //	
 TInt CGlxCommandHandlerAiwAssign::AiwInterestResource() const
     {
-    return R_GLX_AIW_ASSIGN_TO_CONTACT_INTEREST;
+    int resource = R_GLX_AIW_ASSIGN_TO_CONTACT_INTEREST;
+    if(iFeatManager->IsFeatureSupportedL(KFeatureIdFfImageEditor) || iFeatManager->IsFeatureSupportedL(KFeatureIdFfVideoEditor))
+        {
+        resource = R_GLX_AIW_ASSIGN_TO_CONTACT_INTEREST_MEDIAEDITOR;
+        }
+
+    return resource;
     }
         
 // -----------------------------------------------------------------------------
--- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandleraiwbase.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandleraiwbase.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -381,14 +381,16 @@
     if ( mediaList.SelectionCount() == 0 )
         {
         // No items in selection list. Check if focus item is static
+        // When image opened from image viewer, metadata will not
+        // available immediately and Uri for that item will be null,
+        // so need to disable aiw commands at that time. Once metadata 
+        // been filled, aiw commands should available.
         TInt focusIndex = mediaList.FocusIndex();
-        if(focusIndex != KErrNotFound)
-            {
-            if (!mediaList.Item(focusIndex).IsStatic())
+        if((mediaList.FocusIndex()!=KErrNotFound)&&
+           (mediaList.Item(focusIndex).Uri()!=KNullDesC)&&
+           (!mediaList.Item(focusIndex).IsStatic()))
                 {
-                // Not static - so enable
                 enabled = ETrue;
-                }
             }
         }
     else if ( mediaList.SelectionCount() <= MaxSelectedItems() )
--- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandleraiwedit.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandleraiwedit.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -38,8 +38,7 @@
 #include <AiwGenericParam.h>                // for passing data between applications
 #include "AiwServiceHandler.h"                  // AIW service handler
 #include "glxmedia.h"
-
-
+#include <featdiscovery.h>
 // -----------------------------------------------------------------------------
 // NewL
 // -----------------------------------------------------------------------------
@@ -61,6 +60,7 @@
 //
 EXPORT_C CGlxCommandHandlerAiwEdit::~CGlxCommandHandlerAiwEdit()
     {
+    delete iFeatManager;
     delete iServiceHandler;
 
     if (NULL != iImageViewerInstance)
@@ -94,6 +94,7 @@
         }
 
     iImageViewerInstance = CGlxImageViewerManager::InstanceL();
+    iFeatManager = CFeatureDiscovery::NewL();
     }
 
 // -----------------------------------------------------------------------------
@@ -132,7 +133,12 @@
         //If stylus menu is present, hide it for multiple selection
         if (iCommandSingleClick && aMenuPane->MenuItemExists(
                 EGlxCmdAiwSingleClickEdit, pos)
-                && (mediaList.SelectionCount() > 1))
+
+                && ((mediaList.SelectionCount() > 1)
+                        || (!iFeatManager->IsFeatureSupportedL(
+                                KFeatureIdFfImageEditor)
+                                && !iFeatManager->IsFeatureSupportedL(
+                                        KFeatureIdFfVideoEditor))))
             {
             aMenuPane->SetItemDimmed(EGlxCmdAiwSingleClickEdit, ETrue);
             }
@@ -141,9 +147,13 @@
             {
             // If the image path is private or view is in grid & 
             // selection is not equal to 1, we should hide Edit menu item 
-            if (iImageViewerInstance->IsPrivate() || 
-                    (mediaList.SelectionCount() != 1 
+            if ((iImageViewerInstance->IsPrivate()
+                    || (mediaList.SelectionCount() != 1
                             && !IsInFullScreenViewingModeL()))
+                    || (!iFeatManager->IsFeatureSupportedL(
+                            KFeatureIdFfImageEditor)
+                            && !iFeatManager->IsFeatureSupportedL(
+                                    KFeatureIdFfVideoEditor)))
                 {
                 aMenuPane->SetItemDimmed(EGlxCmdAiwEdit, ETrue);
                 }
--- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandleraiwshowmap.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandleraiwshowmap.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -1,5 +1,5 @@
 /*
-* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). 
+* Copyright (c) 2008-2009 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"
@@ -45,12 +45,12 @@
 // -----------------------------------------------------------------------------
 // NewL
 // -----------------------------------------------------------------------------
-//	
+//
 EXPORT_C CGlxCommandHandlerAiwShowMap* CGlxCommandHandlerAiwShowMap::NewL(
     MGlxMediaListProvider* aMediaListProvider, TInt aMenuResource )
     {
     TRACER("CGlxCommandHandlerAiwShowMap::NewL");
-    CGlxCommandHandlerAiwShowMap* self = new ( ELeave ) 
+    CGlxCommandHandlerAiwShowMap* self = new ( ELeave )
         CGlxCommandHandlerAiwShowMap( aMediaListProvider, aMenuResource );
     CleanupStack::PushL( self );
     self->ConstructL();
@@ -66,11 +66,11 @@
     {
     iBufferArray.ResetAndDestroy();
     }
-    
+
 // -----------------------------------------------------------------------------
 // Constructor
 // -----------------------------------------------------------------------------
-//	
+//
 CGlxCommandHandlerAiwShowMap::CGlxCommandHandlerAiwShowMap(
     MGlxMediaListProvider* aMediaListProvider, TInt aMenuResource )
         : CGlxCommandHandlerAiwBase( aMediaListProvider, aMenuResource )
@@ -80,7 +80,7 @@
 // -----------------------------------------------------------------------------
 // CGlxCommandHandlerAiwShowMap::DoGetRequiredAttributesL
 // -----------------------------------------------------------------------------
-//	
+//
 void CGlxCommandHandlerAiwShowMap::DoGetRequiredAttributesL
                     (RArray<TMPXAttribute>& aAttributes, TBool aFilterUsingSelection) const
     {
@@ -93,31 +93,32 @@
 // -----------------------------------------------------------------------------
 // AiwDoDynInitMenuPaneL
 // -----------------------------------------------------------------------------
-//	
-void CGlxCommandHandlerAiwShowMap::AiwDoDynInitMenuPaneL(TInt /*aResourceId*/, 
+//
+void CGlxCommandHandlerAiwShowMap::AiwDoDynInitMenuPaneL(TInt /*aResourceId*/,
         CEikMenuPane* aMenuPane)
     {
 	TInt num_items = aMenuPane->NumberOfItemsInPane();
-	
+
 	// Iterate through menu pane
 	TInt i = 0;
 	while (i < num_items)
 		{
 		CEikMenuPaneItem::SData& item = aMenuPane->ItemDataByIndexL(i);
-        
+
         // "Show on map" cannot be dimmed as AIW resets the flags to not dimmed
         // Have to delete the menu item in this case.
         if (EGlxCmdAiwShowMap == item.iCommandId)
             {
-            // Check visibility of the menu item
-            TBool isDisabled = IsItemWithLocationInfoSelected(MediaList());
-            
+            //Check visibility of the menu item
+            //Fix for  ESLM-7XFF9L:Must always be disabled in all cases.
+            TBool isDisabled = ETrue;
+
             // Should it be disabled
-            if ( (isDisabled) || 
-                 (MediaList().SelectionCount() != 1 && 
+            if ( (isDisabled) ||
+                 (MediaList().SelectionCount() != 1 &&
                  !IsInFullScreenViewingModeL()) )
                 {
-                // if so delete it. 
+                // if so delete it.
                 aMenuPane->DeleteMenuItem(EGlxCmdAiwShowMap);
                 }
             break;
@@ -125,50 +126,50 @@
         ++i;
 		}
     }
-    
+
 // -----------------------------------------------------------------------------
 // CommandId
 // -----------------------------------------------------------------------------
-//	
+//
 TInt CGlxCommandHandlerAiwShowMap::CommandId() const
     {
     TRACER("CGlxCommandHandlerAiwShowMap::CommandId");
     return EGlxCmdAiwShowMap;
     }
-    
+
 // -----------------------------------------------------------------------------
 // AiwCommandId
 // -----------------------------------------------------------------------------
-//	
+//
 TInt CGlxCommandHandlerAiwShowMap::AiwCommandId() const
     {
     TRACER("CGlxCommandHandlerAiwShowMap::AiwCommandId");
     return KAiwCmdMnShowMap;
     }
-    
+
 // -----------------------------------------------------------------------------
 // AiwInterestResource
 // -----------------------------------------------------------------------------
-//	
+//
 TInt CGlxCommandHandlerAiwShowMap::AiwInterestResource() const
     {
     TRACER("CGlxCommandHandlerAiwShowMap::AiwInterestResource");
     return R_GLX_AIW_SHOWMAP_INTEREST;
     }
-        
+
 // -----------------------------------------------------------------------------
 // AppendAiwParameterL
 // -----------------------------------------------------------------------------
-//	
-TBool CGlxCommandHandlerAiwShowMap::AppendAiwParameterL(const TGlxMedia& aItem, 
+//
+TBool CGlxCommandHandlerAiwShowMap::AppendAiwParameterL(const TGlxMedia& aItem,
                                      CGlxAiwServiceHandler& aAiwServiceHandler)
     {
     TRACER("CGlxCommandHandlerAiwShowMap::AppendAiwParameterL");
     TBool success = EFalse;
-    
+
     // Cleanup before execution
     iBufferArray.ResetAndDestroy();
-    
+
     TCoordinate coordinate;
     if (aItem.GetCoordinate(coordinate))
         {
@@ -181,30 +182,30 @@
 
         // locality must have valid (ie not NaN) values
         landmark->SetPositionL( locality );
-        
+
         // Serialize buffer to landmark and append it to AIW parameter
-        const HBufC8* landmarkBuf = 
+        const HBufC8* landmarkBuf =
             PosLandmarkSerialization::PackL( *landmark );
         // we have ownership of landmarkBuf so add to array
         // for cleanup on our destruction
         iBufferArray.AppendL( landmarkBuf );
-       
+
          // Append location parameter to the AIW param list
-        TAiwVariant landmarkVariant( *landmarkBuf );        
+        TAiwVariant landmarkVariant( *landmarkBuf );
         TAiwGenericParam landmarkParam( EGenericParamLandmark, landmarkVariant );
         aAiwServiceHandler.AddParamL(aItem.Id(), landmarkParam );
 
         success = ETrue;
         CleanupStack::PopAndDestroy( landmark );
         }
-    
+
     return success;
     }
-    
+
 // -----------------------------------------------------------------------------
 // CommandSpace
 // -----------------------------------------------------------------------------
-//	
+//
 TInt CGlxCommandHandlerAiwShowMap::CommandSpace() const
     {
     TRACER("CGlxCommandHandlerAiwShowMap::CommandSpace");
@@ -215,19 +216,19 @@
 // DoIsDisabled
 // -----------------------------------------------------------------------------
 //
-// 
+//
 TBool CGlxCommandHandlerAiwShowMap::IsItemWithLocationInfoSelected(MGlxMediaList& aList )
     {
     TRACER("CGlxCommandHandlerAiwShowMap::DoIsDisabled");
     // Disable the "Show on map" menu item if the selection (marked list,
-    // or focused item if none marked) does not contain any items 
+    // or focused item if none marked) does not contain any items
     // that have location data
     TBool isSupported = EFalse;
-    
+
     // Check through all, if any, selected items, otherwise the focused item
     TGlxSelectionIterator iterator;
     iterator.SetToFirst( &aList );
-    
+
     // Loop until a supported item is found or until there are no
     // more indexes to process
     TInt index = KErrNotFound;
@@ -235,12 +236,12 @@
         {
         // get the media item
         const TGlxMedia& media = aList.Item( index );
-        
+
         // Test to see if the coordinate is present
         TCoordinate coordinate;
         isSupported = media.GetCoordinate(coordinate);
         }
-        
+
     // Don't disable the menu item if the property's supported
     return !isSupported;
     }
@@ -263,10 +264,10 @@
     TBool fullscreenViewingMode = EFalse;
     CGlxNavigationalState* aNavigationalState = CGlxNavigationalState::InstanceL();
     CMPXCollectionPath* naviState = aNavigationalState->StateLC();
-    
+
     if ( naviState->Levels() >= 1)
         {
-        if (aNavigationalState->ViewingMode() == NGlxNavigationalState::EBrowse) 
+        if (aNavigationalState->ViewingMode() == NGlxNavigationalState::EBrowse)
             {
             // For image viewer collection, goto view mode
             if (naviState->Id() == TMPXItemId(KGlxCollectionPluginImageViewerImplementationUid))
@@ -274,12 +275,12 @@
                 //it means we are in img viewer
                 fullscreenViewingMode = ETrue;
                 }
-            } 
-        else 
+            }
+        else
             {
             //it means we are in Fullscreen
             fullscreenViewingMode = ETrue;
-            }                
+            }
         }
     CleanupStack::PopAndDestroy( naviState );
     aNavigationalState->Close();
--- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandleraiwshowonmaphardkey.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandleraiwshowonmaphardkey.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -175,99 +175,5 @@
     
     }   
  
-//  The below code is commented out as this implementation is for Future commandhandler
-//  To check map service providers
-//  To navigate to the location
-
-/*
-// -----------------------------------------------------------------------------
-// CGlxCommandHandlerAiwShowMapHardKey::NavigateToPlaceL
-// It will navigate to location
-// -----------------------------------------------------------------------------
-void CGlxCommandHandlerAiwShowMapHardKey::NavigateToPlaceL(  const TCoordinate& aCoordinate )
-    {
-    CPosLandmark* lmk = CPosLandmark::NewLC();
-    TLocality locality;
-    HBufC8* lmBuf;
-    
-    //set location
-    locality.SetCoordinate( aCoordinate.Latitude(), aCoordinate.Longitude(), aCoordinate.Altitude() );
-    lmk->SetPositionL(locality);
-    
-    //set in parameters
-    iInList->Reset();
-    lmBuf =PosLandmarkSerialization::PackL( *lmk );
-    CleanupStack::PushL( lmBuf );
-    TAiwGenericParam param( EGenericParamLandmark, TAiwVariant( *lmBuf ) );     
-    iInList->AppendL( param );       
-    TMnAiwCommonOptionsParam options;
-    options.iRunChained = EFalse;
-    TPckg<TMnAiwCommonOptionsParam> optionsPack( options );
-    TAiwGenericParam optParam( EGenericParamMnCommonOptions, TAiwVariant( optionsPack ) );
-    iInList->AppendL( optParam );
-        
-    //navigate to location
-  //  iAiwServiceHandler->AttachL( R_EVTMGMTUI_AIW_INTEREST_NAVIGATETO );
-    iAiwServiceHandler->ExecuteServiceCmdL( KAiwCmdMnNavigateTo, *iInList, *iOutList, 0, this ); 
-    
-    CleanupStack::PopAndDestroy( 2 ); //lmbuf, lmk
-    }
-        
-        
-// -----------------------------------------------------------------------------
-// CGlxCommandHandlerAiwShowMapHardKey::MapServiceProvidersL
-// It will return total map service providers.
-// @ret total number of map service providers
-// -----------------------------------------------------------------------------
-//
-TInt CGlxCommandHandlerAiwShowMapHardKey::MapServiceProvidersL()
-    {
-#if 0
-    RPointerArray<CMnProvider> providers;
-    // get all providers
-    MnProviderFinder::FindProvidersL( providers );
-    TInt total = providers.Count();
-    providers.ResetAndDestroy();
-    providers.Close();
-    //  Debug(_L("Total map service providers = %d"), total);
-    return total;
-#endif
-    return 0;
-    }
-*/
-// -----------------------------------------------------------------------------
-// CGlxCommandHandlerAiwShowMapHardKey::HandleNotifyL
-// Derived from MAiwNotifyCallback
-// -----------------------------------------------------------------------------
-//TInt CGlxCommandHandlerAiwShowMapHardKey::HandleNotifyL( TInt aCmdId, 
-//                                                    TInt aEventId, 
-//                                                    CAiwGenericParamList& aEventParamList,
-//                                                    const CAiwGenericParamList& aInParamList )
-//    {
-//    if ( iOutList->Count() ) //if location is selected on map
-//        {
-//        const TAiwGenericParam& param = ( *iOutList )[0];
-//        if ( EGenericParamLandmark == param.SemanticId() )
-//            {
-//            TPtrC8 landmarkData( param.Value().AsData() );
-//            CPosLandmark* lm = PosLandmarkSerialization::UnpackL( landmarkData );
-//            CleanupStack::PushL( lm );           
-//            
-//            SetPlaceFromLandmarkL( *lm );
-//            CleanupStack::PopAndDestroy( lm );
-//            iOutList->Reset(); 
-//            iObserver->HandleMapAndNavigationResponseL( KErrNone, *iPlace, iTriggerLocation );
-//            }
-//        else
-//            {
-//            iOutList->Reset(); 
-//            iObserver->HandleMapAndNavigationResponseL( KErrCancel, *iPlace, iTriggerLocation );             
-//            }         
-//        }
-//    else //if map application is cancelled
-//        iObserver->HandleMapAndNavigationResponseL( KErrCancel, *iPlace, iTriggerLocation );
-//    return KErrNone;
-//    }
-
 // End of file
 
--- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlerback.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlerback.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -149,8 +149,14 @@
 
 	GLX_LOG_INFO1( "CGlxCommandHandlerBack::ExecuteL::Command Id (%d)",
 	    aCommandId );
-	    
-	if ( aCommandId == EAknSoftkeyBack )
+	if(EAknSoftkeyClose == aCommandId)
+		{
+        GLX_LOG_INFO("CGlxCommandHandlerBack::ExecuteL::goto \
+	                    root in UI hierarchy");
+        iNavigationalState->NavigateToParentL();
+		consume = ETrue;
+		}   
+	else if ( aCommandId == EAknSoftkeyBack )
     	{
     	switch( iCurrentCommandId )
     		{
--- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlerdetails.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlerdetails.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -115,7 +115,6 @@
 		   			   	
    	TCommandInfo infoSubMenu(EGlxCmdDetailsOption);
     infoSubMenu.iViewingState = TCommandInfo::EViewingStateBrowse;
-   	//AddCommandL(infoSubMenu);
    	
    	// register for the reset view command so that we can 
    	// dismiss the dialog if it is being shown when we are activated
--- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlerrotate.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlerrotate.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -209,7 +209,6 @@
             TInt /*aOldIndex*/, MGlxMediaList* /*aList*/)
     {
     TRACER("CGlxCommandHandlerRotate::HandleFocusChangedL");
-    //Not required as we are doing this after each rotation DoPreserveOrientationL();
     DoCleanupRotationParametersL();
     
     iMediaList = NULL;
@@ -462,9 +461,6 @@
         delete iExifWriter;
         iExifWriter = NULL;
         } 
-    //This will be called when there would be a change in Media list focus.
-    //So removing the call from here
-    //DoCleanupRotationParameters();
     }
 // ---------------------------------------------------------------------------
 // DoInitializeRotationParameters
@@ -532,14 +528,10 @@
     command->SetTObjectValueL<TAny*>(KMPXCommandGeneralSessionId, static_cast<TAny*>(this));
     
     //Nitz To Do Initialize cleanup command Just for the respective Media Items
-  //TGlxMediaId itemId= iGlxItem->Id();
-  //  command->SetTObjectValueL<TMPXItemId>(KMPXMediaGeneralId,itemId.Value()); 
     iMediaList->CommandL(*command);
     CleanupStack::PopAndDestroy(command);
     iMediaList->RemoveMediaListObserver(this);
     iAddedObserver=EFalse;
-    //CGlxTextureManager& tm = iUiUtility->GlxTextureManager();
-    //tm.UpdateThumbnailTexture(*iGlxItem);
     iMediaList = NULL;
     iGlxItem = NULL;
 
--- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlersend.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlersend.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -156,9 +156,6 @@
 
     iViewId = aViewId;
 	MGlxMediaList& mediaList = MediaList();
-                  
-                     // TAP2GenericPluginParams::EGenericStdIconSend,
-   //                 TAP2GenericPluginParams::EGenericStdIconSendMask);
 
 	// need to check the category attribute for image or video
     iAttributeContext = CGlxDefaultAttributeContext::NewL();
@@ -217,11 +214,6 @@
 	if ( aList && aNewIndex >= 0 )
 		{
 		const CGlxMedia* media = aList->Item(aNewIndex).Properties();  
-		if (media)
-			{// show the active palette send item
-		//    iUiUtility->ScreenFurniture().ShowActivePaletteItemL(iViewId, 
-		//				EGlxCmdSend, IsValidTypeL(*media));	
-			}
 		}	
 	}
 
--- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlerslideshow.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlerslideshow.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -98,9 +98,7 @@
     CGlxResourceUtilities::GetResourceFilenameL(resourceFile);  
    	iResourceOffset = CCoeEnv::Static()->AddResourceFileL( resourceFile );
 
-   // CGlxSettingsModel* model = CGlxSettingsModel::InstanceL();
-    iShowInToolbar = ETrue; //model->ShowSlideshowInToolbar();
-   // model->Close();
+    iShowInToolbar = ETrue;
 
    	// Add supported commands with filter fields
    	// Play slideshow forwards
@@ -124,10 +122,6 @@
 	info.iCategoryRule = categoryRule;
    	AddCommandL( info );
    	
-   	// Play slideshow backwards: only the id changes
-   	//info.iCommandId = EGlxCmdSlideshowPlayBackwards;
-   	//AddCommandL( info );
-
     // new info to get the default filters
    	TCommandInfo info_show_always( EGlxCmdSlideshowSettings );
    	// Disable for empty views and views with only static items
--- a/photosgallery/viewframework/dataprovider/src/glxmulmodelproviderbase.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/dataprovider/src/glxmulmodelproviderbase.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -195,10 +195,7 @@
 				{
 				if ( !iWithinFocusChangeCall )
 					{
-					// iWithinFocusChangeCall = ETrue;
 					HandleFocusChanged( FocusIndex(), iPreviousFocusIndex );
-					//iPreviousFocusIndex = FocusIndex();
-					//iWithinFocusChangeCall = EFalse;
 					}
 				response = EEventHandled;
 				}
@@ -452,7 +449,14 @@
         // Check if Model count is zero in FS view, activate back grid view.
         if (iModel->Count() ==0)
             {
-            TRAP_IGNORE( iNavigationalState->ActivatePreviousViewL() );    
+            // if Count is Zero, set the navigation state to 
+            // EGlxNavigationBackwards before going back to grid view
+            CGlxUiUtility* uiUtility = CGlxUiUtility::UtilityL();
+            CleanupClosePushL( *uiUtility );
+            uiUtility->SetViewNavigationDirection(EGlxNavigationBackwards);
+            CleanupStack::PopAndDestroy( uiUtility );
+            
+            TRAP_IGNORE( iNavigationalState->ActivatePreviousViewL() );            
             }
         }
     else
--- a/photosgallery/viewframework/dataprovider/src/glxthumbnailvarianttype.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/dataprovider/src/glxthumbnailvarianttype.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -122,7 +122,8 @@
         {
         GLX_DEBUG1("GlxThumbnailVariantType::CreateAnimatedGifTextureL");
         TRAP( err, mTextureId = iUiUtility->GlxTextureManager().
-            CreateAnimatedGifTextureL( uri, aSize ).Id() );
+            CreateAnimatedGifTextureL( uri, aSize, aMedia, 
+                                       aMedia.IdSpaceId() ).Id() );
         }
     //URI length could be zero for Media Id based Thumbnail fetch
     else if ( fsTnmAvailable ) 
@@ -131,21 +132,34 @@
 	    TMPXGeneralCategory cat = aMedia.Category();
 	    if(drm)
             {
-            expired = iDrmUtility->CheckOpenRightsL(uri, (cat == EMPXImage));
+
+            //Fix for ESLM-82WJ59: call 'CheckDisplayRightsL' only for focused item
+            if(aIsFocused)
+            	{
+            	expired = !iDrmUtility->CheckDisplayRightsL(uri, (cat == EMPXImage));
+            	}
+            else
+            	{
+            	//Fix for ESLM-82WJ59: for validity check of non-focused item
+            	expired = !iDrmUtility->CheckOpenRightsL(uri, (cat == EMPXImage));
+            	}
+
+            //Fix for ESLM-82WJ59: mush easier to understand.
             if( expired )
                 {
-               if ( isValid )
-                    {
-                    // Fix for EABI-7RL9DD
-                    // Replaced defaultSize with aSize
-                    TRAP( err, mTextureId = iUiUtility->GlxTextureManager().CreateThumbnailTextureL(
-                                                    aMedia, aMedia.IdSpaceId(), aSize, this ).Id() );
-                    }
+                TRAP( err, mTextureId = iUiUtility->GlxTextureManager().CreateIconTextureL(
+                                                                    EMbmGlxiconsQgn_prop_image_notcreated, resFile, defaultSize ).Id() );
                 }
             else
                 {
-                TRAP( err, mTextureId = iUiUtility->GlxTextureManager().CreateIconTextureL( 
-                                                    EMbmGlxiconsQgn_prop_image_notcreated, resFile, defaultSize ).Id() );
+                if ( isValid == EGlxDrmRightsValid)
+					{
+					// Fix for EABI-7RL9DD
+					// Replaced defaultSize with aSize
+					TRAP( err, mTextureId = iUiUtility->GlxTextureManager().CreateThumbnailTextureL(
+													aMedia, aMedia.IdSpaceId(), aSize, this ).Id() );
+					}
+
                 }
             } 
 		else
@@ -175,7 +189,7 @@
 				//Have to relook at this.
                 if(origSize.iWidth > defaultSize.iWidth && origSize.iHeight > defaultSize.iHeight)
                       {
-					  GLX_DEBUG1("GlxThumbnailVariantType::CreateIconTextureL::ScaledTnm");
+					  GLX_DEBUG1("GlxThumbnailVariantType::CreateThumbnailTextureL::ScaledTnm");
                       TRAP( err, mTextureId = iUiUtility->GlxTextureManager().CreateThumbnailTextureL( 
                                 aMedia, aMedia.IdSpaceId(), aSize, this, ETrue ).Id() );
 					  if(err == KErrNone)
@@ -218,7 +232,6 @@
     TBool drmRightsChecked = EFalse;
     // minimum size (111 x 83)
     TInt minSize = KGlxThumbnailDrmWidth * KGlxThumbnailDrmHeight;
-    //TInt minSize =  111*83 ;
     // size of actual image
     TInt imgSize = aImageSize.iWidth * aImageSize.iHeight;
     
@@ -326,7 +339,6 @@
     
     if ( iUiUtility)
 		{
-//		iUiUtility->GlxTextureManager().RemoveTexture( mTextureId );
 		iUiUtility->Close ();
 		}
     }
@@ -453,7 +465,6 @@
     TRACER("GlxIconVariantType::~GlxIconVariantType");
 	if ( iUiUtility)
 		{
-//		iUiUtility->GlxTextureManager().RemoveTexture( mTextureId );
 		iUiUtility->Close ();
 		}
     }
--- a/photosgallery/viewframework/drmutility/bwins/glxdrmutilityu.def	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/drmutility/bwins/glxdrmutilityu.def	Mon Mar 15 12:40:30 2010 +0200
@@ -1,15 +1,16 @@
 EXPORTS
-	?CanSetAsAutomatedL@CGlxDRMUtility@@QAEHABVTDesC16@@W4TGlxDrmAutomatedType@@@Z @ 1 NONAME ; int CGlxDRMUtility::CanSetAsAutomatedL(class TDesC16 const &, enum TGlxDrmAutomatedType)
-	?CanShowInfoOnlineL@CGlxDRMUtility@@QAEHAAVTDesC16@@@Z @ 2 NONAME ; int CGlxDRMUtility::CanShowInfoOnlineL(class TDesC16 &)
-	?CheckDisplayRightsL@CGlxDRMUtility@@QAEHABVTDesC16@@H@Z @ 3 NONAME ; int CGlxDRMUtility::CheckDisplayRightsL(class TDesC16 const &, int)
+	?SetAsAutomatedL@CGlxDRMUtility@@QAEXABVTDesC16@@W4TGlxDrmAutomatedType@@@Z @ 1 NONAME ; void CGlxDRMUtility::SetAsAutomatedL(class TDesC16 const &, enum TGlxDrmAutomatedType)
+	?CanSetAsAutomatedL@CGlxDRMUtility@@QAEHABVTDesC16@@W4TGlxDrmAutomatedType@@@Z @ 2 NONAME ; int CGlxDRMUtility::CanSetAsAutomatedL(class TDesC16 const &, enum TGlxDrmAutomatedType)
+	?IsForwardLockedL@CGlxDRMUtility@@QAEHABVTDesC16@@@Z @ 3 NONAME ; int CGlxDRMUtility::IsForwardLockedL(class TDesC16 const &)
 	?CheckOpenRightsL@CGlxDRMUtility@@QAEHABVTDesC16@@H@Z @ 4 NONAME ; int CGlxDRMUtility::CheckOpenRightsL(class TDesC16 const &, int)
-	?Close@CGlxDRMUtility@@QAEXXZ @ 5 NONAME ; void CGlxDRMUtility::Close(void)
-	?ConsumeRightsL@CGlxDRMUtility@@QAEHABVTDesC16@@@Z @ 6 NONAME ; int CGlxDRMUtility::ConsumeRightsL(class TDesC16 const &)
-	?DRMThumbnailSize@CGlxDRMUtility@@QAE?AVTSize@@AAV2@@Z @ 7 NONAME ; class TSize CGlxDRMUtility::DRMThumbnailSize(class TSize &)
+	?ConsumeRightsL@CGlxDRMUtility@@QAEHABVTDesC16@@@Z @ 5 NONAME ; int CGlxDRMUtility::ConsumeRightsL(class TDesC16 const &)
+	?CheckDisplayRightsL@CGlxDRMUtility@@QAEHABVTDesC16@@H@Z @ 6 NONAME ; int CGlxDRMUtility::CheckDisplayRightsL(class TDesC16 const &, int)
+	?ShowRightsInfoL@CGlxDRMUtility@@QAEXABVTDesC16@@@Z @ 7 NONAME ; void CGlxDRMUtility::ShowRightsInfoL(class TDesC16 const &)
 	?InstanceL@CGlxDRMUtility@@SAPAV1@XZ @ 8 NONAME ; class CGlxDRMUtility * CGlxDRMUtility::InstanceL(void)
-	?IsForwardLockedL@CGlxDRMUtility@@QAEHABVTDesC16@@@Z @ 9 NONAME ; int CGlxDRMUtility::IsForwardLockedL(class TDesC16 const &)
-	?SetAsAutomatedL@CGlxDRMUtility@@QAEXABVTDesC16@@W4TGlxDrmAutomatedType@@@Z @ 10 NONAME ; void CGlxDRMUtility::SetAsAutomatedL(class TDesC16 const &, enum TGlxDrmAutomatedType)
-	?ShowDRMDetailsPaneL@CGlxDRMUtility@@QAEXABVTDesC16@@@Z @ 11 NONAME ; void CGlxDRMUtility::ShowDRMDetailsPaneL(class TDesC16 const &)
-	?ShowInfoOnlineL@CGlxDRMUtility@@QAEXAAVTDesC16@@@Z @ 12 NONAME ; void CGlxDRMUtility::ShowInfoOnlineL(class TDesC16 &)
-	?ShowRightsInfoL@CGlxDRMUtility@@QAEXABVTDesC16@@@Z @ 13 NONAME ; void CGlxDRMUtility::ShowRightsInfoL(class TDesC16 const &)
+	?ClearLastConsumedItemUri@CGlxDRMUtility@@QAEXXZ @ 9 NONAME ; void CGlxDRMUtility::ClearLastConsumedItemUri(void)
+	?ShowDRMDetailsPaneL@CGlxDRMUtility@@QAEXABVTDesC16@@@Z @ 10 NONAME ; void CGlxDRMUtility::ShowDRMDetailsPaneL(class TDesC16 const &)
+	?ShowInfoOnlineL@CGlxDRMUtility@@QAEXAAVTDesC16@@@Z @ 11 NONAME ; void CGlxDRMUtility::ShowInfoOnlineL(class TDesC16 &)
+	?DRMThumbnailSize@CGlxDRMUtility@@QAE?AVTSize@@AAV2@@Z @ 12 NONAME ; class TSize CGlxDRMUtility::DRMThumbnailSize(class TSize &)
+	?CanShowInfoOnlineL@CGlxDRMUtility@@QAEHAAVTDesC16@@@Z @ 13 NONAME ; int CGlxDRMUtility::CanShowInfoOnlineL(class TDesC16 &)
+	?Close@CGlxDRMUtility@@QAEXXZ @ 14 NONAME ; void CGlxDRMUtility::Close(void)
 
--- a/photosgallery/viewframework/drmutility/eabi/glxdrmutilityu.def	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/drmutility/eabi/glxdrmutilityu.def	Mon Mar 15 12:40:30 2010 +0200
@@ -10,6 +10,7 @@
 	_ZN14CGlxDRMUtility18CanShowInfoOnlineLER7TDesC16 @ 9 NONAME
 	_ZN14CGlxDRMUtility19CheckDisplayRightsLERK7TDesC16i @ 10 NONAME
 	_ZN14CGlxDRMUtility19ShowDRMDetailsPaneLERK7TDesC16 @ 11 NONAME
-	_ZN14CGlxDRMUtility5CloseEv @ 12 NONAME
-	_ZN14CGlxDRMUtility9InstanceLEv @ 13 NONAME
+	_ZN14CGlxDRMUtility24ClearLastConsumedItemUriEv @ 12 NONAME
+	_ZN14CGlxDRMUtility5CloseEv @ 13 NONAME
+	_ZN14CGlxDRMUtility9InstanceLEv @ 14 NONAME
 
--- a/photosgallery/viewframework/drmutility/inc/glxdrmutility.h	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/drmutility/inc/glxdrmutility.h	Mon Mar 15 12:40:30 2010 +0200
@@ -109,8 +109,12 @@
       * @return ETrue to no error in rights consumption
       */
     IMPORT_C TBool ConsumeRightsL(const TDesC& aUri);
-    
-    
+
+    /**
+     * Fix for ESLM-82WJ59:
+     * Clears Last Consumed Uri
+     */
+    IMPORT_C void ClearLastConsumedItemUri();
 
     /**
      * Test whether a media item is OMA DRM 2.0 protected and has an associated
--- a/photosgallery/viewframework/drmutility/src/glxdrmutility.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/drmutility/src/glxdrmutility.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -122,16 +122,25 @@
     
 //============================================================================
 // CheckOpenRightsL
-//============================================================================ 
-EXPORT_C TBool CGlxDRMUtility::CheckOpenRightsL( const TDesC& aUri, 
+// Fix for ESLM-82WJ59:always call 'CheckOpenRightsL' only for checking DRM
+// rights validity for item.
+//============================================================================
+EXPORT_C TBool CGlxDRMUtility::CheckOpenRightsL( const TDesC& aUri,
                                                 TBool aCheckViewRights )
     {
     TRACER("CGlxDRMUtility::CheckOpenRightsL()");
-    // When checking current rights for a URI, clear stored URI
-    TPtr ptr = iLastConsumedItemUri->Des();
-    ptr.Zero();
-    iLastConsumedItemUri = iLastConsumedItemUri->ReAllocL( 0 );
+    // When checking current rights for a URI
 
+    // Fix for ESLM-82WJ59: Allow to Open if rights for a URI was just consumed (i.e. same as stored URI)
+	if ( iLastConsumedItemUri->Length() > 0 )
+		{
+		if ( aUri.CompareF( *iLastConsumedItemUri ) == 0 )
+			{
+			return ETrue;
+			}
+		}
+
+	// Fix for ESLM-82WJ59: Else for uri of non-focused uri, just check validity rights
     TBool rightsValid = EFalse;
     TVirtualPathPtr path( aUri, KDefaultContentObject() );
 
@@ -146,11 +155,13 @@
 
 //============================================================================
 // CheckDisplayRightsL
-//============================================================================ 
-EXPORT_C TBool CGlxDRMUtility::CheckDisplayRightsL( const TDesC& aUri, 
+// Fix for ESLM-82WJ59:always call 'CheckDisplayRightsL' only for focused item.
+//============================================================================
+EXPORT_C TBool CGlxDRMUtility::CheckDisplayRightsL( const TDesC& aUri,
                                                     TBool aCheckViewRights )
     {
     TRACER("CGlxDRMUtility::CheckDisplayRightsL()");
+
     // Allow to display if rights for a URI was just consumed (i.e. same as stored URI)
     if ( iLastConsumedItemUri->Length() > 0 )
         {
@@ -160,7 +171,10 @@
             }
         }
 
-    // Otherwise, check current rights for the URI
+    //Fix for ESLM-82WJ59: Clear the stored uri since focus has changed
+    ClearLastConsumedItemUri();
+
+    // Otherwise, check current rights for the URI of newly focused item
     return CheckOpenRightsL( aUri, aCheckViewRights );
     }
 
@@ -176,17 +190,16 @@
     // Tell the agent we are planning to display the content
     CData* data = CData::NewLC(path, ContentAccess::EView, EContentShareReadOnly);
 
-    // When consuming rights for a URI, clear stored URI
-    TPtr oldPtr = iLastConsumedItemUri->Des();
-    oldPtr.Zero();
-    iLastConsumedItemUri = iLastConsumedItemUri->ReAllocL( aUri.Length() );
+    //Fix for ESLM-82WJ59: When consuming rights for a URI, clear stored URI
+    ClearLastConsumedItemUri();
 
     // Execute the intent, tell the agent that we plan to display the content
     // It is at this point that any stateful rights will be decremented
     TInt err = data->ExecuteIntent(ContentAccess::EView);
     if ( err == KErrNone )
         {
-        // Update stored URI
+        //Fix for ESLM-82WJ59: Update stored URI
+        iLastConsumedItemUri = iLastConsumedItemUri->ReAllocL( aUri.Length() );
         TPtr newPtr = iLastConsumedItemUri->Des();
         newPtr.Copy( aUri );
         }
@@ -197,6 +210,18 @@
     }
 
 //============================================================================
+//Fix for ESLM-82WJ59:
+//Clears Last Consumed Uri
+//============================================================================
+EXPORT_C void CGlxDRMUtility::ClearLastConsumedItemUri()
+	{
+	//clears the stored uri
+	TPtr aPtr = iLastConsumedItemUri->Des();
+	aPtr.Zero();
+	iLastConsumedItemUri = iLastConsumedItemUri->ReAllocL( 0 );
+	}
+
+//============================================================================
 // Test whether a media item is OMA DRM 2.0 protected and has an associated
 // info URL.
 //============================================================================
--- a/photosgallery/viewframework/medialists/inc/glxcachemanager.h	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/medialists/inc/glxcachemanager.h	Mon Mar 15 12:40:30 2010 +0200
@@ -74,7 +74,7 @@
      * @param aMedia The media object 
      * @param aError Error
      */
-	void HandleCollectionMediaL(const TGlxIdSpaceId& aIdSpaceId, const CMPXMedia& aMedia, TInt aError);
+	void HandleCollectionMediaL(const TGlxIdSpaceId& aIdSpaceId, const CMPXMedia& aMedia, TInt aError, TBool aRequestNextAttr = ETrue);
 
 	/**
 	 * Informs that focus in the window of the list has changed. The lists 
--- a/photosgallery/viewframework/medialists/inc/glximagereader.h	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/medialists/inc/glximagereader.h	Mon Mar 15 12:40:30 2010 +0200
@@ -63,6 +63,7 @@
     static CGlxImageReader* NewL(MImageReadyCallBack& aNotify);
     ~CGlxImageReader();
     TInt GetDRMRightsL(TInt aAttribute);
+    TInt GetFrameCount();
 
 private:
     MImageReadyCallBack&                iNotify;
--- a/photosgallery/viewframework/medialists/src/glxcachemanager.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/medialists/src/glxcachemanager.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -320,7 +320,7 @@
 // HandleCollectionMediaL
 // -----------------------------------------------------------------------------
 //
-void CGlxCacheManager::HandleCollectionMediaL(const TGlxIdSpaceId& aIdSpaceId, const CMPXMedia& aMedia, TInt aError)
+void CGlxCacheManager::HandleCollectionMediaL(const TGlxIdSpaceId& aIdSpaceId, const CMPXMedia& aMedia, TInt aError, TBool aRequestNextAttr)
     {
     TRACER("CGlxCacheManager::HandleCollectionMediaL");
     
@@ -362,8 +362,10 @@
 
         CleanupStack::PopAndDestroy( &users );
         }
-    
-    MaintainCacheL();
+    if ( aRequestNextAttr )
+        {
+        MaintainCacheL();
+        }
     }
 
 // -----------------------------------------------------------------------------
@@ -647,6 +649,8 @@
                                 }
                             else
                                 {
+                                GLX_DEBUG1("GENERAL NON IV CASE - Fetch TN");
+                                GLX_DEBUG2("itemId = [%d] ", itemId.Value());
                                 CThumbnailObjectSource* source = CThumbnailObjectSource::NewLC(item.Uri(), 0);
                                 iThumbnailRequestIds.AppendL(TLoadingTN(
                                         iTnEngine->GetThumbnailL(*source), 
@@ -722,7 +726,17 @@
                                 RFile64& imageHandle = iImageViewerInstance->ImageFileHandle();
                                 if ( &imageHandle )
                                     {
-                                    fileName.Append(imageHandle.FullName(fileName));
+                                    if (iImageViewerInstance->IsPrivateGif())
+                                        {
+                                        __ASSERT_DEBUG(iImageViewerInstance->ImageUri(), Panic(EGlxPanicNullPointer));
+                                        fileName.Append(
+                                                iImageViewerInstance->ImageUri()->Des());
+                                        }
+                                    else
+                                        {
+                                        fileName.Append(imageHandle.FullName(
+                                                fileName));
+                                        }
                                     }
                                 else
                                     {
@@ -932,6 +946,11 @@
                             else if ( iRequestedAttrs[i] == KGlxMediaGeneralFramecount )
                                 {
                                 TInt fcount = 1;
+                                if(errInImage == KErrNone)
+                                    {
+                                    fcount = iReader->GetFrameCount();
+                                    }
+                                GLX_DEBUG2("Imageviewer Collection framecount(%d)", fcount);
                                 iMPXMedia->SetTObjectValueL(KGlxMediaGeneralFramecount, fcount);
                                 }
                             else if ( iRequestedAttrs[i] == KMPXMediaGeneralComment )
@@ -1499,17 +1518,12 @@
         iMPXMedia->SetNoNewLCObjectL(
                TMPXAttribute(KGlxMediaIdThumbnail, attributeId), tnAttribute);
         CleanupStack::PopAndDestroy(tnAttribute);
-
-        HandleCollectionMediaL(iThumbnailRequestIds[reqIndex].iSpaceId,
-                                                    *iMPXMedia, aError);
-        }
-    else
-        {
-        HandleCollectionMediaL(iThumbnailRequestIds[reqIndex].iSpaceId, 
-													*iMPXMedia, aError);
+        
         }
     
-    if (aQuality)
+     HandleCollectionMediaL(iThumbnailRequestIds[reqIndex].iSpaceId,
+                                                        *iMPXMedia, aError, aQuality);
+     if (aQuality)
         {
         FindLoadingById(aId, ETrue);
         }   
--- a/photosgallery/viewframework/medialists/src/glximagereader.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/medialists/src/glximagereader.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -28,6 +28,7 @@
 
 #include "glximagereader.h"
 
+const TInt KDefaultFrameCount = 1;
 
 // ---------------------------------------------------------
 // CGlxImageReader::NewL
@@ -136,7 +137,6 @@
         }
     }
 
-
 // ---------------------------------------------------------
 // CGlxImageReader::DoCancel
 // ---------------------------------------------------------
@@ -164,6 +164,7 @@
     GLX_DEBUG2("CGlxImageReader::RunL() reqStatus=%d", reqStatus);   
     iNotify.ImageSizeReady(reqStatus, size);
     }
+
 // ---------------------------------------------------------
 // CGlxImageReader::GetDRMRightsL
 // ---------------------------------------------------------
@@ -209,3 +210,18 @@
 	    }
     return value;
     }
+
+// ---------------------------------------------------------
+// CGlxImageReader::GetFrameCount
+// ---------------------------------------------------------
+//
+TInt CGlxImageReader::GetFrameCount()
+    {
+    TRACER("CGlxImageReader::GetFrameCount");
+    TInt frameCount = KDefaultFrameCount;
+    if (iImageDecoder)
+        {
+        frameCount = iImageDecoder->FrameCount();
+        }
+    return frameCount;
+    }
--- a/photosgallery/viewframework/medialists/src/glxmedialist.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/medialists/src/glxmedialist.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -1091,6 +1091,9 @@
                     HandleItemModifiedL(itemId, attributes);
                     CleanupStack::PopAndDestroy(&attributes);
                     iManager->HandleWindowChangedL(this);
+                    //Fix for Bug 'ESLM-827JU8 Vasco w03':Dont 'ReOpenL()' in any case
+	      			//Side Effect: Does not reorder album list in case of renaming album (To be handled later).
+	      			break;
 
                     // Drop through to perform sync, in case the order has changed
                     }
--- a/photosgallery/viewframework/texturemanager/bwins/glxtexturemanageru.def	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/texturemanager/bwins/glxtexturemanageru.def	Mon Mar 15 12:40:30 2010 +0200
@@ -11,9 +11,10 @@
 	?TextureNeedsUpdating@CGlxTextureManager@@QAEHVTGlxMedia@@V?$TGlxId@VTGlxIdSpaceIdBase@@@@ABVTSize@@@Z @ 10 NONAME ; int CGlxTextureManager::TextureNeedsUpdating(class TGlxMedia, class TGlxId<class TGlxIdSpaceIdBase>, class TSize const &)
 	?RemoveTexture@CGlxTextureManager@@QAEXABVCAlfTexture@@@Z @ 11 NONAME ; void CGlxTextureManager::RemoveTexture(class CAlfTexture const &)
 	?RemoveZoomList@CGlxTextureManager@@QAEXXZ @ 12 NONAME ; void CGlxTextureManager::RemoveZoomList(void)
-	?CreateAnimatedGifTextureL@CGlxTextureManager@@QAEAAVCAlfTexture@@ABVTDesC16@@ABVTSize@@@Z @ 13 NONAME ; class CAlfTexture & CGlxTextureManager::CreateAnimatedGifTextureL(class TDesC16 const &, class TSize const &)
+	?CreateAnimatedGifTextureL@CGlxTextureManager@@QAEAAVCAlfTexture@@ABVTDesC16@@ABVTSize@@@Z @ 13 NONAME ABSENT ; class CAlfTexture & CGlxTextureManager::CreateAnimatedGifTextureL(class TDesC16 const &, class TSize const &)
 	?CreateAvkonIconTextureL@CGlxTextureManager@@QAEAAVCAlfTexture@@ABVTAknsItemID@@VTSize@@@Z @ 14 NONAME ; class CAlfTexture & CGlxTextureManager::CreateAvkonIconTextureL(class TAknsItemID const &, class TSize)
 	?CreateColorIconTextureL@CGlxTextureManager@@QAEAAVCAlfTexture@@HAAVTDesC16@@VTRgb@@ABVTAknsItemID@@HVTSize@@@Z @ 15 NONAME ; class CAlfTexture & CGlxTextureManager::CreateColorIconTextureL(int, class TDesC16 &, class TRgb, class TAknsItemID const &, int, class TSize)
 	?CreateThumbnailTextureL@CGlxTextureManager@@QAEAAVCAlfTexture@@ABVTGlxMedia@@ABV?$TGlxId@VTGlxIdSpaceIdBase@@@@ABVTSize@@PAVMGlxTextureObserver@@H@Z @ 16 NONAME ; class CAlfTexture & CGlxTextureManager::CreateThumbnailTextureL(class TGlxMedia const &, class TGlxId<class TGlxIdSpaceIdBase> const &, class TSize const &, class MGlxTextureObserver *, int)
 	?CreateNewTextureForMediaL@CGlxTextureManager@@QAEAAVCAlfTexture@@VTSize@@ABVTGlxMedia@@ABV?$TGlxId@VTGlxIdSpaceIdBase@@@@PAVMGlxTextureObserver@@@Z @ 17 NONAME ; class CAlfTexture & CGlxTextureManager::CreateNewTextureForMediaL(class TSize, class TGlxMedia const &, class TGlxId<class TGlxIdSpaceIdBase> const &, class MGlxTextureObserver *)
+	?CreateAnimatedGifTextureL@CGlxTextureManager@@QAEAAVCAlfTexture@@ABVTDesC16@@ABVTSize@@ABVTGlxMedia@@V?$TGlxId@VTGlxIdSpaceIdBase@@@@@Z @ 18 NONAME ; class CAlfTexture & CGlxTextureManager::CreateAnimatedGifTextureL(class TDesC16 const &, class TSize const &, class TGlxMedia const &, class TGlxId<class TGlxIdSpaceIdBase>)
 
--- a/photosgallery/viewframework/texturemanager/eabi/glxtexturemanageru.def	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/texturemanager/eabi/glxtexturemanageru.def	Mon Mar 15 12:40:30 2010 +0200
@@ -12,7 +12,7 @@
 	_ZN18CGlxTextureManager23CreateColorIconTextureLEiR7TDesC164TRgbRK11TAknsItemIDi5TSize @ 11 NONAME
 	_ZN18CGlxTextureManager23CreateThumbnailTextureLERK9TGlxMediaRK6TGlxIdI17TGlxIdSpaceIdBaseERK5TSizeP19MGlxTextureObserveri @ 12 NONAME
 	_ZN18CGlxTextureManager24CreateFlatColourTextureLE4TRgb @ 13 NONAME
-	_ZN18CGlxTextureManager25CreateAnimatedGifTextureLERK7TDesC16RK5TSize @ 14 NONAME
+	_ZN18CGlxTextureManager25CreateAnimatedGifTextureLERK7TDesC16RK5TSizeRK9TGlxMedia6TGlxIdI17TGlxIdSpaceIdBaseE @ 14 NONAME
 	_ZN18CGlxTextureManager25CreateNewTextureForMediaLE5TSizeRK9TGlxMediaRK6TGlxIdI17TGlxIdSpaceIdBaseEP19MGlxTextureObserver @ 15 NONAME
 	_ZN18CGlxTextureManager28CreateColorAvkonIconTextureLERK11TAknsItemIDi4TRgbS2_i5TSize @ 16 NONAME
 	_ZN18CGlxTextureManager4NewLER18CAlfTextureManager @ 17 NONAME
--- a/photosgallery/viewframework/texturemanager/inc/glxtexturemanager.h	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/texturemanager/inc/glxtexturemanager.h	Mon Mar 15 12:40:30 2010 +0200
@@ -180,7 +180,7 @@
     * @param aMedia The media item
     * @param aAttribute Which attribute
     * @param aIdSpaceId The Id of the Id space in which the media Id is defined
-    * @param aTextureId The created texture's id, required when the texture is removed.
+    * @param aObserver Observer for the texture.
     * @return Created texture
     */
     IMPORT_C CAlfTexture& CreateZoomedTextureL(const TGlxMedia& aMedia,
@@ -198,10 +198,12 @@
     * Create an animated texture from a GIF file
     * @param aFilename The filename of the GIF file
     * @param aSize The size of the GIF file
+	* @param aMedia The media item
+	* @param aIdSpaceId The Id of the Id space in which the media Id is defined
     * @return Created texture: ownership transfered
     */
     IMPORT_C CAlfTexture& CreateAnimatedGifTextureL( const TDesC& aFilename, 
-        const TSize& aSize );
+       const TSize& aSize, const TGlxMedia& aMedia, TGlxIdSpaceId aIdSpaceId );
     
     /**
      * Creates a flat color texture and returns the reference to it
--- a/photosgallery/viewframework/texturemanager/inc/glxtexturemanagerimpl.h	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/texturemanager/inc/glxtexturemanagerimpl.h	Mon Mar 15 12:40:30 2010 +0200
@@ -136,7 +136,7 @@
     * @param aMedia The media item
     * @param aAttribute Which attribute
     * @param aIdSpaceId The Id of the Id space in which the media Id is defined
-    * @param aTextureId The created texture's id, required when the texture is removed.
+    * @param aObserver Observer for the texture.
     * @return Created texture
     */
     CAlfTexture& CreateZoomedTextureL(const TGlxMedia& aMedia,
@@ -154,10 +154,12 @@
     * Create an animated texture from a GIF file
     * @param aFilename The filename of the GIF file
     * @param aSize The size of the GIF file
+	* @param aMedia The media item
+	* @param aIdSpaceId The Id of the Id space in which the media Id is defined	
     * @return Created texture: ownership transfered
     */
-    CAlfTexture& CreateAnimatedGifTextureL(const TDesC& aFilename,
-        const TSize& aSize);
+    CAlfTexture& CreateAnimatedGifTextureL(const TDesC& aFilename, const TSize& aSize,
+                                           const TGlxMedia& aMedia, TGlxIdSpaceId aIdSpaceId);
 
     /**
      * Removes the texture if it was created by CreateThumbnailTextureL or
@@ -370,6 +372,19 @@
     void ScaleGridTnmToFsL(TSize aSrcSize, TSize aDestSize, 
             CFbsBitmap *aScaledBitmap, const CGlxThumbnailAttribute* thumb);
 
+
+    /**
+    * GetAnimatedGifThumbnailIndex
+    * @param aSize The size of the requested texture
+    * @param aMedia The TGlxMedia item.
+    * @param aIdSpaceId The Id of the Id space in which the media Id is defined	
+    * @param aThumbnailIndex on return will contain the Index of the thumbnail in the iAnimatedTnmList
+    *        or KErrNotFound
+    * @return ETrue if Thumbnail is available, EFalse if it needs to be created
+    */
+    TBool CGlxTextureManagerImpl::GetAnimatedGifThumbnailIndex( TSize aSize,
+            const TGlxMedia& aMedia, const TGlxIdSpaceId& aIdSpaceId,
+            TInt& aThumbnailIndex);
 private:
     // Alf Texture manager (not owned) 
     CAlfTextureManager& iAlfTextureManager;
@@ -386,6 +401,9 @@
     // List containing data for textures generated from zoomed thumbnail. 
     RArray<TGlxThumbnailIcon> iZoomedList;
 
+    // List containing data for textures generated from Animated thumbnail. 
+    RArray<TGlxThumbnailIcon> iAnimatedTnmList;
+        
     // List of .mif filenames of files containing icons. 
     CDesCArrayFlat* iMifFilenames;
     
--- a/photosgallery/viewframework/texturemanager/src/glxtexturemanager.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/texturemanager/src/glxtexturemanager.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -230,11 +230,12 @@
 // -----------------------------------------------------------------------------
 //  
 EXPORT_C CAlfTexture& CGlxTextureManager::CreateAnimatedGifTextureL(
-        const TDesC& aFilename,const TSize& aSize )
+        const TDesC& aFilename,const TSize& aSize,
+        const TGlxMedia& aMedia, TGlxIdSpaceId aIdSpaceId)
     {
     TRACER("CGlxTextureManager::CreateAnimatedGifTextureL");
     GLX_LOG_INFO( "CGlxTextureManager::CreateAnimatedGifTextureL" );
-    return iImpl->CreateAnimatedGifTextureL( aFilename, aSize );
+    return iImpl->CreateAnimatedGifTextureL( aFilename, aSize, aMedia, aIdSpaceId);
     }    		    
 
 // -----------------------------------------------------------------------------
--- a/photosgallery/viewframework/texturemanager/src/glxtexturemanagerimpl.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/texturemanager/src/glxtexturemanagerimpl.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -81,7 +81,9 @@
     iIconList.Close();
 
     iThumbnailList.Close();
-
+    
+    iAnimatedTnmList.Close();
+    
     // delete zoom textures
     count = iZoomedList.Count();
     GLX_LOG_INFO1("CGlxTextureManagerImpl iZoomedList.Count=%d",count);
@@ -476,6 +478,19 @@
             // iIconLIst should deleted only once in destructor as
             // they are using in full applicaiton
         }
+    
+    index = iAnimatedTnmList.Find( aTexture, &TGlxThumbnailIcon::MatchTexture );
+    GLX_LOG_INFO1("CGlxTextureManagerImpl RemoveTexture iAnimatedTnmList index=%d",index);
+    if ( index != KErrNotFound )
+        {
+        if(iAnimatedTnmList[index].iTexture)
+            {
+            GLX_LOG_INFO("RemoveTexture iAnimatedTnmList Stop animation");
+            (iAnimatedTnmList[index].iTexture)->StopAnimation();
+            }
+        iAnimatedTnmList.Remove( index );        
+        iAlfTextureManager.UnloadTexture( aTexture.Id() );
+        }
     }
 
 // -----------------------------------------------------------------------------
@@ -513,7 +528,7 @@
 void CGlxTextureManagerImpl::RemoveTexture(const TGlxMediaId& aMediaId,TBool aAllTexture )
     {
     TRACER("CGlxTextureManagerImpl::RemoveTexture 2");
-    //Bug fix for PKAA-7NRBYZ - added bAllTexture param
+    //Bug fix for PKAA-7NRBYZ - added aAllTexture param
     // Find the texture in the iThumbnailList
     TInt i = iThumbnailList.Count();
     while(i > 0)
@@ -529,6 +544,25 @@
                 break;
             }
         }
+    
+    i = iAnimatedTnmList.Count();
+    
+    while(i > 0)
+        {
+        --i;
+        if (iAnimatedTnmList[i].iMediaId == aMediaId)
+            {
+            GLX_LOG_INFO("RemoveTexture 2 iAnimatedTnmList MediaID found");
+            TInt aTexture = iAnimatedTnmList[i].iTextureId;
+            if(iAnimatedTnmList[i].iTexture)
+                {
+                GLX_LOG_INFO("RemoveTexture2 iAnimatedTnmList Stop animation");
+                (iAnimatedTnmList[i].iTexture)->StopAnimation();
+                }
+            iAnimatedTnmList.Remove(i);
+            iAlfTextureManager.UnloadTexture(aTexture );        
+            }
+        }
     }
 
 // -----------------------------------------------------------------------------
@@ -540,8 +574,8 @@
     TRACER("CGlxTextureManagerImpl::FlushTextures");
 
     TInt textureID ;
-    TInt i = iThumbnailList.Count();
     
+    TInt i = iThumbnailList.Count();    
     while(i > 0)
         {
         --i;
@@ -567,6 +601,20 @@
         iAlfTextureManager.UnloadTexture(textureID );
         iZoomedList[i].iTexture = NULL;
         }
+    
+    i = iAnimatedTnmList.Count();
+    while(i > 0)
+        {
+        --i;
+        textureID = iAnimatedTnmList[i].iTextureId;  
+        if(iAnimatedTnmList[i].iTexture)
+            {
+            GLX_LOG_INFO("FlushTextures iAnimatedTnmList Stop animation");
+            (iAnimatedTnmList[i].iTexture)->StopAnimation();
+            }
+        iAlfTextureManager.UnloadTexture(textureID);
+        iAnimatedTnmList[i].iTexture = NULL;
+        }
     }
 
 // -----------------------------------------------------------------------------
@@ -776,11 +824,45 @@
 // -----------------------------------------------------------------------------
 //  
 CAlfTexture& CGlxTextureManagerImpl::CreateAnimatedGifTextureL(
-    const TDesC& aFilename, const TSize& aSize)
+    const TDesC& aFilename, const TSize& aSize,const TGlxMedia& aMedia,
+    TGlxIdSpaceId aIdSpaceId)
     { 
     TRACER("CGlxTextureManagerImpl::CreateAnimatedGifTextureL");
-    return iAlfTextureManager.LoadTextureL(aFilename,aSize, 
-        EAlfTextureFlagDefault,NextTextureId() );
+    TInt thumbnailIndex = KErrNotFound;    
+    
+    // If the current thumbnail matches what is required then return the current texture otherwise
+    // create a new one.
+    if (!GetAnimatedGifThumbnailIndex( aSize, aMedia, aIdSpaceId,thumbnailIndex))
+        {
+        GLX_LOG_INFO("CreateAnimatedGifTextureL Texture already present");
+        // only texture is missing. 
+        if ((NULL == iAnimatedTnmList[thumbnailIndex].iTexture)) 
+            {            
+            CAlfTexture& newTexture = iAlfTextureManager.LoadTextureL(aFilename,aSize, 
+                    EAlfTextureFlagDefault,iAnimatedTnmList[thumbnailIndex].iTextureId );   
+            iAnimatedTnmList[thumbnailIndex].iTexture = &newTexture ;
+            }
+        return *iAnimatedTnmList[thumbnailIndex].iTexture;
+        }
+    
+    TGlxThumbnailIcon thumbData;    
+    thumbData.iTextureId = NextTextureId();
+    thumbData.iTexture = NULL;    
+    thumbData.iMediaId = aMedia.Id();
+    thumbData.iIdSpaceId = aIdSpaceId;
+    
+    iAnimatedTnmList.ReserveL( iAnimatedTnmList.Count() + 1 );
+
+    iAnimatedTnmList.Append(thumbData);
+    
+    CAlfTexture& newTexture = iAlfTextureManager.LoadTextureL(aFilename,aSize, 
+            EAlfTextureFlagDefault,thumbData.iTextureId );    
+    
+    TInt index = iAnimatedTnmList.Count()-1;
+    iAnimatedTnmList[index].iTexture = &newTexture;
+    iAnimatedTnmList[index].iRequiredSize = aSize;
+    
+    return newTexture;
     }
 
     
@@ -1026,7 +1108,10 @@
         // check if rights have expired
         TBool checkViewRights = (cat==EMPXImage);
 
-        drmInvalid = !iDrmUtility->CheckDisplayRightsL(uri, checkViewRights);
+        //Fix for ESLM-82WJ59: Since uri can be either focused or unfocused item
+        //better call CheckOpenRightsL which doesn't modify lastconsumedUri.
+        drmInvalid = !iDrmUtility->CheckOpenRightsL(uri, checkViewRights);
+
         CGlxMedia* properties = const_cast<CGlxMedia*>(aMedia.Properties());
         if( !drmInvalid )
             {
@@ -1093,7 +1178,11 @@
     return ++iNextTextureId;
     }
 
-    
+
+// -----------------------------------------------------------------------------
+// HandleBitmapDecodedL
+// -----------------------------------------------------------------------------
+//
 void CGlxTextureManagerImpl::HandleBitmapDecodedL(TInt aThumbnailIndex,CFbsBitmap* aBitmap)
     {
     TRACER("CGlxTextureManagerImpl::HandleBitmapDecodedL");
@@ -1222,3 +1311,34 @@
     GLX_LOG_INFO2("===== Actual Image Size %d x %d",aSrcSize.iWidth,aSrcSize.iHeight);
     GLX_LOG_INFO2("===== Scaled Image Size %d x %d",destinationSize.iWidth,destinationSize.iHeight);
     }
+
+
+// -----------------------------------------------------------------------------
+// GetAnimatedGifThumbnailIndex
+// -----------------------------------------------------------------------------
+//
+TBool CGlxTextureManagerImpl::GetAnimatedGifThumbnailIndex( TSize aSize,
+        const TGlxMedia& aMedia, const TGlxIdSpaceId& aIdSpaceId,
+        TInt& aThumbnailIndex)
+    {
+    TRACER("CGlxTextureManagerImpl::GetAnimatedGifThumbnailIndex");    
+    aThumbnailIndex = KErrNotFound;
+    
+    TInt i = iAnimatedTnmList.Count();
+
+    while(i > 0 && aThumbnailIndex == KErrNotFound)
+        {
+        --i;
+        if ((iAnimatedTnmList[i].iMediaId == aMedia.Id()) && 
+            (iAnimatedTnmList[i].iIdSpaceId == aIdSpaceId) &&            
+            (iAnimatedTnmList[i].iRequiredSize == aSize))
+            {
+            aThumbnailIndex = i;
+            GLX_LOG_INFO( "GetAnimatedGifThumbnailIndex textureid present" );
+            // We have found that the best match already exists
+            // No need to do anything
+            return EFalse;        
+            }
+        }
+    return ETrue;
+    }
--- a/photosgallery/viewframework/tvout/bwins/glxtvoutu.def	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/tvout/bwins/glxtvoutu.def	Mon Mar 15 12:40:30 2010 +0200
@@ -1,16 +1,17 @@
 EXPORTS
-	?ScreenSizeL@CGlxTv@@QBE?AVTSize@@XZ @ 1 NONAME ; class TSize CGlxTv::ScreenSizeL(void) const
-	??1CGlxTv@@UAE@XZ @ 2 NONAME ; CGlxTv::~CGlxTv(void)
-	??1CGlxHdmiController@@UAE@XZ @ 3 NONAME ; CGlxHdmiController::~CGlxHdmiController(void)
-	?SetImageL@CGlxHdmiController@@QAEXABVTDesC16@@VTSize@@HH@Z @ 4 NONAME ; void CGlxHdmiController::SetImageL(class TDesC16 const &, class TSize, int, int)
-	?IsWidescreen@CGlxTv@@QBEHXZ @ 5 NONAME ; int CGlxTv::IsWidescreen(void) const
-	?NewL@CGlxTv@@SAPAV1@AAVMGlxTvObserver@@@Z @ 6 NONAME ; class CGlxTv * CGlxTv::NewL(class MGlxTvObserver &)
-	?IsConnected@CGlxTv@@QBEHXZ @ 7 NONAME ; int CGlxTv::IsConnected(void) const
-	?IsVideo@CGlxHdmiController@@QAEXXZ @ 8 NONAME ; void CGlxHdmiController::IsVideo(void)
-	?NewL@CGlxHdmiController@@SAPAV1@ABVTDesC16@@@Z @ 9 NONAME ; class CGlxHdmiController * CGlxHdmiController::NewL(class TDesC16 const &)
-	?IsHDMIConnected@CGlxTv@@QBEHXZ @ 10 NONAME ; int CGlxTv::IsHDMIConnected(void) const
-	?ActivateZoom@CGlxHdmiController@@QAEXXZ @ 11 NONAME ; void CGlxHdmiController::ActivateZoom(void)
-	?DeactivateZoom@CGlxHdmiController@@QAEXXZ @ 12 NONAME ; void CGlxHdmiController::DeactivateZoom(void)
-	?ShiftToPostingMode@CGlxHdmiController@@QAEXXZ @ 13 NONAME ; void CGlxHdmiController::ShiftToPostingMode(void)
-	?ShiftToCloningMode@CGlxHdmiController@@QAEXXZ @ 14 NONAME ; void CGlxHdmiController::ShiftToCloningMode(void)
+	?ActivateZoom@CGlxHdmiController@@QAEXH@Z @ 1 NONAME ; void CGlxHdmiController::ActivateZoom(int)
+	?ScreenSizeL@CGlxTv@@QBE?AVTSize@@XZ @ 2 NONAME ; class TSize CGlxTv::ScreenSizeL(void) const
+	??1CGlxTv@@UAE@XZ @ 3 NONAME ; CGlxTv::~CGlxTv(void)
+	??1CGlxHdmiController@@UAE@XZ @ 4 NONAME ; CGlxHdmiController::~CGlxHdmiController(void)
+	?SetImageL@CGlxHdmiController@@QAEXABVTDesC16@@VTSize@@HH@Z @ 5 NONAME ; void CGlxHdmiController::SetImageL(class TDesC16 const &, class TSize, int, int)
+	?IsWidescreen@CGlxTv@@QBEHXZ @ 6 NONAME ; int CGlxTv::IsWidescreen(void) const
+	?IsHDMIConnected@CGlxHdmiController@@QAEHXZ @ 7 NONAME ; int CGlxHdmiController::IsHDMIConnected(void)
+	?ShiftToPostingMode@CGlxHdmiController@@QAEXXZ @ 8 NONAME ; void CGlxHdmiController::ShiftToPostingMode(void)
+	?ShiftToCloningMode@CGlxHdmiController@@QAEXXZ @ 9 NONAME ; void CGlxHdmiController::ShiftToCloningMode(void)
+	?IsConnected@CGlxTv@@QBEHXZ @ 10 NONAME ; int CGlxTv::IsConnected(void) const
+	?ItemNotSupported@CGlxHdmiController@@QAEXXZ @ 11 NONAME ; void CGlxHdmiController::ItemNotSupported(void)
+	?NewL@CGlxTv@@SAPAV1@AAVMGlxTvObserver@@@Z @ 12 NONAME ; class CGlxTv * CGlxTv::NewL(class MGlxTvObserver &)
+	?NewL@CGlxHdmiController@@SAPAV1@ABVTDesC16@@@Z @ 13 NONAME ; class CGlxHdmiController * CGlxHdmiController::NewL(class TDesC16 const &)
+	?IsHDMIConnected@CGlxTv@@QBEHXZ @ 14 NONAME ; int CGlxTv::IsHDMIConnected(void) const
+	?DeactivateZoom@CGlxHdmiController@@QAEXXZ @ 15 NONAME ; void CGlxHdmiController::DeactivateZoom(void)
 
--- a/photosgallery/viewframework/tvout/eabi/glxtvoutu.def	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/tvout/eabi/glxtvoutu.def	Mon Mar 15 12:40:30 2010 +0200
@@ -1,28 +1,29 @@
 EXPORTS
-	_ZN18CGlxHdmiController12ActivateZoomEv @ 1 NONAME
+	_ZN18CGlxHdmiController12ActivateZoomEi @ 1 NONAME
 	_ZN18CGlxHdmiController14DeactivateZoomEv @ 2 NONAME
-	_ZN18CGlxHdmiController4NewLERK7TDesC16 @ 3 NONAME
-	_ZN18CGlxHdmiController7IsVideoEv @ 4 NONAME
-	_ZN18CGlxHdmiController9SetImageLERK7TDesC165TSizeii @ 5 NONAME
-	_ZN18CGlxHdmiControllerD0Ev @ 6 NONAME
-	_ZN18CGlxHdmiControllerD1Ev @ 7 NONAME
-	_ZN18CGlxHdmiControllerD2Ev @ 8 NONAME
-	_ZN6CGlxTv4NewLER14MGlxTvObserver @ 9 NONAME
-	_ZN6CGlxTvD0Ev @ 10 NONAME
-	_ZN6CGlxTvD1Ev @ 11 NONAME
-	_ZN6CGlxTvD2Ev @ 12 NONAME
-	_ZNK6CGlxTv11IsConnectedEv @ 13 NONAME
-	_ZNK6CGlxTv11ScreenSizeLEv @ 14 NONAME
-	_ZNK6CGlxTv12IsWidescreenEv @ 15 NONAME
-	_ZNK6CGlxTv15IsHDMIConnectedEv @ 16 NONAME
-	_ZTI17CGlxHdmiContainer @ 17 NONAME
-	_ZTI17CGlxHdmiDecoderAO @ 18 NONAME
-	_ZTI18CGlxHdmiController @ 19 NONAME
-	_ZTI22CGlxHdmiSurfaceUpdater @ 20 NONAME
-	_ZTV17CGlxHdmiContainer @ 21 NONAME
-	_ZTV17CGlxHdmiDecoderAO @ 22 NONAME
-	_ZTV18CGlxHdmiController @ 23 NONAME
-	_ZTV22CGlxHdmiSurfaceUpdater @ 24 NONAME
-	_ZN18CGlxHdmiController18ShiftToCloningModeEv @ 25 NONAME
-	_ZN18CGlxHdmiController18ShiftToPostingModeEv @ 26 NONAME
+	_ZN18CGlxHdmiController15IsHDMIConnectedEv @ 3 NONAME
+	_ZN18CGlxHdmiController16ItemNotSupportedEv @ 4 NONAME
+	_ZN18CGlxHdmiController18ShiftToCloningModeEv @ 5 NONAME
+	_ZN18CGlxHdmiController18ShiftToPostingModeEv @ 6 NONAME
+	_ZN18CGlxHdmiController4NewLERK7TDesC16 @ 7 NONAME
+	_ZN18CGlxHdmiController9SetImageLERK7TDesC165TSizeii @ 8 NONAME
+	_ZN18CGlxHdmiControllerD0Ev @ 9 NONAME
+	_ZN18CGlxHdmiControllerD1Ev @ 10 NONAME
+	_ZN18CGlxHdmiControllerD2Ev @ 11 NONAME
+	_ZN6CGlxTv4NewLER14MGlxTvObserver @ 12 NONAME
+	_ZN6CGlxTvD0Ev @ 13 NONAME
+	_ZN6CGlxTvD1Ev @ 14 NONAME
+	_ZN6CGlxTvD2Ev @ 15 NONAME
+	_ZNK6CGlxTv11IsConnectedEv @ 16 NONAME
+	_ZNK6CGlxTv11ScreenSizeLEv @ 17 NONAME
+	_ZNK6CGlxTv12IsWidescreenEv @ 18 NONAME
+	_ZNK6CGlxTv15IsHDMIConnectedEv @ 19 NONAME
+	_ZTI17CGlxHdmiContainer @ 20 NONAME
+	_ZTI17CGlxHdmiDecoderAO @ 21 NONAME
+	_ZTI18CGlxHdmiController @ 22 NONAME
+	_ZTI22CGlxHdmiSurfaceUpdater @ 23 NONAME
+	_ZTV17CGlxHdmiContainer @ 24 NONAME
+	_ZTV17CGlxHdmiDecoderAO @ 25 NONAME
+	_ZTV18CGlxHdmiController @ 26 NONAME
+	_ZTV22CGlxHdmiSurfaceUpdater @ 27 NONAME
 
--- a/photosgallery/viewframework/tvout/inc/glxhdmicontroller.h	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/tvout/inc/glxhdmicontroller.h	Mon Mar 15 12:40:30 2010 +0200
@@ -53,14 +53,14 @@
             TInt aFrameCount = 1, TBool aStore = ETrue);
 
     /*
-     * To Determine it is a video and not image 
+     * To intimate that the item is not supported.  
      */
-    IMPORT_C void IsVideo();
+    IMPORT_C void ItemNotSupported();
     
     /*
      * Activating zoom in posting mode 
      */
-    IMPORT_C void ActivateZoom();
+    IMPORT_C void ActivateZoom(TBool aAutoZoomOut);
     /*
      * Deactivating zoom in posting mode 
      */
@@ -76,6 +76,11 @@
      */
     IMPORT_C void ShiftToPostingMode();
 
+    /*
+     * Tells if HDMi is Connected.
+     */
+    IMPORT_C TBool IsHDMIConnected();
+
 private:// From MGlxTvObserver
     virtual void HandleTvStatusChangedL ( TTvChangeType aChangeType );
 
--- a/photosgallery/viewframework/tvout/inc/glxhdmisurfaceupdater.h	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/tvout/inc/glxhdmisurfaceupdater.h	Mon Mar 15 12:40:30 2010 +0200
@@ -63,7 +63,7 @@
     /*
      * Activate Zoom 
      */
-    void ActivateZoom();
+    void ActivateZoom(TBool aAutoZoomOut);
     /*
     * Deactivate Zoom 
     */
@@ -175,6 +175,8 @@
     CPeriodic* iTimer;
     TBool iZoom;
 	TBool iBitmapReady;
+	TBool iAutoZoomOut;
+	TBool iSurfSessionConnected;
 #ifdef _DEBUG
     TTime iStartTime;
     TTime iStopTime;
--- a/photosgallery/viewframework/tvout/src/glxhdmicontroller.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/tvout/src/glxhdmicontroller.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -94,7 +94,7 @@
 // -----------------------------------------------------------------------------
 // IsVideo 
 // -----------------------------------------------------------------------------
-EXPORT_C void CGlxHdmiController::IsVideo()
+EXPORT_C void CGlxHdmiController::ItemNotSupported()
     {
     TRACER("CGlxHdmiController::IsVideo()");
     iImageSupported = EFalse;
@@ -108,12 +108,12 @@
 // -----------------------------------------------------------------------------
 // ActivateZoom 
 // -----------------------------------------------------------------------------
-EXPORT_C void CGlxHdmiController::ActivateZoom()
+EXPORT_C void CGlxHdmiController::ActivateZoom(TBool aAutoZoomOut)
     {
     TRACER("CGlxHdmiController::ActivateZoom()");
     if (iGlxTvOut->IsHDMIConnected())
         {
-        iSurfaceUpdater->ActivateZoom();
+        iSurfaceUpdater->ActivateZoom(aAutoZoomOut);
         }
     }
 
@@ -263,3 +263,12 @@
         }
     }
 
+// -----------------------------------------------------------------------------
+// HandleTvStatusChangedL 
+// -----------------------------------------------------------------------------
+EXPORT_C TBool CGlxHdmiController::IsHDMIConnected()
+    {
+    TRACER("CGlxHdmiController::IsHDMIConnected()");
+    return iGlxTvOut->IsHDMIConnected(); 
+    }
+
--- a/photosgallery/viewframework/tvout/src/glxhdmisurfaceupdater.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/tvout/src/glxhdmisurfaceupdater.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -78,7 +78,10 @@
     if (iSurfManager)
         {
         GLX_LOG_INFO("CGlxHdmiSurfaceUpdater::~CGlxHdmiSurfaceUpdater() - Close"); 
-        iSurfUpdateSession.Close();
+        if(iSurfSessionConnected)
+            {
+            iSurfUpdateSession.Close();
+            }
         if (iSurfChunk)
             {
             iSurfChunk->Close();
@@ -104,21 +107,28 @@
         {
         iGlxDecoderAO->Cancel();
         }
+    
     if ( iDecodedBitmap )
         {
         delete iDecodedBitmap;
         iDecodedBitmap= NULL;
-        }    
-    if ( iSurfBufferAO->IsActive() )
+        }
+    
+    if(iSurfBufferAO && iSurfBufferAO->IsActive())
         {
-        iSurfBufferAO->Cancel();        
+		iSurfBufferAO->Cancel();
         }
+    
     if ( iImageDecoder )
         {
         delete iImageDecoder;
         iImageDecoder = NULL;    
         }
-    iSurfUpdateSession.CancelAllUpdateNotifications();
+    
+    if (iSurfSessionConnected &&  iSurfManager)
+        {
+        iSurfUpdateSession.CancelAllUpdateNotifications();
+        }
     }
 
 // -----------------------------------------------------------------------------
@@ -140,10 +150,9 @@
     {
     TRACER("CGlxHdmiSurfaceUpdater::ConstructL()");
     TInt error = iFsSession.Connect ();
-    if ( KErrNone!= iFsSession.Connect () )
-        {
-        User::LeaveIfError(error);
-        }
+    GLX_LOG_INFO1("CGlxHdmiSurfaceUpdater::ConstructL() FsSession Connect error = %d", error);
+    User::LeaveIfError(error);
+    
     iBitmapReady = EFalse;
     // Create the active object
     iGlxDecoderAO = CGlxHdmiDecoderAO::NewL(this, iFrameCount);
@@ -151,17 +160,16 @@
     CreateBitmapL();
     CreateHdmiL();
     error = iSurfUpdateSession.Connect();
+    GLX_LOG_INFO1("CGlxHdmiSurfaceUpdater::ConstructL() Surface update Session Connect error = %d", error);
+    User::LeaveIfError(error);
+    iSurfSessionConnected = ETrue;
+    
 #ifdef _DEBUG
     iStartTime.HomeTime();
 #endif
     //start decoding the image    
-    iGlxDecoderAO->ConvertImageL(*iDecodedBitmap,0,iImageDecoder);
-         
-    if (KErrNone !=error)
-        {
-        GLX_LOG_INFO1("CGlxHdmiSurfaceUpdater::ConstructL() Surface update Session Connect Failed with error = %d", error);
-        User::LeaveIfError(error);
-        }
+    iGlxDecoderAO->ConvertImageL(*iDecodedBitmap,0,iImageDecoder);    
+    
     iLeftCornerForZoom.iX = 0; 
     iLeftCornerForZoom.iY = 0;
     iTimer = CPeriodic::NewL( CActive::EPriorityStandard );
@@ -175,8 +183,16 @@
         TInt /*aFrameCount*/,TSize aImageDimensions)
     {
     TRACER("CGlxHdmiSurfaceUpdater::UpdateNewImageL()");
+	//Cancel the zoom timers if any
+	if(iTimer->IsActive())
+        {
+		GLX_LOG_INFO("CGlxHdmiSurfaceUpdater::UpdateNewImageL() - Cancel Timer");
+        iTimer->Cancel();
+        }
     iOrigImageDimensions = aImageDimensions;
 	iBitmapReady = EFalse;
+	iLeftCornerForZoom.iX = 0; 
+	iLeftCornerForZoom.iY = 0;
     ReleaseContent();   
     CreateImageDecoderL(aImageFile);    
     CreateBitmapL();
@@ -219,11 +235,9 @@
     TSize surfaceSize = iWindow->Size();   // create surface of the screen size, i.e 1280x720
     iSurfManager = new(ELeave) RSurfaceManager();
     TInt error = iSurfManager->Open();
-    if (error != KErrNone)
-        {
-        GLX_LOG_INFO1("CGlxHdmiSurfaceUpdater::CreateSurfaceL Open Surface manager failed with error = %d", error);
-        User::LeaveIfError(error);
-        }
+    GLX_LOG_INFO1("CGlxHdmiSurfaceUpdater::CreateSurfaceL Open Surface manager error = %d", error);
+    User::LeaveIfError(error);
+    
     RSurfaceManager::TSurfaceCreationAttributesBuf attributes;
     attributes().iPixelFormat           = EUidPixelFormatARGB_8888;// EUidPixelFormatYUV_420Planar;
     attributes().iSize                  = surfaceSize;
@@ -235,11 +249,9 @@
     attributes().iMappable              = ETrue;
         
     error = iSurfManager->CreateSurface(attributes, iSurfId);
-    if(error)
-        {
-        GLX_LOG_INFO1("CGlxHdmiSurfaceUpdater::CreateSurfaceL, Creating surface failed with error : %d",error);
-        User::LeaveIfError(error);
-        }    
+    GLX_LOG_INFO1("CGlxHdmiSurfaceUpdater::CreateSurfaceL, Creating surface error : %d",error);
+    User::LeaveIfError(error);
+        
     //Map the surface and stride the surface info
     MapSurfaceL();
     // Set the Configuration to the surface ID when creating a surface
@@ -257,17 +269,17 @@
     iSurfChunk = new(ELeave) RChunk();
     User::LeaveIfNull(iSurfChunk);    
     TInt error = iSurfManager->MapSurface(iSurfId, *iSurfChunk);
-    if(error!=KErrNone)
-        {
-        GLX_LOG_INFO1("CGlxHdmiSurfaceUpdater::CreateSurfaceL(), MapSurface Failed wint error : %d",error);
-        }  
+    GLX_LOG_INFO1("CGlxHdmiSurfaceUpdater::MapSurfaceL(), MapSurface error : %d",error);
+    User::LeaveIfError(error);
     
     // Get the info from the surfaceManager
     // and store pointers to the pixel data
     RSurfaceManager::TInfoBuf info;
-    error = iSurfManager->SurfaceInfo(iSurfId, info);    
-    iSurfaceStride = info().iStride;
+    error = iSurfManager->SurfaceInfo(iSurfId, info);
+    GLX_LOG_INFO1("CGlxHdmiSurfaceUpdater::MapSurfaceL(), SurfaceInfo error : %d",error);
     User::LeaveIfError(error);  
+    
+    iSurfaceStride = info().iStride;    
     TInt offset = 0;
     iSurfManager->GetBufferOffset( iSurfId, 0,offset);
     iSurfBuffer = iSurfChunk->Base()+offset;
@@ -386,8 +398,7 @@
         ShiftToCloningMode();
         }
     else
-        {
-        iBitmapReady = ETrue;
+        {        
         iZoomRectSz = iDecodedBitmap->SizeInPixels();
         if (iSurfBufferAO->iStatus != KRequestPending
                 && !iSurfBufferAO->IsActive())
@@ -398,6 +409,7 @@
             iSurfUpdateSession.NotifyWhenAvailable(iSurfBufferAO->iStatus);
             TInt err = iSurfUpdateSession.SubmitUpdate(1, iSurfId, 0, NULL);
             }
+		iBitmapReady = ETrue;
         }
 	//release imagedecoder after the conversion is over		
     if(iImageDecoder)
@@ -416,21 +428,28 @@
      // Create a decoder for the image in the named file
     TRAPD(error,iImageDecoder = CImageDecoder::FileNewL(iFsSession, 
             aImageFile, CImageDecoder::EOptionNone, KNullUid));
-    if (error!=KErrNone)
-        {
-        User::Leave(error);
-        }
+    GLX_LOG_INFO1("CreateImageDecoderL CImageDecoder:FileNewL error %d",error);
+    User::LeaveIfError(error);
+    
     }
 
 // -----------------------------------------------------------------------------
 // ActivateZoom 
 // -----------------------------------------------------------------------------
-void CGlxHdmiSurfaceUpdater::ActivateZoom()
+void CGlxHdmiSurfaceUpdater::ActivateZoom(TBool aAutoZoomOut)
     {
     TRACER("CGlxHdmiSurfaceUpdater::ActivateZoom()");
     iZoom = ETrue;
+    iAutoZoomOut = aAutoZoomOut;
+    if(iTimer->IsActive())
+        {
+		GLX_LOG_INFO("CGlxHdmiSurfaceUpdater::ActivateZoom() - Cancel Timer");
+        iTimer->Cancel();
+        }
+    
     if(!iTimer->IsActive() && iBitmapReady)
        {
+	   GLX_LOG_INFO("CGlxHdmiSurfaceUpdater::ActivateZoom() - Start Timer");
        iTimer->Start(KZoomDelay,KZoomDelay,TCallBack( TimeOut,this ));
        }
     }
@@ -441,13 +460,18 @@
 void CGlxHdmiSurfaceUpdater::DeactivateZoom()
     {
     TRACER("CGlxHdmiSurfaceUpdater::DeactivateZoom()");
-    if(iDecodedBitmap)
+    
+    if(iTimer->IsActive())
         {
-        TSize bitmapsize = iDecodedBitmap->SizeInPixels(); 
-        iConfig.SetViewport(TRect(0,0,bitmapsize.iWidth,bitmapsize.iHeight));
-        iConfig.SetExtent(TRect(0,0,bitmapsize.iWidth,bitmapsize.iHeight));
-        iWindow->SetBackgroundSurface(iConfig, ETrue);
+		GLX_LOG_INFO("CGlxHdmiSurfaceUpdater::DeactivateZoom() - Cancel Timer");
+        iTimer->Cancel();
         }
+    if(!iTimer->IsActive() && iBitmapReady && iLeftCornerForZoom.iX)
+       {
+	   GLX_LOG_INFO("CGlxHdmiSurfaceUpdater::DeactivateZoom() - Start Timer");
+	   iZoom = EFalse;
+       iTimer->Start(KZoomDelay,KZoomDelay,TCallBack( TimeOut,this ));
+       }
     }
 
 // ---------------------------------------------------------------------------
@@ -474,9 +498,21 @@
 void CGlxHdmiSurfaceUpdater::Zoom(TBool aZoom)
     {
     TRACER("CGlxHdmiSurfaceUpdater::Zoom()");
+	
+	if(!iBitmapReady)
+		{
+		return;
+		}
+		
     if(iLeftCornerForZoom.iX == KMaxZoomLimit)
         {
         iZoom = EFalse;
+        //If autozoomout is not set then cancel the timer and do
+        //the zoom out on DeactivateZoom.
+        if(!iAutoZoomOut)
+            {
+            iTimer->Cancel();			
+            }
         }    
     if(aZoom && iZoom)
         {
--- a/photosgallery/viewframework/uiutilities/bwins/glxuiutilitiesu.def	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/uiutilities/bwins/glxuiutilitiesu.def	Mon Mar 15 12:40:30 2010 +0200
@@ -56,4 +56,8 @@
 	?SetFocusL@CGlxScreenFurniture@@QAEXH@Z @ 55 NONAME ; void CGlxScreenFurniture::SetFocusL(int)
 	?GetGridIconSize@CGlxUiUtility@@QAE?AVTSize@@XZ @ 56 NONAME ; class TSize CGlxUiUtility::GetGridIconSize(void)
 	?InstanceL@MGlxActiveMediaListResolver@@SAPAV1@PAVMGlxActiveMediaListChangeObserver@@@Z @ 57 NONAME ; class MGlxActiveMediaListResolver * MGlxActiveMediaListResolver::InstanceL(class MGlxActiveMediaListChangeObserver *)
+	?GetItemsLeftCountL@CGlxUiUtility@@QAEHXZ @ 58 NONAME ; int CGlxUiUtility::GetItemsLeftCountL(void)
+	?StartTNMDaemonL@CGlxUiUtility@@QAEXXZ @ 59 NONAME ; void CGlxUiUtility::StartTNMDaemonL(void)
+	?NewL@CGlxProgressIndicator@@SAPAV1@AAVMDialogDismisedObserver@@@Z @ 60 NONAME ; class CGlxProgressIndicator * CGlxProgressIndicator::NewL(class MDialogDismisedObserver &)
+	?StopTNMDaemonL@CGlxUiUtility@@QAEXXZ @ 61 NONAME ; void CGlxUiUtility::StopTNMDaemonL(void)
 
--- a/photosgallery/viewframework/uiutilities/data/glxuiutilities.rss	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/uiutilities/data/glxuiutilities.rss	Mon Mar 15 12:40:30 2010 +0200
@@ -32,10 +32,6 @@
 #include "glxutilities.hrh"
 #include <glxcommandhandlers.hrh>
 
-#if defined(FF_IMAGE_EDITOR) || defined(FF_VIDEO_EDITOR)
-#include <bldnokia.hrh> //for Editor feature flags
-#endif
-
 NAME GLXR    // 4 letter ID
 
 //  RESOURCE DEFINITIONS
@@ -455,8 +451,8 @@
 // AIW interest structure for assign
 //
 // -----------------------------------------------------------------------------
-#if defined(FF_IMAGE_EDITOR) || defined(FF_VIDEO_EDITOR)
-RESOURCE AIW_INTEREST r_glx_aiw_assign_to_contact_interest
+
+RESOURCE AIW_INTEREST r_glx_aiw_assign_to_contact_interest_mediaeditor
     {
     items=
         {
@@ -469,7 +465,7 @@
             }
         };
     }
-#else
+
 RESOURCE AIW_INTEREST r_glx_aiw_assign_to_contact_interest
     {
     items=
@@ -484,7 +480,7 @@
             }
         };
     }
-#endif
+
 
 // -----------------------------------------------------------------------------
 //
@@ -836,3 +832,27 @@
     //buf = qtn_lgal_note_remove_from_favourites;
     buf = "#Removed from Favourites";
     }
+
+//resource for waiting dialog
+RESOURCE TBUF r_glx_main_list_view_processing_dialog
+    { 
+    buf = qtn_lgal_note_wait_processing; 
+    }
+RESOURCE DIALOG r_progress_note
+    {
+    flags = EAknProgressNoteFlags;
+    buttons = R_AVKON_SOFTKEYS_CANCEL;
+    items =
+        {
+        DLG_LINE
+            {
+            type = EAknCtNote;
+            id = EAknCtNote;
+            control = AVKON_NOTE
+                {
+                layout = EProgressLayout;
+                singular_label =qtn_lgal_note_wait_processing;
+                };
+            }
+        };
+    }
--- a/photosgallery/viewframework/uiutilities/eabi/glxuiutilitiesu.def	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/uiutilities/eabi/glxuiutilitiesu.def	Mon Mar 15 12:40:30 2010 +0200
@@ -73,4 +73,10 @@
 	_ZTV32CGlxWaitDialogAttributeRetriever @ 72 NONAME
 	_ZTV33CGlxSynchronousAttributeRetriever @ 73 NONAME
 	_ZThn4_N13CGlxUiUtility22HandleTvStatusChangedLE13TTvChangeType @ 74 NONAME
+	_ZN13CGlxUiUtility15StartTNMDaemonLEv @ 75 NONAME
+	_ZN13CGlxUiUtility18GetItemsLeftCountLEv @ 76 NONAME
+	_ZN21CGlxProgressIndicator4NewLER23MDialogDismisedObserver @ 77 NONAME
+	_ZTI21CGlxProgressIndicator @ 78 NONAME
+	_ZTV21CGlxProgressIndicator @ 79 NONAME
+	_ZN13CGlxUiUtility14StopTNMDaemonLEv @ 80 NONAME
 
--- a/photosgallery/viewframework/uiutilities/group/glxuiutilities.mmp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/uiutilities/group/glxuiutilities.mmp	Mon Mar 15 12:40:30 2010 +0200
@@ -48,7 +48,7 @@
 SOURCE          glxtextentrypopup.cpp
 SOURCE          mglxactivemedialistresolver.cpp
 SOURCE          glxskinchangemonitor.cpp
-
+SOURCE 		glxprogressindicator.cpp
 // System includes from epoc32/include
 APP_LAYER_SYSTEMINCLUDE
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/photosgallery/viewframework/uiutilities/inc/glxprogressindicator.h	Mon Mar 15 12:40:30 2010 +0200
@@ -0,0 +1,85 @@
+/*
+* Copyright (c) 2008-2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Progressdialog
+*
+*/
+
+#ifndef GLXPROGRESSINDICATOR_H_
+#define GLXPROGRESSINDICATOR_H_
+
+#include <e32base.h>
+#include <aknwaitdialog.h>
+
+class CAknProgressDialog;
+class CEikProgressInfo;
+
+class MDialogDismisedObserver
+    {
+public:
+    virtual void HandleDialogDismissedL()=0;
+    };
+
+class CGlxProgressIndicator : public CBase,
+                                 public MProgressDialogCallback
+    {
+public:
+    IMPORT_C static CGlxProgressIndicator* NewL(MDialogDismisedObserver&  aGlxGridViewNotifyObserver);
+    ~CGlxProgressIndicator();
+    static CGlxProgressIndicator* NewLC(MDialogDismisedObserver&  aGlxGridViewNotifyObserver);
+
+private:
+    CGlxProgressIndicator(MDialogDismisedObserver&  aGlxGridViewNotifyObserver);
+    void ConstructL();
+    
+    /**
+     * show the progress bar
+     * @param aFinalValue Sets the final value of the bar
+     * @param aShow hide/display the progress bar 
+     */
+    void StartProgressNoteL(TInt aFinalValue ,TBool aShow);
+    /**
+     * displays the increment of progress bar
+     */
+    void UpdateProgressBar();
+
+    /**
+     * calculates how much increment to be done in progress bar
+     * @return increment value
+     */
+    TInt CalculateDisplayBarIncrementL();
+public:
+    // Callback for periodic timer, static, 
+    static TInt PeriodicCallbackL( TAny* aPtr );
+    
+    //nonstatic func called from periodic timer
+    void DisplayProgressBarL();
+protected://MProgressDialogCallback
+    void DialogDismissedL (TInt aButtonId);
+    
+private:
+    //Progress bar updation ticker
+    CPeriodic* iProgressbarTicker;
+
+    //Progress bar
+    CAknProgressDialog* iProgressDialog;
+    
+    //Progress info
+    CEikProgressInfo* iProgressInfo;
+    
+    //final count to set in progress bar
+    TInt iFinalCount;
+    MDialogDismisedObserver&  iGlxGridViewNotifyObserver;
+
+    };
+#endif /* GLXPROGRESSINDICATOR_H_ */
--- a/photosgallery/viewframework/uiutilities/inc/glxuiutility.h	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/uiutilities/inc/glxuiutility.h	Mon Mar 15 12:40:30 2010 +0200
@@ -203,7 +203,25 @@
     IMPORT_C TBool IsExitingState();
     
     IMPORT_C void SetExitingState(TBool aIsExiting);
-    
+	/**
+	* Forcibly start the Thumbnail Manager daemon process
+	* @param none
+	* @return none
+	*/
+    IMPORT_C void StartTNMDaemonL();
+
+	/**
+	* To stop the Thumbnail Manager daemon process so as to stop force generation of thumbnails
+	* @param none
+	* @return none
+	*/
+	IMPORT_C void StopTNMDaemonL();
+
+    /**
+     * Get the number of items left for Thumbnail generation
+     * @return TInt number of items left for TN generation
+     */
+    IMPORT_C TInt GetItemsLeftCountL();
     /**
      * Returns Visible items granularity based on feature 
      * layout (i.e., qHD, VGA)  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/photosgallery/viewframework/uiutilities/src/glxprogressindicator.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -0,0 +1,282 @@
+/*
+* Copyright (c) 2008-2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Progressdialog 
+*
+*/
+#include "glxprogressindicator.h"
+#include <glxtracer.h>
+#include <glxlog.h>
+#include <StringLoader.h>
+#include <AknProgressDialog.h>
+#include <eikprogi.h>
+#include <e32property.h>
+#include <glxuiutilities.rsg>
+#include "glxuiutility.h"
+const TInt KPeriodicStartDelay = 500000;
+
+
+// ---------------------------------------------------------
+// CGlxProgressIndicator::NewL
+// ---------------------------------------------------------
+//  
+EXPORT_C CGlxProgressIndicator* CGlxProgressIndicator::NewL
+                    (MDialogDismisedObserver& aGlxGridViewNotifyObserver)
+    {
+    CGlxProgressIndicator* self = CGlxProgressIndicator::NewLC
+                                                (aGlxGridViewNotifyObserver);
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+// ---------------------------------------------------------
+// CGlxProgressIndicator::NewLC
+// ---------------------------------------------------------
+//  
+CGlxProgressIndicator* CGlxProgressIndicator::NewLC
+                    (MDialogDismisedObserver& aGlxGridViewNotifyObserver)
+    {
+    
+    CGlxProgressIndicator* self = new(ELeave)
+                    CGlxProgressIndicator(aGlxGridViewNotifyObserver);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    return self;
+    }
+
+// ---------------------------------------------------------
+// CGlxProgressIndicator::CGlxProgressIndicator
+// ---------------------------------------------------------
+// 
+CGlxProgressIndicator::CGlxProgressIndicator
+          (MDialogDismisedObserver& aGlxGridViewNotifyObserver)
+                    :iGlxGridViewNotifyObserver(aGlxGridViewNotifyObserver)
+    {
+    }
+
+// ---------------------------------------------------------
+// CGlxProgressIndicator::~CGlxProgressIndicator
+// ---------------------------------------------------------
+//
+CGlxProgressIndicator::~CGlxProgressIndicator()
+    {
+    if (iProgressbarTicker && iProgressbarTicker->IsActive())
+        {
+        iProgressbarTicker->Cancel();
+        delete iProgressbarTicker;
+        }
+    if(iProgressDialog)
+        {
+        iProgressDialog->ProcessFinishedL();
+        }
+
+	// Stop force generation of thumbnails when progress dialog is dismissed
+	CGlxUiUtility* uiUtility = CGlxUiUtility::UtilityL();
+    CleanupClosePushL(*uiUtility);
+	if ( uiUtility )
+		{
+		uiUtility->StopTNMDaemonL();
+		}
+    CleanupStack::PopAndDestroy(uiUtility);
+    }
+
+// ---------------------------------------------------------
+// CGlxProgressIndicator::ConstructL
+// ---------------------------------------------------------
+//
+void CGlxProgressIndicator::ConstructL()
+    {
+    CGlxUiUtility* uiUtility = CGlxUiUtility::UtilityL();
+    CleanupClosePushL(*uiUtility);
+    TRAPD(err,uiUtility->StartTNMDaemonL());
+
+    if(err != KErrNone)
+        {
+        GLX_LOG_INFO1("CGlxProgressIndicator RProperty::Set errorcode %d",err);
+        //need to check what to do in fail cases
+        }
+    if(!iProgressbarTicker)
+        {
+        iProgressbarTicker = CPeriodic::NewL(CActive::EPriorityStandard);
+        }
+
+    iFinalCount = uiUtility->GetItemsLeftCountL();
+    GLX_LOG_INFO1("final count in viewactivate = %d",iFinalCount);
+    
+
+    if(iFinalCount)
+        {
+        StartProgressNoteL(iFinalCount,ETrue);
+        if ( !iProgressbarTicker->IsActive())
+            {
+            iProgressbarTicker->Start( KPeriodicStartDelay, KPeriodicStartDelay, TCallBack( 
+                    &PeriodicCallbackL, static_cast<TAny*>( this ) ) );
+            }            
+         }
+    else
+        {
+        GLX_LOG_INFO("Reset the RProperty flag to EFalse");
+        uiUtility->StopTNMDaemonL();
+        }
+    CleanupStack::PopAndDestroy(uiUtility);
+    }
+
+
+// -----------------------------------------------------------------------------
+// Callback from periodic timer
+// -----------------------------------------------------------------------------
+//
+TInt CGlxProgressIndicator::PeriodicCallbackL(TAny* aPtr )
+    {
+    TRACER("CGlxProgressIndicator::PeriodicCallbackL");
+    static_cast< CGlxProgressIndicator* >( aPtr )->DisplayProgressBarL();
+    return KErrNone;
+    }
+
+// -----------------------------------------------------------------------------
+// Callback from periodic timer-- non static
+// -----------------------------------------------------------------------------
+//
+inline void CGlxProgressIndicator::DisplayProgressBarL()
+    {
+    TRACER("CGlxProgressIndicator::DisplayProgressBarL");
+    CGlxUiUtility* uiUtility = CGlxUiUtility::UtilityL();
+    CleanupClosePushL(*uiUtility);
+    TInt itemsLeft = uiUtility->GetItemsLeftCountL();
+    CleanupStack::PopAndDestroy(uiUtility);
+    GLX_LOG_INFO1("itemsLeft in DisplayProgressBarL = %d",iFinalCount);
+    if(itemsLeft)
+        {
+        UpdateProgressBar();
+        }
+    else
+        {
+        if(iProgressbarTicker->IsActive())
+            {
+            iProgressbarTicker->Cancel();
+            }
+        StartProgressNoteL(iFinalCount,EFalse);
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// StartProgressNoteL
+// -----------------------------------------------------------------------------
+//
+void CGlxProgressIndicator::StartProgressNoteL(TInt aFinalValue,TBool aShow)
+    {
+    TRACER("CGlxProgressIndicator::StartProgressNoteL()");
+    
+    if(aShow)
+        {
+        if(!iProgressDialog)
+            {
+            iProgressDialog = new (ELeave)CAknProgressDialog((reinterpret_cast<CEikDialog**> (&iProgressDialog)),ETrue);
+            }
+        iProgressDialog->PrepareLC(R_PROGRESS_NOTE);
+        
+        iProgressInfo = iProgressDialog->GetProgressInfoL();
+        
+        iProgressDialog->SetCallback(this);
+        
+        HBufC* processingInfo = 
+                    StringLoader::LoadLC(R_GLX_MAIN_LIST_VIEW_PROCESSING_DIALOG);
+        iProgressDialog->SetTextL(*processingInfo);
+        CleanupStack::PopAndDestroy(processingInfo );
+        iProgressInfo->SetFinalValue(aFinalValue);
+        
+        iProgressDialog->RunLD();
+        }
+    else
+        {
+        iProgressDialog->ProcessFinishedL();
+        if(iProgressDialog)
+            {
+            iProgressDialog = NULL;
+            iProgressInfo = NULL;
+            }
+        }
+     
+    }
+    
+// -----------------------------------------------------------------------------
+// UpdateProgressBar
+// -----------------------------------------------------------------------------
+//
+void CGlxProgressIndicator::UpdateProgressBar()
+    {   
+    TRACER("CGlxProgressIndicator::UpdateProgressBar()");
+    if(iProgressInfo)
+        {
+        /*
+         * to show a number string in the progress bar use the below code
+         * in rss it should have %d or %N format
+         * TBuf<256> text;
+         * GlxGeneralUiUtilities::FormatString(text,*processingInfo,-1,count,ETrue);
+         * CleanupStack::PopAndDestroy(processingInfo); 
+         */
+        iProgressInfo->SetAndDraw(CalculateDisplayBarIncrementL());
+        }
+    }
+    
+// -----------------------------------------------------------------------------
+// DialogDismissedL
+// -----------------------------------------------------------------------------
+//  
+void CGlxProgressIndicator::DialogDismissedL(TInt aButtonId)
+    {
+    TRACER("CGlxProgressIndicator::DialogDismissedL()");
+    CGlxUiUtility* uiUtility = CGlxUiUtility::UtilityL();
+    CleanupClosePushL(*uiUtility);
+    uiUtility->StopTNMDaemonL();
+    CleanupStack::PopAndDestroy(uiUtility);
+    if(iProgressbarTicker)
+        {
+        iProgressbarTicker->Cancel();
+        delete iProgressbarTicker;
+        iProgressbarTicker = NULL;
+        }
+
+    if (aButtonId == EAknSoftkeyCancel)
+        {
+        // cancel any process in here 
+        iGlxGridViewNotifyObserver.HandleDialogDismissedL();
+        }
+    if(iProgressDialog)
+        {
+        iProgressDialog = NULL;
+        iProgressInfo = NULL;
+        }    
+    }
+
+// -----------------------------------------------------------------------------
+// CalculateDisplayBarIncrementL
+// -----------------------------------------------------------------------------
+//  
+TInt CGlxProgressIndicator::CalculateDisplayBarIncrementL()
+    {
+    TRACER("CGlxProgressIndicator::CalculateDisplayBarIncrement()");
+    CGlxUiUtility* uiUtility = CGlxUiUtility::UtilityL();
+    CleanupClosePushL(*uiUtility);
+    TInt itemsLeft = uiUtility->GetItemsLeftCountL();
+    CleanupStack::PopAndDestroy(uiUtility);
+    GLX_LOG_INFO1("CalculateDisplayBarIncrement = %d ",(iFinalCount - itemsLeft));
+    
+    if(iFinalCount < itemsLeft)
+        {
+        iProgressInfo->SetFinalValue( itemsLeft );
+        iFinalCount = itemsLeft;
+        }
+    
+    return (iFinalCount - itemsLeft);
+    }
--- a/photosgallery/viewframework/uiutilities/src/glxuiutility.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/uiutilities/src/glxuiutility.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -52,6 +52,15 @@
 #include <glxsingletonstore.h>
 #include <glxtexturemanager.h>
 #include <glxtracer.h>
+
+#include <e32property.h>
+
+//Publish-Subscribe from Thumbnail manager
+const TUid KTAGDPSNotification = { 0x2001FD51 }; //PS category 
+const TInt KForceBackgroundGeneration = 0x00000010; //PS Key 
+const TInt KItemsleft = 0x00000008; //PS key value
+
+
 //Hg 
 //#include <hg/hgcontextutility.h>
 
@@ -715,5 +724,54 @@
     return ret;
     }
 
+// -----------------------------------------------------------------------------
+// StartTNMDaemonL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CGlxUiUtility::StartTNMDaemonL()
+    {
+    TRACER("CGlxUiUtility::StartTNMDaemonL");
+    TInt err = RProperty::Set(KTAGDPSNotification, KForceBackgroundGeneration, ETrue);
+    if(err != KErrNone)
+        {
+        GLX_LOG_INFO1("GetItemsLeftCountL: RProperty::Set errorcode %d",err);
+        //need to check what to do in fail cases
+        User::Leave(err);
+        }
+    }
+	
+// -----------------------------------------------------------------------------
+// StopTNMDaemonL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CGlxUiUtility::StopTNMDaemonL()
+    {
+    TRACER("CGlxUiUtility:: StopTNMDaemonL ");
+    TInt err = RProperty::Set(KTAGDPSNotification, KForceBackgroundGeneration, EFalse);
+    GLX_LOG_INFO1("CGlxUiUtility::StopTNMDaemonL err = %d",err);
+    if(err != KErrNone)
+        {
+        GLX_LOG_INFO1("StopTNMDaemonL: RProperty::Set errorcode %d",err);
+        //need to check what to do in fail cases
+        User::Leave(err);
+        }
+    }
 
+// -----------------------------------------------------------------------------
+// GetItemsLeftCountL
+// -----------------------------------------------------------------------------
+//
+EXPORT_C TInt CGlxUiUtility::GetItemsLeftCountL()
+    {
+    TRACER("CGlxUiUtility::GetItemsLeftCountL");
+    TInt leftVariable = 0;
+    TInt err = RProperty::Get(KTAGDPSNotification, KItemsleft, leftVariable);
+    GLX_LOG_INFO1("GetItemsLeftCountL: GetItemsLeftCountL %d",leftVariable);
+    if(err != KErrNone)
+        {
+        GLX_LOG_INFO1("GetItemsLeftCountL: RProperty::Get errorcode %d",err);
+        User::Leave(err);
+        }
+    return leftVariable;	
+    }
 // End of file
--- a/photosgallery/viewframework/views/cloudview/group/glxcloudview.mmp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/views/cloudview/group/glxcloudview.mmp	Mon Mar 15 12:40:30 2010 +0200
@@ -80,8 +80,8 @@
 LIBRARY      	aknlayout2scalable.lib
 LIBRARY      	aknphysics.lib
 LIBRARY         fbscli.lib 
-LIBRARY			gdi.lib 
-LIBRARY		    charconv.lib         // For UtfConverter
+LIBRARY		gdi.lib 
+LIBRARY		charconv.lib         // For UtfConverter
 LIBRARY         commonengine.lib
-
+LIBRARY	   	harvesterclient.lib
 // End of File
\ No newline at end of file
--- a/photosgallery/viewframework/views/cloudview/inc/glxcloudviewcontrol.h	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/views/cloudview/inc/glxcloudviewcontrol.h	Mon Mar 15 12:40:30 2010 +0200
@@ -566,9 +566,6 @@
 	//keeps track of the end row 
 	TInt iLayoutIndex;
 
-	//  initiates bubble container 
-	CGlxContainerInfoBubble *iBubbleContainer;
-	
 	// Fetch context for list item attributes 
 	CGlxDefaultAttributeContext* iAttributeContext;
 	
@@ -653,6 +650,9 @@
     
     /**flag for Timer completion */
     TBool iTimerComplete;
+
+    /**flag to identify the next down event */
+    TBool iDownEventReceived;
 	};
 
 #endif // C_GLXCLOUDVIEWCONTROL_H
--- a/photosgallery/viewframework/views/cloudview/inc/glxcloudviewimp.h	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/views/cloudview/inc/glxcloudviewimp.h	Mon Mar 15 12:40:30 2010 +0200
@@ -24,7 +24,7 @@
 // INCLUDES
 #include <AknLayout2Def.h>
 #include <alf/alfanchorlayout.h>
-
+#include <harvesterclient.h>
 #include "mglxcloudviewmskobserver.h"
 #include "mglxenterkeyeventobserver.h"
 
@@ -53,7 +53,8 @@
 									public MGlxCloudViewMskObserver,				
 									public MGlxEnterKeyEventObserver,
 									public MGlxCloudViewLayoutObserver,
-									public MGlxItemMenuObserver
+									public MGlxItemMenuObserver,
+                                    public MHarvesterEventObserver
 	{
 public:
 
@@ -127,6 +128,17 @@
      * @param aMenuPane The menu pane to edit
      */
     void ViewDynInitMenuPaneL(TInt aResourceId, CEikMenuPane *aMenuPane);
+public:
+    /**
+     * HarvestingUpdated
+     * @param aHEObserverType 
+     * @param aHarvesterEventState 
+     * @param aItemsLeft
+     */
+    void HarvestingUpdated( 
+                HarvesterEventObserverType aHEObserverType, 
+                HarvesterEventState aHarvesterEventState,
+                TInt aItemsLeft );
 
 protected:
 	// From CGlxViewBase
@@ -241,10 +253,8 @@
 	
 	//anchor layout from the view widget
 	CAlfAnchorLayout* iAnchorlayout;
-	
-	//   save title text 
-    HBufC* iTitletext;
-	
+
+    RHarvesterClient iHarvesterClient;
 	};
 }
 #endif // C_GLXTESTTILEVIEWIMP_H
--- a/photosgallery/viewframework/views/cloudview/inc/glxtagscontextmenucontrol.h	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/views/cloudview/inc/glxtagscontextmenucontrol.h	Mon Mar 15 12:40:30 2010 +0200
@@ -78,6 +78,11 @@
      * @param aOpacity - Opacity value
      */
     void ShowItemMenu(TBool aOpacity);
+    /**
+     * Hides/shows the grid layout
+     * @return value of menu's visibility
+     */
+    TBool ItemMenuVisibility();
 
     /**
     * Sets the drawable screen rect 
@@ -122,9 +127,6 @@
     //Ui Utility, not owning, only close
     CGlxUiUtility* iUiUtility;
     
-    // Background Image Visual
-    CAlfImageVisual* iBackgroundBorderImageVisual;       
-    
     //Observer to handle the menu items in grid layout
     MGlxItemMenuObserver& iItemMenuObserver;          
     
--- a/photosgallery/viewframework/views/cloudview/src/glxcloudviewcontrol.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/views/cloudview/src/glxcloudviewcontrol.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -222,6 +222,12 @@
 void CGlxCloudViewControl::VisualLayoutUpdated(CAlfVisual &/* aVisual*/)
     {
     TRACER("GLX_CLOUD::CGlxCloudViewControl::VisualLayoutUpdated");
+	
+	//If the grid is already shown , disable it
+    if(iTagsContextMenuControl->ItemMenuVisibility())
+       {
+       iTagsContextMenuControl->ShowItemMenu(EFalse);
+       }
     TRect rect;
     AknLayoutUtils::LayoutMetricsRect (AknLayoutUtils::EMainPane, rect);
     if ((rect.Width() != (iTagScreenWidth + iScrollPaneHandle.iW + KRightmargin)) || (rect.Height() != iScreenHeight))
@@ -244,11 +250,6 @@
     iMediaList.RemoveContext (iAttributeContext);
     iMediaList.RemoveMediaListObserver (this);
     delete iAttributeContext;
-    /*if ( iBubbleContainer )
-		{
-		iBubbleContainer->SetHost (NULL);
-		delete iBubbleContainer;
-		}*/
 
     if ( iUiUtility )
         {
@@ -687,7 +688,6 @@
         {
         //to highlight focused element 
         SetFocusColor(); 
-        //CalculateBubleMidPoint ();   
         }
     }
 
@@ -751,8 +751,6 @@
     {
     TRACER("GLX_CLOUD::CGlxCloudViewControl::FetchAttributeFromCacheL");
     GLX_LOG_INFO("GLX_CLOUD ::CGlxCloudViewControl::FetchAttributeFromCache MediaList already filled" );
-    //enable msk as the medialist is populated
-    //iObserver.HandleMskChangedL (ETrue);
     iLayoutObserver.HandleLayoutChanged();
     if ( iLabels.Count ()==0)
         {
@@ -1197,7 +1195,6 @@
 
     //disable msk
     iLayoutObserver.HandleLayoutChanged();
-    //iObserver.HandleMskChangedL (EFalse);
     iScrollEventData.mSpan = 0;
     iScrollEventData.mViewLength = 0;
     DisplayScrollBar();
@@ -1289,20 +1286,6 @@
 //   
 void CGlxCloudViewControl::CreateBubleContainer()
     {   
-    /* if ( !iBubbleContainer)
-        {
-        TRAPD(err1,
-            {
-            iBubbleContainer = CGlxContainerInfoBubble::NewL (&iMediaList,
-            CGlxCloudViewControl::Env (), *this);
-            });
-            ;
-        if ( err1!= KErrNone)
-            {
-            GLX_LOG_INFO1("GLX_CLOUD::CGlxCloudViewControl::LayoutVisibleArea - Error (%d)", err1);
-            }
-        iBubbleContainer->SetHost (this);
-        }*/
     }
 
 // ---------------------------------------------------------------------------
@@ -1338,7 +1321,6 @@
     iViewPortLayout->SetViewportPos(iViewPortPosition, KSlowCloudMovement);
     iScrollEventData.mViewStartPos = iViewPortPosition.iY;
     Scroll();  
-    //CalculateBubleMidPoint ();   
     }
 
 
@@ -1376,7 +1358,6 @@
         {
         Scroll();           
         }
-    //CalculateBubleMidPoint();   
     }     
 
 // ---------------------------------------------------------------------------
@@ -1419,9 +1400,6 @@
 
     //Substract from the viewport position the viewport position    
     SetBubleMidPoint(midpoint);   
-
-    //Set the buble focus    
-    // iBubbleContainer->SetFocus (midpoint);
     } 
 
 // ---------------------------------------------------------------------------
@@ -1434,8 +1412,10 @@
     CAlfVisual* tappedvisual = aEvent.Visual();	
     TBool consumed = EFalse;
     
+
     if(aEvent.PointerEvent().iType == TPointerEvent::EButton1Down)
         {	
+        iDownEventReceived = EFalse;
         //reset variables & Physics simulator 
         iPhysics->StopPhysics();
         iPhysics->ResetFriction();
@@ -1449,8 +1429,12 @@
         Display()->Roster().DisableLongTapEventsWhenDragging(*this);
         
         //If the grid is already shown , disable it
-        iTagsContextMenuControl->ShowItemMenu(EFalse);
-
+        if(iTagsContextMenuControl->ItemMenuVisibility())
+           {
+           iDownEventReceived = ETrue;
+           iTagsContextMenuControl->ShowItemMenu(EFalse);
+           return ETrue;
+           }
         if(tappedvisual)
             {
             for(TInt index=0;index<iLayout->Count();index++)
@@ -1473,6 +1457,10 @@
                 }
             }
         }
+    else if(iDownEventReceived)
+        {
+        consumed = ETrue;
+        }
     else if (aEvent.PointerEvent().iType == TPointerEvent::EDrag)
         {
         GLX_LOG_INFO("GLX_CLOUD :: CGlxCloudViewControl::HandlePointerEventL(EDrag) event");
@@ -1495,12 +1483,12 @@
         //Check if dragging actually happened using iViewDragged 
         if (iDragging && iViewDragged)
             {
+			iTimer->Cancel ();//cancels any outstanding requests
+						
             iDragging = EFalse;
             TPoint drag = iStart - aEvent.PointerEvent().iPosition;
             iPhysics->StartPhysics(drag, iStartTime);
             iPhysicsStarted = ETrue;
-            
-            iTimer->Cancel ();//cancels any outstanding requests
             }
         //If dragging not happened consider it as Tapped event
         //When it recognises the long press event ,  and if up event is received..Ignore it 
@@ -1608,6 +1596,7 @@
     //emulation
     if (iPhysicsStarted && iDragging)
         {
+        iTimer->Cancel();
         TPoint drag = iStart - aPointerEvent.iPosition;
         iPhysics->StartPhysics(drag, iStartTime);
         iDragging = EFalse;
@@ -1725,7 +1714,6 @@
                     {
                     case KAlfActionIdDeviceLayoutChanged:
                         {
-                        // iObserver.HandleMskChangedL(ETrue);
                         iLayoutObserver.HandleLayoutChanged();
                         TRAP_IGNORE(UpdateLayoutL());
                         }
--- a/photosgallery/viewframework/views/cloudview/src/glxcloudviewimp.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/views/cloudview/src/glxcloudviewimp.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -103,6 +103,12 @@
 
 	{
 	TRACER("GLX_CLOUD::CGlxCloudViewImp::ConstructL");
+	TInt err = iHarvesterClient.Connect();
+    GLX_LOG_INFO1("iHarvesterClient.Connect() err = %d",err);
+    if(err == KErrNone)
+        {
+        iHarvesterClient.AddHarvesterEventObserver(*this, EHEObserverTypeMMC, 1000);
+        }
 	TFileName resourceFile(KDC_APP_RESOURCE_DIR);
 	resourceFile.Append (aFileName);
 	CGlxResourceUtilities::GetResourceFilenameL (resourceFile);
@@ -132,13 +138,13 @@
 CGlxCloudViewImp::~CGlxCloudViewImp()
     {
     TRACER("GLX_CLOUD::CGlxCloudViewImp::~CGlxCloudViewImp");
+    iHarvesterClient.Close();
     CleanupVisuals ();
     delete iEmptyListText;
     if ( iResourceOffset )
         {
         CCoeEnv::Static()->DeleteResourceFile (iResourceOffset);
-        }
-    delete iTitletext;
+        }    
     }
 
 // ---------------------------------------------------------------------------
@@ -192,7 +198,11 @@
 void CGlxCloudViewImp::DoMLViewActivateL(const TVwsViewId & /* aPrevViewId */,
 		TUid /* aCustomMessageId */, const TDesC8 & /* aCustomMessage */)
     {
-    TRACER("GLX_CLOUD::CGlxCloudViewImp::DoMLViewActivateL");   
+    TRACER("GLX_CLOUD::CGlxCloudViewImp::DoMLViewActivateL");
+    if(StatusPane())
+        {
+        StatusPane()->MakeVisible(ETrue);
+        }
     ConstructCloudControlL();
     GLX_LOG_INFO("CGlxCloudViewImp::DoMLViewActivateL Cloud View Control Created" );  
     // set app state to tag-browser view
@@ -207,18 +217,6 @@
 void CGlxCloudViewImp::DoMLViewDeactivate()
 	{
 	TRACER("GLX_CLOUD::CGlxCloudViewImp::DoMLViewDeactivate");
-	if(StatusPane())
-        {
-        if(iTitletext)
-           {
-           delete iTitletext;
-           iTitletext = NULL;
-           }
-        CEikStatusPane* statusPane = iEikonEnv->AppUiFactory()->StatusPane();
-        TRAP_IGNORE(CAknTitlePane* titlePane = ( CAknTitlePane* )statusPane->ControlL(
-                TUid::Uid( EEikStatusPaneUidTitle ));        
-        iTitletext = titlePane->Text()->AllocL());
-        }
 	//Hide softkeys and toolbar upon view de-activation.
 	iViewWidget->enableControlPane(EFalse);
 	if ( EGlxNavigationForwards == iUiUtility->ViewNavigationDirection() )
@@ -432,3 +430,19 @@
         iCloudControl->ShowContextItemMenu(EFalse);
         }
     }
+// ---------------------------------------------------------------------------
+// HarvestingUpdated
+// 
+// ---------------------------------------------------------------------------
+//
+void CGlxCloudViewImp::HarvestingUpdated( 
+                HarvesterEventObserverType HarvestingUpdated, 
+                HarvesterEventState /*aHarvesterEventState*/,
+                TInt /*aItemsLeft*/ )
+    {
+    TRACER("CGlxCloudViewImp::HarvestingUpdated()");
+    if(HarvestingUpdated == EHEObserverTypeMMC)
+        {
+        ProcessCommandL(EAknSoftkeyClose);
+        }
+    }
--- a/photosgallery/viewframework/views/cloudview/src/glxtagscontextmenucontrol.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/views/cloudview/src/glxtagscontextmenucontrol.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -29,14 +29,10 @@
 #include <alf/alfutil.h>
 #include <alf/alftexture.h>
 #include <alf/alfevent.h>
-#include <alf/ialfwidgetfactory.h>
-#include <alf/ialfviewwidget.h>
 #include <alf/alfdisplay.h>
+#include <alf/alfframebrush.h>
 
-#include <aknnotewrappers.h>
-#include <fbs.h>
 #include <StringLoader.h>
-#include "utf.h"                    // UtfConverter
 
 // Photos Headers
 #include "glxtagscontextmenucontrol.h"
@@ -72,6 +68,10 @@
 const TInt KGridHeight = KReqHeightPerMenuItem * KNumofMenuItems;
 //Text size for menu items
 const TInt KTextSizeInPixels = 20;
+//X shrink factor for stylus menu border to be drawn/visible
+const TInt KShrinkXCoord = 5;
+//Y shrink factor for stylus menu border to be drawn/visible
+const TInt KShrinkYCoord = 5;
 
 //For Tagging the visuals
 _LIT8(KTagSlideshow, "SS");
@@ -130,20 +130,19 @@
     iMainVisual->SetSize(TSize(KReqWidth, KGridHeight));
     iMainVisual->SetPos(TAlfRealPoint(KDummyPoint));
     
-    CFbsBitmap* bitmap = AknsUtils::GetCachedBitmap(
-            AknsUtils::SkinInstance(), KAknsIIDQsnFrPopupCenter);
-    CleanupStack::PushL(bitmap);
+    iMainVisual->EnableBrushesL(ETrue);
     
-    CAlfTexture& backgroundAvkonTexture = 
-		iUiUtility->GlxTextureManager().CreateColorAvkonIconTextureL( 
-				KAknsIIDQsnFrPopupCenter, bitmap->Handle(), KRgbTransparent) ;
+    TRect outerRect(TRect(TPoint(KDummyPoint),TSize(KReqWidth, KGridHeight)));
+    TRect innerRect(outerRect);
+    innerRect.Shrink(KShrinkXCoord,KShrinkYCoord);
+
+    CAlfFrameBrush* frameBrush = CAlfFrameBrush::NewLC(*(iUiUtility->Env()),
+                                        KAknsIIDQsnFrPopupSub );
+    frameBrush->SetFrameRectsL(innerRect, outerRect);
+   
+    iMainVisual->Brushes()->AppendL(frameBrush,EAlfHasOwnership);
+    CleanupStack::Pop(frameBrush);
     
-    CleanupStack::Pop(bitmap);
-    
-    // BackGround Border Image Visual
-    iBackgroundBorderImageVisual = CAlfImageVisual::AddNewL(*this,iMainVisual);
-    iBackgroundBorderImageVisual->SetImage(TAlfImage(backgroundAvkonTexture));
-
     // Create a new 3x1 grid layout visual.
     iGrid = CAlfGridLayout::AddNewL(*this, KNoOfColumns, KNumofMenuItems , 
 			iMainVisual);//columns, rows
@@ -212,7 +211,7 @@
     TRgb color;
     //Gets the color of the text specific to skin 
     AknsUtils::GetCachedColor(AknsUtils::SkinInstance(),
-            color, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG6 );
+            color, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG20 );
     
     //Loading the strings from rss
     HBufC* renameTitle = StringLoader::LoadLC( R_GLX_TAGS_RENAME_TITLE );
@@ -303,6 +302,16 @@
         iItemMenuVisibility = EFalse;
         }
     }
+
+// --------------------------------------------------------------------------- 
+// ItemMenuVisibility()
+// --------------------------------------------------------------------------- 
+//
+TBool CGlxTagsContextMenuControl::ItemMenuVisibility()
+    {
+    return iItemMenuVisibility;
+    }
+
 // --------------------------------------------------------------------------- 
 // OfferEventL()
 // --------------------------------------------------------------------------- 
--- a/photosgallery/viewframework/views/fullscreenview/eabi/glxfullscreenviewu.def	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/views/fullscreenview/eabi/glxfullscreenviewu.def	Mon Mar 15 12:40:30 2010 +0200
@@ -41,4 +41,6 @@
 	_ZN36TGlxMulFSMPLocationBindingSetFactoryD0Ev @ 40 NONAME
 	_ZN36TGlxMulFSMPLocationBindingSetFactoryD1Ev @ 41 NONAME
 	_ZN36TGlxMulFSMPLocationBindingSetFactoryD2Ev @ 42 NONAME
+	_ZTI22CGlxFullScreenBusyIcon @ 43 NONAME
+	_ZTV22CGlxFullScreenBusyIcon @ 44 NONAME
 
--- a/photosgallery/viewframework/views/fullscreenview/group/glxfullscreenview.mmp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/views/fullscreenview/group/glxfullscreenview.mmp	Mon Mar 15 12:40:30 2010 +0200
@@ -37,6 +37,7 @@
 SOURCE          glxfullscreenview.cpp
 SOURCE          glxfullscreenviewimp.cpp
 SOURCE          glxfullscreenbindingsetfactory.cpp 
+SOURCE		glxfullscreenbusyicon.cpp
 //SOURCE          glxsinglelinemetapanecontrol.cpp 
 //SOURCE          glxslmpfavmlobserver.cpp 
 
@@ -97,6 +98,6 @@
 LIBRARY         glxcommon.lib							// for filter facotory
 LIBRARY         glxcommonui.lib
 LIBRARY 	glxtvout.lib
-
+LIBRARY	   	harvesterclient.lib
 // EOF 
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/photosgallery/viewframework/views/fullscreenview/inc/glxfullscreenbusyicon.h	Mon Mar 15 12:40:30 2010 +0200
@@ -0,0 +1,114 @@
+/*
+* Copyright (c) 2008-2009 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:    Header for implementation of background processing indicator
+*
+*/
+
+#ifndef GLXFULLSCREENBUSYICON_H_
+#define GLXFULLSCREENBUSYICON_H_
+
+#include <alf/alfControl.h>
+#include <mglxmedialistobserver.h>
+// Forward decleartion
+class CAlfEnv;
+class CAlfAnchorLayout;
+class CAlfImageVisual;
+class CGlxUiUtility;
+class MGlxMediaList;
+
+enum TGlxBusyIconControlGroupId
+    {
+    EBGPSOriPortrait = 10,
+    EBGPsOriLandscape = 20
+    };
+
+class CGlxFullScreenBusyIcon: public CAlfControl,public MGlxMediaListObserver
+    {
+public:
+    /*
+     * NewL()
+     */
+    static CGlxFullScreenBusyIcon* NewL(MGlxMediaList& aMediaList,CGlxUiUtility& aUiUtility);
+    /*
+     * destructor
+     */
+    ~CGlxFullScreenBusyIcon();
+    /*
+     *  Shows the Busy Icon to indicate TN generation is going on.
+     *  @param aShow ETrue the icon will be shown and EFlase the icon will be hidden  
+     */    
+    void ShowBusyIconL(TBool aShow);
+
+public://frm CAlControl
+    void VisualLayoutUpdated(CAlfVisual& aVisual);        
+public: // from MGlxMediaListObserver
+    void HandleItemAddedL( TInt /*aStartIndex*/, TInt /*aEndIndex*/, MGlxMediaList* /*aList*/ ){}
+    void HandleItemRemovedL( TInt /*aStartIndex*/, TInt /*aEndIndex*/, MGlxMediaList* /*aList*/){}
+    void HandleAttributesAvailableL( TInt aItemIndex, 
+            const RArray<TMPXAttribute>& /*aAttributes*/, MGlxMediaList* aList );    
+    void HandleFocusChangedL( NGlxListDefs::TFocusChangeType /*aType*/, 
+            TInt aNewIndex, TInt aOldIndex, MGlxMediaList* aList );
+    void HandleItemSelectedL(TInt /*aIndex*/, TBool /*aSelected*/, MGlxMediaList* /*aList*/ ){}
+    void HandleMessageL( const CMPXMessage& /*aMessage*/, MGlxMediaList* /*aList*/ ){}
+    void HandleError( TInt /*aError*/ );
+    void HandleCommandCompleteL( CMPXCommand* /*aCommandResult*/, TInt /*aError*/, 
+            MGlxMediaList* /*aList*/ ){}
+    void HandleMediaL( TInt /*aListIndex*/, MGlxMediaList* /*aList*/ ){}
+    void HandleItemModifiedL( const RArray<TInt>& /*aItemIndexes*/, MGlxMediaList* /*aList*/ ){}
+private:
+    /*
+     * Constructor
+     */
+	CGlxFullScreenBusyIcon(MGlxMediaList& aMediaList,CGlxUiUtility& aUiUtility);    
+    /*
+     * ConstructL()
+     */
+    void ConstructL();
+    /*
+     *  Updates the position of the icon based on the screen size landscape/portrait 
+     */
+    void UpdatePosition();
+    /*
+     *  Gets the current screen size 
+     */
+    TRect GetScreenSize();
+    /*
+     * Callback for periodic timer
+     */
+    static TInt PeriodicCallbackL( TAny* aPtr );
+    /*
+     * nonstatic func called from periodic timer
+     */
+    void CallPeriodicCallbackL();
+    /*
+     *  Check the thumbnail generation for focus item is done
+     *  @return ETrue if the generation is complete,EFalse if generation is going on.
+     *   
+     */        
+    TBool IsReadyL();
+    
+private:
+	MGlxMediaList&         iMediaList;
+	CGlxUiUtility&         iUiUtility;                      // CGlxUiUtility passed from FS view
+    CAlfEnv*               iEnv;                            // Alf Env    
+    CAlfAnchorLayout*      iMainVisual;                     // Anchor Layout
+    CAlfImageVisual*       iBackgroundBorderImageVisual;    // Background Image Visual
+    TRect                  iScreenSize;                     // Screen size      
+    CPeriodic*             iPeriodic;
+    TInt                   iBusyIconIndex;
+    
+    };
+
+
+#endif /* GLXFULLSCREENBUSYICON_H_ */
--- a/photosgallery/viewframework/views/fullscreenview/inc/glxfullscreenviewimp.h	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/views/fullscreenview/inc/glxfullscreenviewimp.h	Mon Mar 15 12:40:30 2010 +0200
@@ -26,7 +26,7 @@
 #include "glxfullscreenview.h"
 #include "glxfullscreenbindingsetfactory.h"
 #include "glxfullscreenview.hrh"
-
+#include <harvesterclient.h>
 //Gesture Helper namespace 
 namespace GestureHelper
     {
@@ -46,6 +46,7 @@
 class CGlxHdmiController;
 class CGestureHelper;
 class TGlxMedia;
+class CGlxFullScreenBusyIcon;
 //class CHgContextUtility;
 
 namespace Alf
@@ -75,7 +76,8 @@
     
 NONSHARABLE_CLASS (CGlxFullScreenViewImp): public CGlxFullScreenView, 
                                             public IAlfWidgetEventHandler,
- 											public MGlxUiCommandHandler
+ 											public MGlxUiCommandHandler,
+											public MHarvesterEventObserver
     {
 public:    
     /**
@@ -142,6 +144,13 @@
 
     AlfEventHandlerExecutionPhase eventExecutionPhase() ;
 
+public:
+    // from MHarvesterEventObserver
+    void HarvestingUpdated( 
+                HarvesterEventObserverType aHEObserverType, 
+                HarvesterEventState aHarvesterEventState,
+                TInt aItemsLeft );
+
 private:
     /*
      * Constructor 
@@ -265,7 +274,7 @@
     /**
      * Set the image to external display - HDMI
      */
-    void SetImageL();
+    void SetItemToHDMIL();
 private:
     /** Softkey resource id's */
     TFullScreenViewResourceIds iResourceIds; 
@@ -309,6 +318,7 @@
 	    
     CGlxDRMUtility* iDrmUtility;
     CPeriodic* iPeriodic;
+    CGlxFullScreenBusyIcon* iBusyIcon;
 	
     GestureHelper::CGestureHelper* iGestureHelper;
     TBool   iMultiTouchGestureOngoing   ;
@@ -318,6 +328,7 @@
     //Previous focused index
     TInt iOldFocusIndex;
     TBool iImgViewerMode;
+	RHarvesterClient iHarvesterClient;
     };
 
 #endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/photosgallery/viewframework/views/fullscreenview/src/glxfullscreenbusyicon.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -0,0 +1,333 @@
+/*
+ * Copyright (c) 2008-2009 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"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:    Implementation of background processing indicator
+ *
+ */
+
+#include <stringloader.h>
+#include <data_caging_path_literals.hrh>            // KDC_APP_RESOURCE_DIR
+#include <glxtracer.h>
+#include <glxlog.h>                                 // Glx logs
+#include <glxuistd.h>
+#include <glxuiutility.h>                           // UiUtility Singleton
+#include <glxicons.mbg>
+#include <glxtexturemanager.h>                      // Texturemanager
+#include <mglxmedialist.h>
+#include <glxthumbnailattributeinfo.h>
+#include <glxerrormanager.h>
+// Alf Headers
+#include <alf/alfutil.h>
+#include <alf/alfanchorlayout.h>
+#include <alf/alfcontrolgroup.h>
+#include <alf/alfimagevisual.h>
+#include "glxfullscreenbusyicon.h"
+
+const TInt KGlxFullScreenControlGrpId = 0x113; // This is the same control grp id used in FS view
+//define the opacity values
+const TReal KOpacityOpaque = 1.0;
+const TReal KOpacityTransparent = 0.0;
+const TInt KBusyIconFrameCount = 10;
+const TInt KMainVisSz = 60;
+const TInt KIconOffset = 10;
+const TTimeIntervalMicroSeconds32 KanInterval = 100000;
+
+// ---------------------------------------------------------------------------
+// NewL
+// ---------------------------------------------------------------------------
+//  
+CGlxFullScreenBusyIcon* CGlxFullScreenBusyIcon::NewL(MGlxMediaList& aMediaList,
+		CGlxUiUtility& aUiUtility)
+	{
+	TRACER("CGlxFullScreenBusyIcon::NewL()");
+	CGlxFullScreenBusyIcon* self = new (ELeave) CGlxFullScreenBusyIcon(
+			aMediaList, aUiUtility);
+	CleanupStack::PushL(self);
+	self->ConstructL();
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+// ---------------------------------------------------------------------------
+// CGlxFullScreenBusyIcon constructor
+// ---------------------------------------------------------------------------
+//  
+CGlxFullScreenBusyIcon::CGlxFullScreenBusyIcon(MGlxMediaList& aMediaList,
+		CGlxUiUtility& aUiUtility) :
+	iMediaList(aMediaList), iUiUtility(aUiUtility), iBusyIconIndex(0)
+
+	{
+	//iBusyIconIndex(0),
+	TRACER("CGlxFullScreenBusyIcon::CGlxFullScreenBusyIcon()");
+	// No Implementation
+	}
+// ---------------------------------------------------------------------------
+// ~CGlxFullScreenBusyIcon Destructor
+// ---------------------------------------------------------------------------
+//  
+CGlxFullScreenBusyIcon::~CGlxFullScreenBusyIcon()
+	{
+	TRACER("CGlxFullScreenBusyIcon::~CGlxFullScreenBusyIcon()");
+
+	iMediaList.RemoveMediaListObserver(this);
+
+	if (iPeriodic->IsActive())
+		{
+		iPeriodic->Cancel();
+		}
+
+	delete iPeriodic;
+
+	if (iMainVisual)
+		{
+		iMainVisual->RemoveAndDestroyAllD();
+		iMainVisual = NULL;
+		}
+	}
+// ---------------------------------------------------------------------------
+// ConstructL
+// ---------------------------------------------------------------------------
+//  
+void CGlxFullScreenBusyIcon::ConstructL()
+	{
+	TRACER("CGlxFullScreenBusyIcon::ConstructL");
+	TFileName resFile(KDC_APP_BITMAP_DIR);
+	resFile.Append(KGlxIconsFilename);
+	iPeriodic = CPeriodic::NewL(CActive::EPriorityStandard);
+	iMediaList.AddMediaListObserverL(this);
+	/* create the the alf visual,anchorlayout and add layout to visual*/
+	iEnv = iUiUtility.Env();
+	CAlfControl::ConstructL(*iEnv);
+	iMainVisual = CAlfAnchorLayout::AddNewL(*this);
+
+	//BackGround Border Image Visual
+	iBackgroundBorderImageVisual = CAlfImageVisual::AddNewL(*this, iMainVisual);
+	CAlfControlGroup* group = &iEnv->ControlGroup(KGlxFullScreenControlGrpId);
+	group->AppendL(this);
+
+	iMainVisual->SetFlag(EAlfVisualFlagManualLayout);
+
+	// Update the pos and size of the visual 
+	UpdatePosition();
+
+	// Setting the Flag to get layout change notifications
+	iMainVisual->SetFlag(EAlfVisualFlagLayoutUpdateNotification);
+	iMainVisual->SetSize(TAlfTimedPoint(KMainVisSz, KMainVisSz));
+	// Store the Current Screensize
+	iScreenSize = GetScreenSize();
+	if (IsReadyL())
+		{
+		ShowBusyIconL(EFalse);
+		}
+	else
+		{
+		ShowBusyIconL(ETrue);
+		}
+	}
+// ---------------------------------------------------------------------------
+// PeriodicCallbackL
+// ---------------------------------------------------------------------------
+// 
+TInt CGlxFullScreenBusyIcon::PeriodicCallbackL(TAny* aPtr)
+	{
+	TRACER("CGlxFullScreenBusyIcon::PeriodicCallbackL");
+	static_cast<CGlxFullScreenBusyIcon*> (aPtr)->CallPeriodicCallbackL();
+	return KErrNone;
+	}
+
+// -----------------------------------------------------------------------------
+// Callback from periodic timer-- non static
+// -----------------------------------------------------------------------------
+//
+inline void CGlxFullScreenBusyIcon::CallPeriodicCallbackL()
+	{
+	TRACER("CGlxFullScreenBusyIcon::CallPeriodicCallbackL");
+	// Get the icon file
+	TFileName resFile(KDC_APP_BITMAP_DIR);
+	resFile.Append(KGlxIconsFilename);
+	CAlfTexture& backgroundTexture =
+			iUiUtility.GlxTextureManager().CreateIconTextureL(
+					EMbmGlxiconsQgn_graf_ring_wait_01 + iBusyIconIndex * 2,
+					resFile);
+	iBusyIconIndex++;
+	//reset the svg frames
+	if (iBusyIconIndex >= KBusyIconFrameCount)
+		{
+		iBusyIconIndex = 0;
+		}
+	iBackgroundBorderImageVisual->SetImage(TAlfImage(backgroundTexture));
+	ShowBusyIconL(ETrue);
+	}
+// ---------------------------------------------------------------------------
+// ShowBusyIconL
+// ---------------------------------------------------------------------------
+//
+void CGlxFullScreenBusyIcon::ShowBusyIconL(TBool aShow)
+	{
+	TRACER("CGlxFullScreenBusyIcon::ShowBusyIconL()");
+	GLX_LOG_INFO1("CGlxFullScreenBusyIcon::ShowBusyIconL() value %d",aShow);
+	if (aShow)
+		{
+		iMainVisual->SetOpacity(KOpacityOpaque);
+		}
+	else
+		{
+		iMainVisual->SetOpacity(KOpacityTransparent);
+		}
+	if (!aShow)
+		{
+		if (iPeriodic->IsActive())
+			{
+			iPeriodic->Cancel();
+			}
+		}
+	if (!iPeriodic->IsActive() && aShow)
+		{
+		iPeriodic->Start(0, KanInterval, TCallBack(&PeriodicCallbackL,
+				static_cast<TAny*> (this)));
+		}
+	}
+// ---------------------------------------------------------------------------
+// GetScreenSize
+// ---------------------------------------------------------------------------
+//
+TRect CGlxFullScreenBusyIcon::GetScreenSize()
+	{
+	TRACER("CGlxFullScreenBusyIcon::GetScreenSize()");
+	return AlfUtil::ScreenSize();
+	}
+// ---------------------------------------------------------------------------
+// UpdatePosition
+// ---------------------------------------------------------------------------
+//
+void CGlxFullScreenBusyIcon::UpdatePosition()
+	{
+	TRACER("CGlxFullScreenBusyIcon::UpdatePosition()");
+	TRect rect = GetScreenSize();
+	TInt screenWidth = rect.Width();
+	// Switch off the Flag for layout update notification, else a change in size/pos 
+	// will call VisualLayoutUpdated multiple times.
+	iMainVisual->ClearFlag(EAlfVisualFlagLayoutUpdateNotification);
+	//set the control size
+	iMainVisual->SetSize(TSize(KMainVisSz, KMainVisSz));
+	iMainVisual->SetPos(TAlfRealPoint(screenWidth / 2 - KMainVisSz / 2,
+			KIconOffset));
+	iMainVisual->SetFlag(EAlfVisualFlagLayoutUpdateNotification);
+	}
+
+// ---------------------------------------------------------------------------
+// VisualLayoutUpdated
+// ---------------------------------------------------------------------------
+//  
+void CGlxFullScreenBusyIcon::VisualLayoutUpdated(CAlfVisual&/* aVisual*/)
+	{
+	TRACER("CGlxFullScreenBusyIcon::VisualLayoutUpdated()");
+	// Update the Screen positions only if the layout has changed.
+	// For performace improvement
+	TRect presentScreenSize = GetScreenSize();
+	if (iScreenSize.Width() != presentScreenSize.Width())
+		{
+		UpdatePosition();
+		iScreenSize = presentScreenSize;
+		}
+	}
+// ---------------------------------------------------------------------------
+// IsReadyL
+// ---------------------------------------------------------------------------
+//  
+TBool CGlxFullScreenBusyIcon::IsReadyL()
+	{
+	TRACER("CGlxFullScreenBusyIcon::IsReadyL()");
+	if (iMediaList.Count() > 0)
+		{
+		TInt fsMediaIndex = iMediaList.FocusIndex();
+		TGlxMedia focusItem = iMediaList.Item(fsMediaIndex);
+		TInt thumbnailError = GlxErrorManager::HasAttributeErrorL(
+				focusItem.Properties(), KGlxMediaIdThumbnail);
+		if (thumbnailError)
+			{
+			return ETrue;
+			}
+
+		TMPXAttribute tnAttribQuality(KGlxMediaIdThumbnail,
+				GlxFullThumbnailAttributeId(ETrue, iScreenSize.Width(),
+						iScreenSize.Height()));
+		// This is because there is only one context maintained for FullScreen TN
+		TMPXAttribute tnAttribQualityOtherOrientation(KGlxMediaIdThumbnail,
+				GlxFullThumbnailAttributeId(ETrue, iScreenSize.Height(),
+						iScreenSize.Width()));
+
+		const CGlxThumbnailAttribute* qualityTn = focusItem.ThumbnailAttribute(
+				tnAttribQuality);
+		if (!qualityTn)
+			{
+			qualityTn = focusItem.ThumbnailAttribute(
+					tnAttribQualityOtherOrientation);
+			}
+		if (qualityTn)
+			{
+			return ETrue;
+			}
+
+		return EFalse;
+		}
+	else
+		{
+		return ETrue;
+		}
+	}
+
+// ---------------------------------------------------------------------------
+// HandleAttributesAvailableL
+// ---------------------------------------------------------------------------
+// 
+void CGlxFullScreenBusyIcon::HandleAttributesAvailableL(TInt aItemIndex,
+		const RArray<TMPXAttribute>& /*aAttributes*/, MGlxMediaList* /*aList*/)
+	{
+	TRACER("CGlxFullScreenBusyIcon::HandleAttributesAvailableL()");
+	if (aItemIndex == iMediaList.FocusIndex())
+		{
+		if (IsReadyL())
+			{
+			ShowBusyIconL(EFalse);
+			}
+		}
+	}
+
+// ----------------------------------------------------------------------------
+// HandleFocusChangedL
+// ----------------------------------------------------------------------------
+//
+void CGlxFullScreenBusyIcon::HandleFocusChangedL(
+		NGlxListDefs::TFocusChangeType /*aType*/, TInt /*aNewIndex*/,
+		TInt /*aOldIndex*/, MGlxMediaList* /*aList*/)
+	{
+	TRACER("CGlxFullScreenBusyIcon::HandleFocusChangedL()");
+	ShowBusyIconL(EFalse);
+	iBusyIconIndex = 0;//reset the icon index to start from the beginning
+	if (!IsReadyL())
+		{
+		ShowBusyIconL(ETrue);
+		}
+	}
+// ----------------------------------------------------------------------------
+// HandleError
+// ----------------------------------------------------------------------------
+//
+void CGlxFullScreenBusyIcon::HandleError(TInt /*aError*/)
+	{
+	if (IsReadyL())
+		{
+		ShowBusyIconL(EFalse);
+		}
+	}
--- a/photosgallery/viewframework/views/fullscreenview/src/glxfullscreenviewimp.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/views/fullscreenview/src/glxfullscreenviewimp.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -42,8 +42,6 @@
 
 using namespace GestureHelper;
 
-//Hg 
-//#include <hg/hgcontextutility.h>
 #include <glxhdmicontroller.h>
 
 // Photos Headers
@@ -53,7 +51,6 @@
 #include <glxcommandhandlers.hrh>               // For EGlxCmdFullScreenBack               
 #include <glxfullscreenviewdata.rsg>            // FS View Resource
 #include <glxthumbnailattributeinfo.h>          // KGlxMediaIdThumbnail
-//#include "glxmediakeyutility.h"
 #include <glxactivemedialistregistry.h>         // For medialist registry
 #include <glxerrormanager.h>
 #include <glxzoomcontrol.h>
@@ -64,14 +61,13 @@
 #include <glxsetappstate.h>
 #include <glxdrmutility.h>
 #include <glxscreenfurniture.h>
-//#include <glxsinglelinemetapanecontrol.h>
 #include "glxfullscreenviewimp.h"
 #include <glxnavigationalstate.h>
 #include <glxmedia.h>
 #include <glxnavigationalstate.h>
 #include <mpxcollectionpath.h>
 #include <glxcollectionpluginimageviewer.hrh>
-
+#include "glxfullscreenbusyicon.h"
 using namespace Alf;
 
 const TInt KGlxScreenTimeout =10000000;
@@ -198,7 +194,14 @@
 	iDrmUtility = CGlxDRMUtility::InstanceL();
    // Get object that stores the active media list registry
     iActiveMediaListRegistry = CGlxActiveMediaListRegistry::InstanceL();
-    if(!iPeriodic)
+	
+	TInt err = iHarvesterClient.Connect();
+	GLX_LOG_INFO1("iHarvesterClient.Connect() err = %d",err);
+	if(err == KErrNone)
+		{
+        iHarvesterClient.AddHarvesterEventObserver(*this, EHEObserverTypeMMC, 1000);
+	    }
+	if(!iPeriodic)
 		{
 		iPeriodic = CPeriodic::NewL(CActive::EPriorityStandard);
 		}
@@ -211,7 +214,8 @@
 CGlxFullScreenViewImp::~CGlxFullScreenViewImp()
     {
     TRACER("CGlxFullScreenViewImp::~CGlxFullScreenViewImp");
-    delete iMediaListMulModelProvider;   
+    iHarvesterClient.Close();
+	delete iMediaListMulModelProvider;   
     if(iTimer->IsActive())
 	    {
 	    iTimer->Cancel();
@@ -322,7 +326,6 @@
 		   	}
 		}
 		
-	
     if(naviState->Id() == TMPXItemId(KGlxCollectionPluginImageViewerImplementationUid))
         {
         iImgViewerMode = ETrue;
@@ -333,11 +336,10 @@
 
     //Create hdmicontroller when it is only launched from fullscreen.  
     //From filemanager show only clone mode.
-    if(!iImgViewerMode && iMediaList->Count())    
+    if( !iImgViewerMode )    
         {
         iHdmiController = CGlxHdmiController::NewL();    
-        iOldFocusIndex = iMediaList->FocusIndex();
-        SetImageL();
+        SetItemToHDMIL();
         }
     iScreenFurniture->SetActiveView(iViewUid);
 
@@ -352,34 +354,23 @@
     // create the coverflow
     CreateCoverflowWidgetL();
     
-    
     CreateSliderWidgetL();
     
-//    iMediaKeyUtility = CGlxMediaKeyUtility::NewL();
-    
+    iBusyIcon = CGlxFullScreenBusyIcon::NewL(*iMediaList,*iUiUtility);
     // create a zoom control
     iZoomControl = CGlxZoomControl::NewL(*this, *iMediaList,
             *iZoomButtonGroup, *iSliderWidget, iGestureHelper);
 
-    // Create the Metapane
-    //iSingleLineMetaPane = CGlxSingleLineMetaPane::NewL(*this,*iMediaList,*iUiUtility);
-
     // hide the screen furniture
     HideUi(ETrue);
 	// Set active media list pointer, so that UPnP renderer knows about this list
     iActiveMediaListRegistry->RegisterActiveMediaList(iMediaList);
     
-    //Get the HgContextUtility instance
-//    iContextUtility = iUiUtility->ContextUtility();
-
-    // if the Medialist has any item, set the First index context to Hg Context Utility
-//    TGlxMedia item = iMediaList->Item( iMediaList->FocusIndex() );
-//    iContextUtility->PublishPhotoContextL(item.Uri());
-    	if ( !iPeriodic->IsActive() )
-		{
-        iPeriodic->Start(KPeriodicStartDelay, KPeriodicIntervalDelay,
-                TCallBack(&PeriodicCallback, static_cast<TAny*> (this)));
-		}
+    if ( !iPeriodic->IsActive() )
+	    {
+	    iPeriodic->Start(KPeriodicStartDelay, KPeriodicIntervalDelay,
+	            TCallBack(&PeriodicCallback, static_cast<TAny*> (this)));
+	    }
 	}
 	
 
@@ -468,9 +459,6 @@
             {
             iSliderModel->SetTick(KGlxSliderTickValue);
             }
-        
-        //SetSliderLevel();
-        
         }
     catch(...)
         {
@@ -493,8 +481,8 @@
     TBool isDrmRightsValid = ETrue;
 	if(item.IsDrmProtected())
 		{
-		isDrmRightsValid = iDrmUtility->CheckOpenRightsL(item.Uri(),
-												(item.Category() == EMPXImage));
+		//Fix for ESLM-82WJ59: Since it is always for the focused item - use DisplayRightsL instead of openrightsL
+		isDrmRightsValid = iDrmUtility->CheckDisplayRightsL(item.Uri(), (item.Category() == EMPXImage));
 		}
 	
     // Display slider only for non corrupted images and items with valid DRM license
@@ -525,9 +513,6 @@
     Cba()->MakeVisible( ETrue );
     Cba()->DrawNow();
 
-    // Show the Metapane
-    //iSingleLineMetaPane->ShowMetaPane(ETrue);
-
     //set the ui state to On
     SetUiSate(NGlxNFullScreenUIState::EUiOn);
     
@@ -699,8 +684,8 @@
     TBool isDrmRightsValid = ETrue;
     if(item.IsDrmProtected())
     	{
-    	isDrmRightsValid = iDrmUtility->CheckOpenRightsL(item.Uri(),
-												(item.Category() == EMPXImage));
+    	 //Fix for ESLM-82WJ59: DRM Rights validity check for displayed item
+    	isDrmRightsValid = iDrmUtility->CheckDisplayRightsL(item.Uri(), (item.Category() == EMPXImage));
     	}
     // Activate Zoom if the item is an image and its DRM rights is not expired
     if(KErrNone == error && (EMPXImage == item.Category()) && isDrmRightsValid)
@@ -709,7 +694,15 @@
             {
             if(iHdmiController)
                 {
-                iHdmiController->ActivateZoom();
+                TBool autoZoomOut = ETrue;
+                //Set autozoomout to false in pinch zoom, since we would be 
+                //zooming out on deactivate once we get the release event.
+                if(aStartMode == EZoomStartPinch)                    
+                    {
+                    autoZoomOut = EFalse; 
+                    }
+                
+                iHdmiController->ActivateZoom(autoZoomOut);
                 }
             iZoomControl->ActivateL(GetInitialZoomLevel(),aStartMode, focus,
                                         item, apZoomFocus,iImgViewerMode);
@@ -741,9 +734,14 @@
 void CGlxFullScreenViewImp::DeactivateZoomControlL()
     {
     TRACER("CGlxFullScreenViewImp::DeactivateZoomControlL");
-    ActivateFullScreenL(); 
+    ActivateFullScreenL();
+    //Deactivate HDMI controller for zoom out while pinch zooming.
+    if(iHdmiController)
+        {
+        iHdmiController->DeactivateZoom();
+        }
     if(iZoomControl->Activated())
-        {
+        {        
         iZoomControl->Deactivate();
         }
     //Once into fullscreen view,show the screen furniture
@@ -758,12 +756,10 @@
 void CGlxFullScreenViewImp::DoMLViewDeactivate()
     {
     TRACER("CGlxFullScreenViewImp::DoMLViewDeactivate");
-    // if Medialist Count is Zero, set the navigation state to 
-    // EGlxNavigationBackwards before going back to grid view
-    if(iMediaList->Count() == 0)
-    	{
-    	iUiUtility->SetViewNavigationDirection(EGlxNavigationBackwards);
-    	} 
+    //Fix for ESLM-82WJ59: Clear the last uri for which DRM Rights were consumed before going back to grid view
+    //since the GridView::Activate() and FullScreen::DeActivate() can be called in any order,
+    //this call is being made to be on safer side
+    iDrmUtility->ClearLastConsumedItemUri();
     iScreenFurniture->ViewDeactivated(iViewUid);
     iImgViewerMode = EFalse;
     if (iHdmiController)
@@ -993,17 +989,25 @@
 
                 MulDoubleTapData* DoubleTapData = (MulDoubleTapData*)(aEvent.CustomEventData()); 
                 TPoint doubleTapPoint = DoubleTapData->mDoubleTapPoint;
-                SetSliderLevel();
-                TRAP_IGNORE( ActivateZoomControlL(EZoomStartDoubleTap, &doubleTapPoint) );
+                TInt focus = iMediaList->FocusIndex();
+                TGlxMedia item = iMediaList->Item( focus );
+                TSize size;
+                item.GetDimensions( size );
+                TRect rect = AlfUtil::ScreenSize();
+                TInt zoomLevel = GetInitialZoomLevel();
+                TInt tlX = (rect.Width() - (size.iWidth*zoomLevel)/100)/2;
+                TInt tlY = (rect.Height() - (size.iHeight*zoomLevel)/100)/2;
+                TRect imageRect(TPoint(tlX, tlY), TSize((size.iWidth*zoomLevel)/100, (size.iHeight*zoomLevel)/100));
+                if (imageRect.Contains(doubleTapPoint))
+                    {
+                    SetSliderLevel();
+                    TRAP_IGNORE( ActivateZoomControlL(EZoomStartDoubleTap, &doubleTapPoint)  );
+                    }
                 return EEventConsumed;
                 }
             case ETypeItemRemoved:
                 {
-                if(iHdmiController)
-                    {
-                     SetImageL();
-                    }
-                iOldFocusIndex = iMediaList->FocusIndex();
+                SetItemToHDMIL();
                 return EEventConsumed;
                 }
             case ETypeHighlight:
@@ -1017,11 +1021,7 @@
                     {
                     RemoveTexture();
                     }
-                if(iHdmiController)
-                    {
-                     SetImageL();
-                    }
-                iOldFocusIndex = iMediaList->FocusIndex();
+                SetItemToHDMIL();
                 if ( NGlxNFullScreenUIState::EUiOn == GetUiSate() )
                     {
                     HideUi(ETrue);
@@ -1062,11 +1062,13 @@
                 //slider event handling   
             case ETypePrimaryValueChange:
                 {
-                // Zoomview is only launched if the currentslider value is above the level
-                // of fullscreenlevel.
                 iTimer->Cancel();
                 iSliderWidget->ShowWidget( ETrue, 0 );
-                TRAP_IGNORE( ActivateZoomControlL(EZoomStartSlider));
+                TRAPD( err, ActivateZoomControlL(EZoomStartSlider));
+                if (err != KErrNone)
+                    {
+                    iSliderModel->SetPrimaryValue(GetInitialZoomLevel());
+                    }
                 }
                 return EEventConsumed;
             default:
@@ -1100,21 +1102,10 @@
 		    break;
 		case EGlxCmdRenameCompleted:
 		    {
-            if (iHdmiController)
-                {
-                SetImageL();
-                }
+            SetItemToHDMIL();
 			consumed = ETrue;
             break;
             }
-//		case EGlxCmdRotateLeft:
-//			iCoverFlowWidget->RotateImage(IMulWidget::ERotateLeft,size,KGlxRotationDelay);
-//		    consumed = ETrue;
-//		    break;
-//		case EGlxCmdRotateRight:
-//		    iCoverFlowWidget->RotateImage(IMulWidget::ERotateRight,size,KGlxRotationDelay);
-//            consumed = ETrue;
-//            break;
         } 
     return consumed;
     }
@@ -1352,6 +1343,7 @@
         TBool expired = !iDrmUtility->CheckOpenRightsL(uri,ETrue);
         if(expired)
             {
+			iBusyIcon->ShowBusyIconL(EFalse);				
             iDrmUtility->ShowRightsInfoL(uri);
             return;
             }
@@ -1384,7 +1376,10 @@
         {
         swipedirection = (focusindex-iOldFocusIndex < 0 ? EBackward : EForward) ;
         }     
-      return swipedirection;        
+    GLX_LOG_INFO1("CGlxFullScreenViewImp::GetSwipeDirection()"
+            " Direction = [%d] ", swipedirection);
+
+    return swipedirection;        
     }
 // ---------------------------------------------------------------------------
 // 
@@ -1430,32 +1425,79 @@
     const TGlxMedia& item = iMediaList->Item(GetIndexToBeRemoved());
     iUiUtility->GlxTextureManager().RemoveTexture(item.Id(),EFalse);
     }
+
 // ---------------------------------------------------------------------------
 // 
 // Set the image to external display - HDMI
 // ---------------------------------------------------------------------------
 //
-void CGlxFullScreenViewImp::SetImageL()
+void CGlxFullScreenViewImp::SetItemToHDMIL()
     {
-    TRACER("CGlxFullScreenViewImp::SetImageL - CGlxHdmi");
-    TGlxMedia item = iMediaList->Item(iMediaList->FocusIndex());
+    TRACER("CGlxFullScreenViewImp::SetImageToHDMIL - CGlxHdmi");
+
+    TInt focusIndex = iMediaList->FocusIndex();
+
+    // If we dont know what item we are focussing on 
+    // or if out medialist is empty
+    // or if HDMI is not connected 
+    // or if there is no HDMI Controller at all 
+    // then dont SetImageToHDMI :)  
+    if( ( KErrNotFound == focusIndex)
+            || (0 == iMediaList->Count())
+            || (NULL == iHdmiController)
+            || (!iHdmiController->IsHDMIConnected())) 
+        {
+        GLX_LOG_INFO("CGlxFullScreenViewImp::SetImageToHDMIL - Cant Set Image To HDMI");
+        return;
+        }
+    
+    TGlxMedia item = iMediaList->Item(focusIndex);
     TInt error = GlxErrorManager::HasAttributeErrorL(item.Properties(),
-            KGlxMediaIdThumbnail);
-    if (item.Category() != EMPXVideo && iDrmUtility->CheckOpenRightsL(
-            item.Uri(), ETrue) && (error == KErrNone))
+        KGlxMediaIdThumbnail);
+    
+    // Item will be supported by HDMI ONLY if
+    // it is not a video
+    // and it has valid DRM Viewing rights
+    // and it has no attribute error 
+    if ( (item.Category() != EMPXVideo) 
+            && iDrmUtility->CheckOpenRightsL(item.Uri(), ETrue) 
+            && (error == KErrNone) )
         {
+        GLX_LOG_INFO("CGlxFullScreenViewImp::SetImageToHDMIL - CGlxHdmi - Setting the Image");
         TInt frameCount(0);
         TSize orignalSize;
-        TBool aFramesPresent = item.GetFrameCount(frameCount);
-        TBool adimension = item.GetDimensions(orignalSize);
+        item.GetFrameCount(frameCount);
+        item.GetDimensions(orignalSize);
         iHdmiController->SetImageL(item.Uri(), orignalSize, frameCount);
-        GLX_LOG_INFO("CGlxFullScreenViewImp::SetImageL - CGlxHdmi - calling SetImage");
         }
     else
         {
-        GLX_LOG_INFO("CGlxFullScreenViewImp::SetImageL - CGlxHdmi - calling IsVideo");
-        //Set the external display to cloning mode.
-        //If the current item is a video, corruted thumbnail
-        iHdmiController->IsVideo();
+        GLX_LOG_INFO("CGlxFullScreenViewImp::SetImageToHDMIL - Unsupported Item");
+        //Set the external display to cloning mode if
+        //the current item is something we dont support 
+        //(e.g. video, corrupted item, item with invalid DRM);
+        iHdmiController->ItemNotSupported();
+        }
+    iOldFocusIndex = iMediaList->FocusIndex();
+    }
+// ---------------------------------------------------------------------------
+// HarvestingUpdated
+// 
+// ---------------------------------------------------------------------------
+//
+void CGlxFullScreenViewImp::HarvestingUpdated( 
+                HarvesterEventObserverType HarvestingUpdated, 
+                HarvesterEventState aHarvesterEventState,
+                TInt aItemsLeft )
+    {
+    TRACER("CGlxFullScreenViewImp::HarvestingUpdated()");
+    if(HarvestingUpdated == EHEObserverTypeMMC)
+        {
+        if(iZoomControl && iZoomControl->Activated())
+        	{
+        	SetSliderLevel();
+		    DeactivateZoomControlL();	
+        	}
+        ProcessCommandL(EAknSoftkeyClose);
         }
     }
--- a/photosgallery/viewframework/views/gridview/group/glxgridview.mmp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/views/gridview/group/glxgridview.mmp	Mon Mar 15 12:40:30 2010 +0200
@@ -76,6 +76,6 @@
 LIBRARY         egul.lib alfclient.lib
 LIBRARY         aknskins.lib
 LIBRARY         featmgr.lib					// FeatureManager
- 
+LIBRARY	   	harvesterclient.lib 
 // End of File
 
--- a/photosgallery/viewframework/views/gridview/inc/glxgridviewcontainer.h	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/views/gridview/inc/glxgridviewcontainer.h	Mon Mar 15 12:40:30 2010 +0200
@@ -34,6 +34,9 @@
 
 #include <glxthumbnailcontext.h>
 #include <glxuistd.h>
+#include <glxprogressindicator.h>
+#include <harvesterclient.h>
+
 #include "glxgridvieweventobserver.h"
 
 class CHgGrid;
@@ -50,7 +53,8 @@
 class CGlxGridViewContainer : 	public CCoeControl,
 								public MHgScrollBufferObserver,
 								public MHgSelectionObserver,
-								public MHgMarkingObserver
+								public MHgMarkingObserver,
+								public MHarvesterEventObserver
 	{
 public:
 	/**
@@ -93,6 +97,13 @@
 
 	//handle orientaion realted changes
 	void HandleResourceChange(TInt aType);
+public:
+    // from MHarvesterEventObserver
+    void HarvestingUpdated( 
+                HarvesterEventObserverType aHEObserverType, 
+                HarvesterEventState aHarvesterEventState,
+                TInt aItemsLeft );
+
 private:
 	/**
 	 * C++ default constructor.
@@ -207,6 +218,8 @@
 	MGlxGridEventObserver& 	iGlxGridViewObserver;
 	//toolbar - created dynamically.
     CAknToolbar* iToolbar;
+    CGlxProgressIndicator* iProgressIndicator;
+    RHarvesterClient iHarvesterClient;
 	};
 
 #endif // CGLXGRIDVIEWCONTROL_H
--- a/photosgallery/viewframework/views/gridview/src/glxgridviewcontainer.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/views/gridview/src/glxgridviewcontainer.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -85,6 +85,7 @@
 CGlxGridViewContainer::~CGlxGridViewContainer()
 	{
 	TRACER("CGlxGridViewContainer::~CGlxGridViewContainer");
+	iHarvesterClient.Close();
 	if(iBgContext)
 		{
 		delete iBgContext;	
@@ -160,6 +161,11 @@
 	// For DRM Utility
 	iDRMUtility = CGlxDRMUtility::InstanceL();
 
+	//Fix for ESLM-82WJ59: Clear the last uri for which DRM Rights were consumed
+	//since the GridView::Activate() and FullScreen::DeActivate() can be called in any order,
+	//this call is being made to be on safer side
+	iDRMUtility->ClearLastConsumedItemUri();
+
 	// background Skin Context for the skin support
 	TRect apRect = iEikonEnv->EikAppUi()->ApplicationRect();
 	iBgContext = CAknsBasicBackgroundControlContext::NewL(
@@ -173,6 +179,13 @@
 			GlxFullThumbnailAttributeId( EFalse,  iGridIconSize.iWidth,
 					iGridIconSize.iHeight ) );
 	CreateGridL();
+
+   TInt err = iHarvesterClient.Connect();
+   GLX_LOG_INFO1("iHarvesterClient.Connect() err = %d",err);
+   if(err == KErrNone)
+		{
+        iHarvesterClient.AddHarvesterEventObserver(*this, EHEObserverTypeMMC, 1000);
+		}
 	}
 
 // ---------------------------------------------------------------------------
@@ -916,4 +929,24 @@
         break;
        }
 	}
+
+// ---------------------------------------------------------------------------
+// HarvestingUpdated
+// 
+// ---------------------------------------------------------------------------
+//
+void CGlxGridViewContainer::HarvestingUpdated( 
+                HarvesterEventObserverType HarvestingUpdated, 
+                HarvesterEventState aHarvesterEventState,
+                TInt aItemsLeft )
+    {
+    TRACER("CGlxGridViewContainer::HarvestingUpdated()");
+    GLX_LOG_INFO1("HarvestingUpdated = %d",HarvestingUpdated);
+    GLX_LOG_INFO1("aHarvesterEventState = %d",aHarvesterEventState);
+    GLX_LOG_INFO1("aItemsLeft = %d",aItemsLeft);
+    if(HarvestingUpdated == EHEObserverTypeMMC)
+        {
+        iGlxGridViewObserver.HandleGridEventsL(EAknSoftkeyClose);
+        }
+    }
 //end of file
--- a/photosgallery/viewframework/views/listview/group/glxlistview.mmp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/views/listview/group/glxlistview.mmp	Mon Mar 15 12:40:30 2010 +0200
@@ -53,6 +53,7 @@
 SYSTEMINCLUDE   ../../../commandhandlers/inc
 SYSTEMINCLUDE   ../../../dataprovider/inc
 SYSTEMINCLUDE   ../../../medialists/inc						//glxmedialistiterator
+SYSTEMINCLUDE   ../../../uiutilities/inc
 
 LIBRARY         euser.lib
 LIBRARY         cone.lib
--- a/photosgallery/viewframework/views/listview/inc/glxlistviewimp.h	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/views/listview/inc/glxlistviewimp.h	Mon Mar 15 12:40:30 2010 +0200
@@ -32,6 +32,9 @@
 #include <ganes/HgScrollBufferObserverIface.h>
 #include <ganes/HgSelectionObserverIface.h>
 
+#include <glxprogressindicator.h>
+#include <harvesterclient.h>
+
 // FORWARD DECLARATIONS
 class MMPXCollectionUtility;
 class CGlxPreviewThumbnailBinding;
@@ -39,6 +42,18 @@
 class CHgDoubleGraphicListFlat;
 class CAknsBasicBackgroundControlContext;
 
+
+//NOT: This enum is based on TGlxCollectionPluginPriority. If any
+//change happen regarding priority order in that, need to change 
+//in this enum also.
+enum
+    {
+    EGlxListItemAll = 0,
+    EGlxListItemMonth,
+    EGlxListItemAlbum,
+    EGlxLIstItemTag    
+    };
+
 // CLASS DECLARATION
 
 /**
@@ -57,7 +72,8 @@
 									   public MGlxMediaListObserver,
 								       public MHgScrollBufferObserver,
 									   public MHgSelectionObserver,
-									   public MPreviewTNObserver
+									   public MPreviewTNObserver,
+									   public MDialogDismisedObserver
     {
 public:
     /**
@@ -157,6 +173,7 @@
     
 private:
     void CreateListL();
+    void SetDefaultThumbnailL(TInt aIndex);
 	 
 public: // from MGlxMediaListObserver
     void HandleItemAddedL( TInt aStartIndex, TInt aEndIndex, MGlxMediaList* aList );
@@ -173,6 +190,7 @@
     void HandleMediaL( TInt aListIndex, MGlxMediaList* aList );
     void HandleItemModifiedL( const RArray<TInt>& aItemIndexes, MGlxMediaList* aList );
     void HandlePopulatedL( MGlxMediaList* aList );
+    void HandleDialogDismissedL(); // from MDialogDismisedObserver
 	 
 private:    // Data
 
@@ -217,6 +235,10 @@
     // save title text 
     HBufC* iTitletext;
 
+    CGlxProgressIndicator* iProgressIndicator;
+
+	//Check for TN generation
+    TBool isTnGenerationComplete;
     };
 
 #endif  // C_GLXLISTVIEWIMP_H
--- a/photosgallery/viewframework/views/listview/src/glxlistviewimp.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/views/listview/src/glxlistviewimp.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -42,6 +42,8 @@
 #include <glxsetappstate.h>
 #include <glxthumbnailattributeinfo.h>
 #include <glxcollectionpluginalbums.hrh>
+#include <glxcollectionpluginmonths.hrh>
+#include <glxcollectionplugintype.hrh>
 
 const TInt KListDataWindowSize(25);
 const TInt KNoOfPages(2);
@@ -117,6 +119,7 @@
     SetToolbarObserver(this);
     iBackwardNavigation = EFalse;
     iIsRefreshNeeded = EFalse;
+	isTnGenerationComplete = ETrue;
     }
 
 // ---------------------------------------------------------------------------
@@ -255,6 +258,13 @@
 	delete iPreviewTNBinding;
 	iPreviewTNBinding = NULL;
 	DestroyListViewWidget();
+#ifndef __WINSCW__ 
+	if(iProgressIndicator)
+	    {
+        delete iProgressIndicator;
+        iProgressIndicator = NULL;
+	    }
+#endif
 	}
 
 // ---------------------------------------------------------------------------
@@ -416,8 +426,29 @@
 void CGlxListViewImp::HandleOpenL( TInt aIndex )
     {
     TRACER("CGlxListViewImp::HandleOpenL");
+    
+#ifndef __WINSCW__ 
+    TInt leftVariable = 0;
+    TRAPD(err,leftVariable = iUiUtility->GetItemsLeftCountL());
+    GLX_LOG_INFO1("CGlxListViewImp RProperty::Get leftVariable %d",leftVariable);
+    isTnGenerationComplete = (leftVariable)?EFalse:ETrue;
+    GLX_LOG_INFO1("CGlxListViewImp isTnGenerationComplete %d",isTnGenerationComplete);
+    if(err != KErrNone)
+        {
+        GLX_LOG_INFO1("CGlxListViewImp RProperty::Get errorcode %d",err);
+        }
+    if(!isTnGenerationComplete)
+        {
+        if(iProgressIndicator)
+            {
+            delete iProgressIndicator;
+            iProgressIndicator = NULL;
+            }
+        iProgressIndicator = CGlxProgressIndicator::NewL(*this);
+        }
+#endif
 	if( iNextViewActivationEnabled && ( aIndex >= 0 && aIndex < 
-	        iMediaList->Count()))
+	        iMediaList->Count()) && isTnGenerationComplete)
 	    {
 	    	//Delete the PreviewTNMBinding as in forward navigation
 		//we do not get the medialist callback.
@@ -455,15 +486,7 @@
     else
     	{
     	//Displays default thumbnail if aBitmap is NULL 
-    	
-    	TFileName resFile(KDC_APP_BITMAP_DIR);
-		resFile.Append(KGlxIconsFilename);
-		CFbsBitmap* defaultBitmap = AknIconUtils::CreateIconL(resFile,
-						 EMbmGlxiconsQgn_prop_image_notcreated);
-		AknIconUtils::SetSize(defaultBitmap, 
-				CHgDoubleGraphicListFlat::PreferredImageSize());
-		
-    	iList->ItemL(focusIndex).SetIcon(CGulIcon::NewL(defaultBitmap));
+        SetDefaultThumbnailL(focusIndex);
     	}
     
     TInt firstIndex = iList->FirstIndexOnScreen();
@@ -550,11 +573,31 @@
 		{
 	    TFileName resFile(KDC_APP_BITMAP_DIR);
 		resFile.Append(KGlxIconsFilename);
-    	CFbsBitmap* bitmap = AknIconUtils::CreateIconL(resFile,
+        
+        CFbsBitmap* bitmap;
+        CMPXCollectionPath* path = iMediaList->PathLC( NGlxListDefs::EPathParent );
+        if (path->Id() == KGlxCollectionPluginAlbumsImplementationUid)
+            {           
+            bitmap = AknIconUtils::CreateIconL(resFile,
+                    EMbmGlxiconsQgn_prop_photo_album_large);
+            AknIconUtils::SetSize(bitmap, 
+                    CHgDoubleGraphicListFlat::PreferredImageSize());
+            }
+        else if (path->Id() == KGlxCollectionPluginMonthsImplementationUid)
+            {
+            bitmap = AknIconUtils::CreateIconL(resFile,
+                    EMbmGlxiconsQgn_prop_photo_calendar_large);
+            AknIconUtils::SetSize(bitmap, 
+                    CHgDoubleGraphicListFlat::PreferredImageSize());
+            }
+        else
+            {
+            bitmap = AknIconUtils::CreateIconL(resFile,
    						 EMbmGlxiconsQgn_prop_image_notcreated);
 		AknIconUtils::SetSize(bitmap, 
 				CHgDoubleGraphicListFlat::PreferredImageSize());
-
+            }
+		
 	    iList = CHgDoubleGraphicListFlat::NewL(
 	            ClientRect(), 
 	            mediaCount, 
@@ -580,8 +623,16 @@
 		//Fix for ESLM-7SAHPT::Clear Flag to Disable QWERTY search input in list view
 		iList->ClearFlags(CHgScroller::EHgScrollerSearchWithQWERTY ); 
 		
+		//While coming back to main listview
+		TGlxIdSpaceId id = iMediaList->IdSpaceId(0);
+		if((id == KGlxIdSpaceIdRoot) && (mediaCount > 0))
+		    {            
+            for (TInt i = 0; i < mediaCount; i++)
+                {
+                    SetDefaultThumbnailL(i);
+                }
+		    }
         // Set the scrollbar type for albums list
-        CMPXCollectionPath* path = iMediaList->PathLC( NGlxListDefs::EPathParent );
         if (path->Id() == KGlxCollectionPluginAlbumsImplementationUid)
             {
             iList->SetScrollBarTypeL(CHgScroller::EHgScrollerLetterStripLite );
@@ -628,6 +679,7 @@
             const TGlxMedia& item = iMediaList->Item(i);                
             iList->ItemL(i).SetTitleL(item.Title());
             iList->ItemL(i).SetTextL(item.SubTitle());
+            SetDefaultThumbnailL(i);
             }            
         
         if(aStartIndex == aEndIndex )
@@ -817,5 +869,97 @@
     {
     
     }
-		
+
+// ----------------------------------------------------------------------------
+// SetDefaultThumbnailL
+// ----------------------------------------------------------------------------
+// 		
+void CGlxListViewImp::SetDefaultThumbnailL(TInt aIndex)
+    {
+    TRACER("CGlxListViewImp::SetDefaultThumbnail");
+    CFbsBitmap* defaultBitmap = NULL;
+    
+    TFileName resFile(KDC_APP_BITMAP_DIR);
+    resFile.Append(KGlxIconsFilename);
+    
+    TGlxIdSpaceId id = iMediaList->IdSpaceId(0);        
+    // In main list view, default thumbnails will be set according 
+    // to the list items.
+    if(id == KGlxIdSpaceIdRoot)
+        {
+        GLX_LOG_INFO1("CGlxListViewImp::SetDefaultThumbnail - For main list view "
+                "aIndex %d",aIndex);
+        // Mapping between switch, index and order of colleciton done on 
+        // the base of TGlxCollectionPluginPriority
+        switch(aIndex)
+            {
+            case EGlxListItemAll:
+                defaultBitmap = AknIconUtils::CreateIconL(resFile,
+                        EMbmGlxiconsQgn_prop_photo_all_large);
+                AknIconUtils::SetSize(defaultBitmap, 
+                        CHgDoubleGraphicListFlat::PreferredImageSize());            
+                break;
+            case EGlxListItemMonth:
+                defaultBitmap = AknIconUtils::CreateIconL(resFile,
+                        EMbmGlxiconsQgn_prop_photo_calendar_large);
+                AknIconUtils::SetSize(defaultBitmap, 
+                        CHgDoubleGraphicListFlat::PreferredImageSize());
+                break;
+            case EGlxListItemAlbum:
+                defaultBitmap = AknIconUtils::CreateIconL(resFile,
+                        EMbmGlxiconsQgn_prop_photo_album_large);
+                AknIconUtils::SetSize(defaultBitmap, 
+                        CHgDoubleGraphicListFlat::PreferredImageSize());
+                break;
+            case EGlxLIstItemTag:
+                defaultBitmap = AknIconUtils::CreateIconL(resFile,
+                        EMbmGlxiconsQgn_prop_photo_tag_large);
+                AknIconUtils::SetSize(defaultBitmap, 
+                        CHgDoubleGraphicListFlat::PreferredImageSize());
+                break;
+            default:
+                break;                    
+            }        
+        }
+    else
+        {
+        GLX_LOG_INFO1("CGlxListViewImp::SetDefaultThumbnail - For other list view "
+                "aIndex %d",aIndex);
+        CMPXCollectionPath* path = iMediaList->PathLC( NGlxListDefs::EPathParent );
+        if(path->Id(0) == KGlxCollectionPluginAlbumsImplementationUid)
+            {
+            defaultBitmap = AknIconUtils::CreateIconL(resFile,
+                    EMbmGlxiconsQgn_prop_photo_album_large);
+            AknIconUtils::SetSize(defaultBitmap, 
+                    CHgDoubleGraphicListFlat::PreferredImageSize());
+            }
+        else if(path->Id(0) == KGlxCollectionPluginMonthsImplementationUid)
+            {
+            defaultBitmap = AknIconUtils::CreateIconL(resFile,
+                    EMbmGlxiconsQgn_prop_photo_calendar_large);
+            AknIconUtils::SetSize(defaultBitmap, 
+                    CHgDoubleGraphicListFlat::PreferredImageSize());
+            }
+        else
+            {
+            defaultBitmap = AknIconUtils::CreateIconL(resFile,
+                    EMbmGlxiconsQgn_prop_image_notcreated);
+            AknIconUtils::SetSize(defaultBitmap, 
+                    CHgDoubleGraphicListFlat::PreferredImageSize());
+            }
+        CleanupStack::PopAndDestroy(path);
+        }
+    iList->ItemL(aIndex).SetIcon(CGulIcon::NewL(defaultBitmap));
+    }
+
+
+// ----------------------------------------------------------------------------
+// HandleDialogDismissedL
+// ----------------------------------------------------------------------------
+//	
+void CGlxListViewImp::HandleDialogDismissedL()
+    {
+    TRACER("CGlxListViewImp::HandleDialogDismissedL()");
+    isTnGenerationComplete = ETrue;
+    }
 //  End of File
--- a/photosgallery/viewframework/views/metadatadialog/group/glxmetadatadialog.mmp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/views/metadatadialog/group/glxmetadatadialog.mmp	Mon Mar 15 12:40:30 2010 +0200
@@ -71,6 +71,7 @@
 SYSTEMINCLUDE		../../../../common/inc     // for CGlxResourceUtilities
 SYSTEMINCLUDE		../../../../commonui/inc
 
+LIBRARY      	aknphysics.lib
 LIBRARY			euser.lib
 LIBRARY			avkon.lib						//for Avkon conrols
 LIBRARY			eikcoctl.lib					//for eik controls
--- a/photosgallery/viewframework/views/metadatadialog/inc/glxmetadatadialog.h	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/views/metadatadialog/inc/glxmetadatadialog.h	Mon Mar 15 12:40:30 2010 +0200
@@ -29,7 +29,7 @@
 #include "mglxmedialistobserver.h"
 #include <mglxmetadatadialogobserver.h>
 #include "glxmedia.h"
-
+#include <aknphysicsobserveriface.h> //Physics - Kinetic scrolling listener
 
 // FORWARD DECLARATIONS
 class CGlxMetadataCommandHandler;class CGlxCommandHandlerAddToContainer;
@@ -44,7 +44,8 @@
 class CGlxMetadataDialog : public CAknDialog,
                            public MGlxMediaListProvider,
                            public MGlxMetadataDialogObserver,
-                           public MToolbarResetObserver
+                           public MToolbarResetObserver,
+                           public MAknPhysicsObserver
                           
     {
 public: // Constructors and destructor
@@ -92,6 +93,14 @@
      */
     void HandleToolbarResetting(TBool aVisible);
     
+protected: // from MAknPhysicsObserver   
+
+    void ViewPositionChanged( const TPoint& /*aNewPosition*/, TBool /*aDrawNow*/, TUint /*aFlags*/ );
+      
+    void PhysicEmulationEnded();
+      
+    TPoint ViewPosition() const;
+      
 protected:  // Functions from base classes
 
     /**
@@ -206,7 +215,22 @@
 		HBufC* iPreviousTitle;    
 		const TDesC& iUri;
 		CGlxCommandHandlerAddToContainer*  iAddToTag;
-		CGlxCommandHandlerAddToContainer*  iAddToAlbum;    
+		CGlxCommandHandlerAddToContainer*  iAddToAlbum;
+		/*
+		 * Store previous pointer event point
+		 */ 
+		TPoint iPrev;
+		
+		/*
+		 * Check if the dragging got beyond kinetic drag threshold & screen 
+		 * movement will start, if set to true 
+		 */
+		TBool iViewDragged;
+		
+		/*
+		 * Store the value of kinetic drag threshold
+		 */
+		TInt iKineticDragThreshold;
     };
 
 #endif  // GLXMETADATADIALOG_H
--- a/photosgallery/viewframework/views/metadatadialog/src/glximgvwrmetadatacontainer.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/views/metadatadialog/src/glximgvwrmetadatacontainer.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -108,6 +108,7 @@
 //  
 void CGlxImgVwrMetadataContainer::ConstructL( const TRect& /*aRect*/ )
     {   
+    TRACER("CGlxMetadataContainer::ConstructLL()");
     //Creating the RBuf texts for all the items except tags & albums
     //which would be updated as whne the item is edited
     iTextSetter.CreateL(KMaxFileName);
@@ -145,6 +146,7 @@
 //-----------------------------------------------------------------------------
 MGlxMediaList& CGlxImgVwrMetadataContainer::MediaList()
     {
+    TRACER("CGlxMetadataContainer::HandleAttributesAvailableL()");
     //returns the active medialist.
     return *iItemMediaList;    
     }
@@ -159,7 +161,6 @@
     iTextSetter.Copy(KGlxTextSetter);  
 
     //Creating a empty Settings list box which will  be populated with metadata in handleattributeavailable
-
     switch(aResourceId)
         {
         case EImgVwrNameItem:
@@ -204,6 +205,7 @@
 //-----------------------------------------------------------------------------
 TBool CGlxImgVwrMetadataContainer::IsItemModifiable()
     {
+    TRACER("CGlxMetadataContainer::IsItemModifiable()");
     //Only items like name , description, tag and albums are modifiable
     //The check is for the items from ENameItem(0) tille ETagsItem(4)
     if(ListBox()->CurrentItemIndex()<=ETagsItem)
@@ -221,50 +223,26 @@
 void CGlxImgVwrMetadataContainer::HandleListBoxEventL(CEikListBox*  /*aListBox*/,
         TListBoxEvent aEventType)
     {
+    TRACER("CGlxMetadataContainer::HandleListBoxEventL()");
     GLX_LOG_INFO("CGlxImgVwrMetadataContainer::HandleListBoxEventL");         
-    if ((aEventType == EEventEnterKeyPressed) || 
-            (aEventType == EEventEditingStarted) ||
-            (aEventType == EEventItemSingleClicked))
+    if (aEventType == EEventItemSingleClicked)
         {
-        //handle edit functionality if items when useer selects via touch
-        HandleListboxChangesL();
+        if(iItemMediaList->Count() == 0)
+            {
+            GLX_LOG_INFO("CGlxImgVwrMetadataContainer:: NO Items");         
+            return;
+            }
+        TInt index = ListBox()->CurrentItemIndex() ;
+        if(EImgVwrlicenseItem == index)
+            {
+            GLX_LOG_INFO("CGlxImgVwrMetadataContainer::Licence item");         
+            CGlxDRMUtility* drmUtility = CGlxDRMUtility::InstanceL();
+            CleanupClosePushL(*drmUtility);
+            drmUtility->ShowDRMDetailsPaneL(iItemMediaList->Item(0).Uri());
+            CleanupStack::PopAndDestroy(drmUtility);
+            }
         }
     }
-//-----------------------------------------------------------------------------
-// CGlxImgVwrMetadataContainer::HandleListboxChangesL
-//-----------------------------------------------------------------------------
-void CGlxImgVwrMetadataContainer::HandleListboxChangesL()
-    {
-
-    TInt index = ListBox()->CurrentItemIndex();
-
-    switch(index)
-        {
-        case EImgVwrNameItem:        
-        case EImgVwrDescriptionItem:
-            {
-            SetNameDescriptionL(index);
-            break;
-            }          
-
-        case EImgVwrlicenseItem:
-            {
-            
-            //Create DRM utility
-            CGlxDRMUtility* drmUtility = CGlxDRMUtility::InstanceL();
-            CleanupClosePushL(*drmUtility);
-            drmUtility->ShowDRMDetailsPaneL(iItemMediaList->Item(0).Uri()/*iUri*/);
-            CleanupStack::PopAndDestroy(drmUtility);
-            }  
-            break;
-        default:
-            {
-            break;    
-            }
-        }
-
-    }
-
 
 // ----------------------------------------------------------------------------
 // CGlxImgVwrMetadataContainer::ViewDynInitMenuPaneL
@@ -272,6 +250,7 @@
 // 
 void CGlxImgVwrMetadataContainer::ViewDynInitMenuPaneL(TInt aMenuId, CEikMenuPane* aMenuPane)
     {
+    TRACER("CGlxMetadataContainer::ViewDynInitMenuPaneL()");
     if( aMenuId == R_METADATA_MENU )
             {
             //Set dim the options based on the utem selected
@@ -288,7 +267,6 @@
 void CGlxImgVwrMetadataContainer::HandleAttributesAvailableL( TInt /*aItemIndex*/, 
         const RArray<TMPXAttribute>& aAttributes, MGlxMediaList* aList )
     {
-
     TRACER("CGlxMetadataContainer::HandleAttributesAvailableL()");
     //generic medialist for the item for all the attributes required other than tags and albums.
     TInt x = aAttributes.Count();
@@ -311,6 +289,7 @@
 void CGlxImgVwrMetadataContainer::HandleItemAddedL( TInt /*aStartIndex*/, TInt /*aEndIndex*/, 
         MGlxMediaList* aList )
     {
+    TRACER("CGlxMetadataContainer::HandleItemAddedL()");
     if(!iMarquee)
         {
             EnableMarqueingL();
@@ -497,7 +476,6 @@
         {
         case EImgVwrNameItem:        
         case EImgVwrDescriptionItem:
-
             {
             uiUtility->ScreenFurniture()->ModifySoftkeyIdL(CEikButtonGroupContainer::EMiddleSoftkeyPosition,
                     EAknSoftkeyEdit,R_GLX_METADATA_MSK_EDIT);
@@ -529,7 +507,7 @@
 //-----------------------------------------------------------------------------
 void CGlxImgVwrMetadataContainer::CreateMediaListForSelectedItemL()
     {
-    TRACER("CGlxMetadataContainer::CreateMediaListL");
+    TRACER("CGlxMetadataContainer::CreateMediaListForSelectedItemL");
 
     //create the collection path for the medialist to be created
     CMPXCollectionPath* path = CMPXCollectionPath::NewL();
@@ -722,6 +700,7 @@
 // 
 void CGlxImgVwrMetadataContainer::SetDurationLIicenseItemVisibilityL()
     {
+    TRACER("CGlxMetadataContainer::SetDurationLIicenseItemVisibilityL()");
     //get the media item.
     const TGlxMedia& item = iItemMediaList->Item(0);
     const CGlxMedia* media = item.Properties();
@@ -747,6 +726,7 @@
 //-----------------------------------------------------------------------------
 TBool CGlxImgVwrMetadataContainer::IsLicenseItem()
     {
+    TRACER("CGlxMetadataContainer::IsLicenseItem()");
     //Checks the item for DRMProtection.
     if((ListBox()->CurrentItemIndex()== EImgVwrlicenseItem))
         {
--- a/photosgallery/viewframework/views/metadatadialog/src/glxmetadatacontainer.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/views/metadatadialog/src/glxmetadatacontainer.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -959,27 +959,19 @@
             iAvkonAppUi->ProcessCommandL(EGlxCmdRenameCompleted);
             }
         }
-    //updation of tags and albums list based on the medialist callback.
-    if(aList == iTagMediaList ||  aList == iAlbumMediaList)
+    
+    TMPXAttribute titleAttrib(KMPXMediaGeneralTitle);
+    TIdentityRelation< TMPXAttribute > match ( &TMPXAttribute::Match );
+
+    if (KErrNotFound != aAttributes.Find(titleAttrib, match))
         {
-        for (TInt i = aAttributes.Count() - 1; i >= 0 ; i--)
+        if (aList == iTagMediaList)
             {
-            TMPXAttribute titleAtrribute (KMPXMediaGeneralTitle);
-            for (TInt i = aAttributes.Count() - 1; i >= 0 ; i--)
-                { 
-                if( titleAtrribute == aAttributes[i] )
-                    {
-                    if(aList == iTagMediaList)
-						{     
-						UpdateTagsL();
-						}
-					else if(aList == iAlbumMediaList)
-						{
-						UpdateAlbumsL();
-						}          
-                    }           
-                }
-          
+            UpdateTagsL();
+            }
+        else if (aList == iAlbumMediaList)
+            {
+            UpdateAlbumsL();
             }
         }
     
@@ -1097,6 +1089,18 @@
     ListBox()->ItemDrawer()->ColumnData()->SetMarqueeParams (KMarqueeLoopCount,
             KMarqueeScrollAmount, KMarqueeScrollDelay, KMarqueeScrollInterval);
     ListBox()->ItemDrawer()->ColumnData()->EnableMarqueeL(ETrue);
+    
+    //Fetch the current item index
+    TInt index = ListBox()->CurrentItemIndex();
+
+    //Reset the disable marquee flag, so that marquee effect can continue (this is normally reset by 
+    //base class of glxmetaDatadialog::HandlePointerEventL()
+    ListBox()->ItemDrawer()->ClearFlags(CListItemDrawer::EDisableMarquee);
+    
+    //This is the function which actually starts marquee effect. It is anyway being called from base
+    //implementation of OfferKeyEventL(), but for pointer event, we have to call
+    //this function
+    ListBox()->DrawItem(index);
     }    
 // ----------------------------------------------------------------------------
 // HandleCommandCompleteL
--- a/photosgallery/viewframework/views/metadatadialog/src/glxmetadatadialog.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/views/metadatadialog/src/glxmetadatadialog.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -27,6 +27,7 @@
 #include <StringLoader.h>
 #include <akntoolbar.h>
 #include <glxcommandhandleraddtocontainer.h>         // For CGlxCommandHandlerAddToContainer
+#include <aknphysics.h> // For Kinetic Scrolling
 
 //User includes
 #include <glxmetadatadialog.rsg>
@@ -117,6 +118,12 @@
 	// Instantiate the command handler
 	iMetadataCmdHandler = CGlxMetadataCommandHandler::NewL(this);
 	
+	//steps to find kinetic scroll threshold value
+	CAknPhysics* physics = CAknPhysics::NewL(*this, NULL);
+	CleanupStack::PushL(physics);
+	iKineticDragThreshold = physics->DragThreshold();
+	CleanupStack::PopAndDestroy(physics);
+	physics = NULL;
 	} 
 
 // -----------------------------------------------------------------------------
@@ -469,8 +476,49 @@
 void CGlxMetadataDialog::HandlePointerEventL(
     const TPointerEvent& aPointerEvent)
 	{
-	TRACER("CGlxMetadataDialog::HandlePointerEventL");
-	CCoeControl::HandlePointerEventL( aPointerEvent );
+
+    TRACER("CGlxMetadataDialog::HandlePointerEventL");
+
+    //This has to be called first, as base class implementation sets the flag 
+    // of settings dialog with EDisableMarquee 
+    CCoeControl::HandlePointerEventL( aPointerEvent );
+    
+    //After the above call we can call our implementation to reset the marque 
+    // flag and start marqueeing if needed
+    if(aPointerEvent.iType == TPointerEvent::EButton1Down
+            || aPointerEvent.iType == TPointerEvent::EButton2Down
+            || aPointerEvent.iType == TPointerEvent::EButton3Down
+            || aPointerEvent.iType == TPointerEvent::EDrag)
+        {
+            if(aPointerEvent.iType != TPointerEvent::EDrag)
+            {
+                iViewDragged = EFalse;
+            }
+            
+            if(aPointerEvent.iType == TPointerEvent::EDrag)
+            {
+                TInt delta = iPrev.iY - aPointerEvent.iPosition.iY;
+                //Check for physics threshold, if not more than threshold, we can
+                //still continue marqueeing
+                TInt deltaAbs = delta < 0 ? -delta : delta;
+                if(!iViewDragged && deltaAbs >= iKineticDragThreshold)
+                    iViewDragged = ETrue;
+            }
+            
+            //This has to done at every above mentioned event, since the  
+            //disable marquee flag is set by base implementation, forcing 
+            //us the need to reset it everytime.
+            if(!iViewDragged)
+            {
+                iContainer->EnableMarqueingL();
+            }
+        }
+    
+    //record positions unless it is drag event
+    if(aPointerEvent.iType != TPointerEvent::EDrag)
+        {
+        iPrev = aPointerEvent.iPosition;
+        }
 	}
 
 // ---------------------------------------------------------------------------
@@ -580,4 +628,20 @@
         toolbar->MakeVisible( aVisible );
         }
     }
+
+void CGlxMetadataDialog::ViewPositionChanged( const TPoint& /*aNewPosition*/, TBool /*aDrawNow*/, TUint /*aFlags*/ )
+    {
+    //Dummy implementation
+    }
+   
+void CGlxMetadataDialog::PhysicEmulationEnded()
+    {
+    //Dummy implementation
+    }
+   
+TPoint CGlxMetadataDialog::ViewPosition() const
+    {
+    //Dummy implementation
+    return TPoint(0,0);
+    }
 // End of File
--- a/photosgallery/viewframework/views/zoomview/inc/glxzoomcontrol.h	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/views/zoomview/inc/glxzoomcontrol.h	Mon Mar 15 12:40:30 2010 +0200
@@ -165,14 +165,15 @@
 
     void HandleShowUi(TBool aShow= EFalse) ;
 
-    void HandleZoomOutL(TInt aCommandId);
+    void HandleZoomOutL(TInt aCommandId);    
+    
 private:
         /*
         * Call back function for the CPeriodic
         */
        static TInt TimeOut(TAny* aSelf);
        void ActivateFullscreen();
-       void StartZoomAnimation();
+       void StartZoomAnimation(TZoomStartMode aStartMode);
 
 private:
     /**
@@ -223,7 +224,12 @@
     TBool HandlePointerEventsL(const TAlfEvent &aEvent);
     
     TInt GetInitialZoomLevel(TSize& aSize );
-
+    
+    /*
+    * Does the zoom out on pinch released event
+    */
+    void HandleHDMIGestureReleased();
+    
 private:    // Data
     CAlfEnv* iEnv;                                      // AlfEnv
     MGlxMediaList& iMediaList;                          // Medialist (not owned)
--- a/photosgallery/viewframework/views/zoomview/src/glxzoomcontrol.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/views/zoomview/src/glxzoomcontrol.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -58,7 +58,7 @@
 const TReal KGlxOpacityTransparent = 0.0;
 //zoom delay for animation while hdmi cable,
 //is connected and zoom is initiated
-const TInt KZoomDelay = 150000; 
+const TInt KHDMIZoomDelay = 250000; 
 //Zoom level for the animation , assuming the innitial level is 1.
 const TReal KGlxZoomLevel = 1.5;
 const TInt KGlxMinSmallImageZoomLevel =100;
@@ -277,11 +277,8 @@
     {
     TRACER("CGlxZoomControl::ActivateL()");
 
-    //To know if HDMi cable is connected.
     if ( !iZoomActive )
         {
-        //This Varaiable updates that we are in zoom state now.
-        iZoomActive = ETrue;
         //To Retrive the image details
         TMPXAttribute thumbNailAttribute(0,0);
 
@@ -291,10 +288,9 @@
                 ScreenSize(),aItem, idspace, this ));
         iImageVisual->SetImage(*iImageTexture);
         
-        
         if(iGlxTvOut->IsHDMIConnected()&& !aViewingMode )
             {
-            StartZoomAnimation();
+            StartZoomAnimation(aStartMode);
             }
         else
             {
@@ -347,25 +343,38 @@
                     }
                 }
             }
+        // Now the zoom activation process is complete.
+        // Now is when truly zoom is active. 
+        iZoomActive = ETrue;
         }
     }
 // ---------------------------------------------------------------------------
 // StartZoomAnimation
 // ---------------------------------------------------------------------------
 // 
-void CGlxZoomControl::StartZoomAnimation()
+void CGlxZoomControl::StartZoomAnimation(TZoomStartMode aStartMode)
     {
     TRACER("CGlxZoomControl::StartZoomAnimation()");
     iZoomIn = ETrue;
     //Set zoom visible but not enable the gesturehelper events    
-    iViewPort->SetOpacity(KGlxOpacityOpaque);  
+    iViewPort->SetOpacity(KGlxOpacityOpaque);    
     TAlfTimedValue timedvalue;
     //using KGlxOpacityOpaque for the value 1 , assuming the initial zoom level as 1.
     timedvalue.SetValueNow(KGlxOpacityOpaque); 
-    timedvalue.SetTarget(KGlxZoomLevel,KZoomDelay/1000);    
+    timedvalue.SetTarget(KGlxZoomLevel,KHDMIZoomDelay/1000);    
     iImageVisual->SetScale(timedvalue);
-    iTimer->Cancel();
-    iTimer->Start(KZoomDelay,KZoomDelay,TCallBack( TimeOut,this ));
+    
+    //If zoom is not done using pinch, zoom out with the rubber effect
+    //Else wait for the gesture helper event for zooming out.
+    if(aStartMode != EZoomStartPinch)
+        {
+        iTimer->Cancel();
+        iTimer->Start(KHDMIZoomDelay,KHDMIZoomDelay,TCallBack( TimeOut,this ));
+        }
+    else
+        {
+        iGestureHelper->AddObserver(this);
+        }
     }
 // ---------------------------------------------------------------------------
 // TimeOut
@@ -393,7 +402,7 @@
         iZoomIn = EFalse;
         TAlfTimedValue timedvalue;
         timedvalue.SetValueNow(KGlxZoomLevel);
-        timedvalue.SetTarget(KGlxOpacityOpaque,KZoomDelay/1000);
+        timedvalue.SetTarget(KGlxOpacityOpaque,KHDMIZoomDelay/1000);
         iImageVisual->SetScale(timedvalue);
         }
     else
@@ -590,6 +599,12 @@
     {
     TRACER("CGlxZoomControl::VisualLayoutUpdated ");
     // Callback comes to this function when there is a  resolution change
+    
+    if(iGlxTvOut->IsHDMIConnected())
+        {
+        return;
+        }
+    
     TRect rect;
     rect = AlfUtil::ScreenSize();
     if ( (rect.Width() != iScreenSize.iWidth) && ( rect.Height() != iScreenSize.iHeight) && (Activated()) )
@@ -809,6 +824,22 @@
 
 
 // -----------------------------------------------------------------------------
+// HandleHDMIGestureReleased
+// -----------------------------------------------------------------------------
+//
+void CGlxZoomControl::HandleHDMIGestureReleased()
+    {
+    TRACER("void CGlxZoomControl::HandlePinchReleased");
+    if ( iGlxTvOut->IsHDMIConnected() && iZoomActive)
+        {
+        //On HDMI pinch release, zoom out to fullscreen
+        GLX_LOG_INFO("_PHOTOS_LOG_: void CGlxZoomControl::HandlePinchReleased Start ZoomOut");
+        iTimer->Cancel();
+        iTimer->Start(KHDMIZoomDelay,KHDMIZoomDelay,TCallBack( TimeOut,this ));
+        }
+    }
+
+// -----------------------------------------------------------------------------
 // HandlePointerEventsL
 // -----------------------------------------------------------------------------
 //
@@ -830,21 +861,41 @@
     
     TGestureCode code = aEvent.Code(MGestureEvent::EAxisBoth); 
 	GLX_LOG_INFO1("_PHOTOS_LOG_: void CGlxZoomControl::HandleGestureL  Code : %d", code);
-    
-    // Todo: This switch should go into the event handler.  
+	
+	//In HDMI pinch mode we will handle only released gesture
+    //to zoom out the image to fullscreeen.
+	if( iGlxTvOut->IsHDMIConnected() )	    
+	    {        
+        if(code == EGestureReleased)
+            {
+            HandleHDMIGestureReleased();
+            }
+	    }
+	else
+	    {
+        // Todo: This switch should go into the event handler.  
         switch (code)
             {
             case EGestureDrag:
+            if (aEvent.Visual() == iImageVisual) 
+                {
                 iEventHandler->HandleDragEvent(aEvent);
+                }
                 break;
             case EGestureTap:
+            if (aEvent.Visual() == iImageVisual)
+                {
                 iEventHandler->HandleSingleTap(aEvent);
+                }
                 break;
             case EGesturePinch:
                 iEventHandler->HandlePinchEventL(aEvent);
                 break;
             case EGestureDoubleTap:
+            if (aEvent.Visual() == iImageVisual)
+                {
                 iEventHandler->HandleDoubleTap(aEvent);
+                }
                 break;
             case EGestureReleased:
                 iEventHandler->HandleGestureReleased(aEvent);
@@ -852,6 +903,7 @@
             default :
                 break;
             }
+	    }
     iEventHandler->SetPreviousEventCode(code);
     }
 
--- a/photosgallery/viewframework/visuallistmanager/src/glxitemvisual.cpp	Fri Mar 12 15:42:44 2010 +0200
+++ b/photosgallery/viewframework/visuallistmanager/src/glxitemvisual.cpp	Mon Mar 15 12:40:30 2010 +0200
@@ -390,7 +390,8 @@
             {
             // create the animated texture from the URI
     		CAlfTexture& animTexture =
-    		   iUiUtility->GlxTextureManager().CreateAnimatedGifTextureL( uri, mediaItemSize );
+    		   iUiUtility->GlxTextureManager().CreateAnimatedGifTextureL( uri, mediaItemSize,
+    		           aItem, aItem.IdSpaceId());
             StartAnimation( animTexture );
     		}
         SetAnimateWhenAttributesAvailable(EFalse);