Revision: 201021 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Wed, 09 Jun 2010 09:41:51 +0300
branchRCL_3
changeset 35 420f6808bf21
parent 32 78ad99c24f08
child 47 f9e827349359
Revision: 201021 Kit: 2010123
photos_plat/collection_plugins_api/group/bld.inf
photos_plat/collection_plugins_api/inc/glxcollectionplugindownloads.hrh
photos_plat/collection_plugins_api/inc/glxcollectionpluginmonths.hrh
photos_plat/gallery_utilities_api/inc/glxcollectionpluginpriority.hrh
photosgallery/collectionframework/datasource/plugins/glxdatasourcemde/src/glxdatasourcetaskmde.cpp
photosgallery/collectionframework/datasource/plugins/glxdatasourcemde/src/glxdatasourcetaskmdeattribute.cpp
photosgallery/collectionframework/datasource/plugins/glxdatasourcemde/src/glxdatasourcetaskmdeidlist.cpp
photosgallery/collectionframework/datasource/plugins/glxdatasourcemde/src/glxdatasourcetaskmdethumbnail.cpp
photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcemds.h
photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcemds.inl
photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcetaskmds.h
photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcetaskmdsidlist.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/glxdatasourcetaskmdsidlist.cpp
photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdsthumbnail.cpp
photosgallery/collectionframework/group/bld.inf
photosgallery/collectionframework/plugins/glxcollectionpluginalbums/src/glxcollectionpluginalbums.cpp
photosgallery/collectionframework/plugins/glxcollectionplugindownloads/data/2000a76A.rss
photosgallery/collectionframework/plugins/glxcollectionplugindownloads/src/glxcollectionplugindownloadsproxy.cpp
photosgallery/collectionframework/plugins/glxcollectionpluginmonths/src/glxcollectionpluginmonths.cpp
photosgallery/commonui/src/glxnavigationalstate.cpp
photosgallery/controllers/imageviewer/src/glximageviewermanager.cpp
photosgallery/gallery/sis/glxgallery_stub.pkg
photosgallery/gallery/src/glxappui.cpp
photosgallery/rom/glxgallery.iby
photosgallery/rom/glxgallery_resources.iby
photosgallery/slideshow/engine/bwins/shwslideshowengineu.def
photosgallery/slideshow/engine/controlsrc/shweffectcontrol.cpp
photosgallery/slideshow/engine/controlsrc/shweffectcontrol.h
photosgallery/slideshow/engine/controlsrc/shwevent.cpp
photosgallery/slideshow/engine/controlsrc/shwviewcontrol.cpp
photosgallery/slideshow/engine/controlsrc/shwviewcontrol.h
photosgallery/slideshow/engine/coresrc/shwslideshowengine.cpp
photosgallery/slideshow/engine/coresrc/shwslideshowengineimpl.cpp
photosgallery/slideshow/engine/coresrc/shwslideshowengineimpl.h
photosgallery/slideshow/engine/eabi/shwslideshowengineu.def
photosgallery/slideshow/engine/group/shwslideshowengine.mmp
photosgallery/slideshow/engine/inc/shwevent.h
photosgallery/slideshow/engine/inc/shwslideshowengine.h
photosgallery/slideshow/settingsdialog/group/shwsettingsdialog.mmp
photosgallery/slideshow/view/inc/shwslideshowview.h
photosgallery/slideshow/view/src/shwslideshowview.cpp
photosgallery/viewframework/commandhandlers/commandhandlerbase/src/glxmedialistcommandhandler.cpp
photosgallery/viewframework/commandhandlers/commandhandlerbase/src/glxmpxcommandcommandhandler.cpp
photosgallery/viewframework/commandhandlers/commoncommandhandlers/bwins/glxcommoncommandhandlersu.def
photosgallery/viewframework/commandhandlers/commoncommandhandlers/eabi/glxcommoncommandhandlersu.def
photosgallery/viewframework/commandhandlers/commoncommandhandlers/inc/glxcommandhandleraddtocontainer.h
photosgallery/viewframework/commandhandlers/commoncommandhandlers/inc/glxcommandhandleraiwedit.h
photosgallery/viewframework/commandhandlers/commoncommandhandlers/inc/glxcommandhandlerremovefrom.h
photosgallery/viewframework/commandhandlers/commoncommandhandlers/inc/glxcommandhandlervideoplayback.h
photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandleraddtocontainer.cpp
photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandleraiwedit.cpp
photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlerback.cpp
photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlerdelete.cpp
photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlerremovefrom.cpp
photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlersend.cpp
photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlervideoplayback.cpp
photosgallery/viewframework/commandhandlers/inc/glxcommandhandlers.hrh
photosgallery/viewframework/dataprovider/src/glxmuliconprovider.cpp
photosgallery/viewframework/dataprovider/src/glxmulmodelproviderbase.cpp
photosgallery/viewframework/dataprovider/src/glxthumbnailvarianttype.cpp
photosgallery/viewframework/inc/mglxhdmidecoderobserver.h
photosgallery/viewframework/medialists/inc/glxmedialist.h
photosgallery/viewframework/medialists/src/glxmedialist.cpp
photosgallery/viewframework/plugins/fullscreenviewplugin/group/glxfullscreenviewplugin.mmp
photosgallery/viewframework/plugins/fullscreenviewplugin/src/glxfullscreenviewpluginproxy.cpp
photosgallery/viewframework/plugins/gridviewplugin/data/glxgridviewdata.rss
photosgallery/viewframework/plugins/gridviewplugin/group/glxgridviewplugin.mmp
photosgallery/viewframework/plugins/gridviewplugin/src/glxgridviewpluginproxy.cpp
photosgallery/viewframework/plugins/gridviewpluginbase/src/glxgridviewpluginbase.cpp
photosgallery/viewframework/plugins/listviewplugin/group/glxlistviewplugin.mmp
photosgallery/viewframework/plugins/listviewplugin/src/glxlistviewpluginproxy.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/inc/glxprogressindicator.h
photosgallery/viewframework/uiutilities/src/glxprogressindicator.cpp
photosgallery/viewframework/uiutilities/src/glxuiutility.cpp
photosgallery/viewframework/views/fullscreenview/inc/glxfullscreenviewimp.h
photosgallery/viewframework/views/fullscreenview/src/glxfullscreenviewimp.cpp
photosgallery/viewframework/views/gridview/inc/glxgridviewcontainer.h
photosgallery/viewframework/views/gridview/inc/glxgridviewmlobserver.h
photosgallery/viewframework/views/gridview/src/glxgridviewcontainer.cpp
photosgallery/viewframework/views/gridview/src/glxgridviewimp.cpp
photosgallery/viewframework/views/gridview/src/glxgridviewmlobserver.cpp
photosgallery/viewframework/views/listview/inc/glxlistviewimp.h
photosgallery/viewframework/views/listview/inc/glxpreviewthumbnailbinding.h
photosgallery/viewframework/views/listview/src/glxlistviewimp.cpp
photosgallery/viewframework/views/listview/src/glxpreviewthumbnailbinding.cpp
photosgallery/viewframework/views/viewbase/src/glxmedialistviewbase.cpp
photosgallery/viewframework/views/viewbase/src/glxmskcontroller.cpp
photosgallery/viewframework/views/zoomview/inc/glxzoommathsengine.h
photosgallery/viewframework/views/zoomview/src/glxzoomeventhandler.cpp
photosgallery/viewframework/views/zoomview/src/glxzoommathsengine.cpp
--- a/photos_plat/collection_plugins_api/group/bld.inf	Tue May 25 12:42:31 2010 +0300
+++ b/photos_plat/collection_plugins_api/group/bld.inf	Wed Jun 09 09:41:51 2010 +0300
@@ -25,8 +25,6 @@
 ../inc/glxcollectionpluginall.hrh 	     		APP_LAYER_PLATFORM_EXPORT_PATH(glxcollectionpluginall.hrh)
 ../inc/glxcollectionpluginalbums.hrh 			APP_LAYER_PLATFORM_EXPORT_PATH(glxcollectionpluginalbums.hrh)
 ../inc/glxcollectionplugincamera.hrh 			APP_LAYER_PLATFORM_EXPORT_PATH(glxcollectionplugincamera.hrh)
-../inc/glxcollectionplugindownloads.hrh 	APP_LAYER_PLATFORM_EXPORT_PATH(glxcollectionplugindownloads.hrh)
-../inc/glxcollectionpluginmonths.hrh 			APP_LAYER_PLATFORM_EXPORT_PATH(glxcollectionpluginmonths.hrh)
 ../inc/glxcollectionplugintags.hrh	      APP_LAYER_PLATFORM_EXPORT_PATH(glxcollectionplugintags.hrh)
 ../inc/glxcollectionpluginimageviewer.hrh 	    APP_LAYER_PLATFORM_EXPORT_PATH(glxcollectionpluginimageviewer.hrh)
 
--- a/photos_plat/collection_plugins_api/inc/glxcollectionplugindownloads.hrh	Tue May 25 12:42:31 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-/*
-* 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:    Resource headers 
-*
-*/
-
-
-
-
-#ifndef GLXCOLLECTIONPLUGINDOWNLOADS_HRH
-#define GLXCOLLECTIONPLUGINDOWNLOADS_HRH
-
-// CONSTANTS
-
-#define KGlxCollectionPluginDownloadsDllUid        	 0x2000a76a
-#define KGlxCollectionPluginDownloadsImplementationUid  0x2000a76b
-
-#endif  // GLXCOLLECTIONPLUGINDOWNLOADS_HRH
-
-// End of File
--- a/photos_plat/collection_plugins_api/inc/glxcollectionpluginmonths.hrh	Tue May 25 12:42:31 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
-* 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:    Resource headers 
-*
-*/
-
-
-
-
-/**
- * @internal reviewed 14/06/2007 by Alex Birkett
- */
- 
-#ifndef GLXCOLLECTIONPLUGINMONTHS_HRH
-#define GLXCOLLECTIONPLUGINMONTHS_HRH
-
-// CONSTANTS
-
-#define KGlxCollectionPluginMonthsDllUid        	 0x2000a768
-#define KGlxCollectionPluginMonthsImplementationUid  0x2000a769
-
-#endif  // GLXCOLLECTIONPLUGINMONTHS_HRH
-
-// End of File
--- a/photos_plat/gallery_utilities_api/inc/glxcollectionpluginpriority.hrh	Tue May 25 12:42:31 2010 +0300
+++ b/photos_plat/gallery_utilities_api/inc/glxcollectionpluginpriority.hrh	Wed Jun 09 09:41:51 2010 +0300
@@ -27,7 +27,6 @@
     {
     // Bug Fix @ ESLM-7VWF28 :: Priority change inorder to display the " ALL " collection folder as the first collection folder in the Photos Matrix Menu
     EGlxCollectionPluginAll             = 1500,
-    EGlxCollectionPluginMonths          = 1300,
     EGlxCollectionPluginAlbums          = 1200,
     EGlxCollectionPluginTags            = 1100,
     EGlxCollectionPluginImageViewer     = 990,
--- a/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde/src/glxdatasourcetaskmde.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde/src/glxdatasourcetaskmde.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -27,7 +27,6 @@
 #include "glxdatasourcetaskmde.h"
 
 #include <glxcollectionpluginCamera.hrh>
-#include <glxcollectionpluginDownloads.hrh>
 #include <glxcollectionpluginMonths.hrh>
 #include <glxcollectionpluginalbums.hrh>
 #include <glxcollectionpluginall.hrh>
--- a/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde/src/glxdatasourcetaskmdeattribute.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde/src/glxdatasourcetaskmdeattribute.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -21,7 +21,6 @@
 #include "glxdatasourcetaskmdeattribute.h"
 
 #include <glxcollectionpluginCamera.hrh>
-#include <glxcollectionpluginDownloads.hrh>
 #include <glxcollectionpluginMonths.hrh>
 #include <glxcollectionpluginalbums.hrh>
 #include <glxcollectionpluginall.hrh>
@@ -381,12 +380,6 @@
                     objectDef = &DataSource()->TagDef();
                     break;
                     }
-                case KGlxCollectionPluginMonthsImplementationUid:
-                    {
-                    container = DataSource()->CameraAlbumId();
-                    objectDef = &DataSource()->AlbumDef();
-                    break;
-                    }
                 default:
                     {
                     // default gallery query returns all objects as per filter
--- a/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde/src/glxdatasourcetaskmdeidlist.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde/src/glxdatasourcetaskmdeidlist.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -25,7 +25,6 @@
 #include "glxdatasourcetaskmdeidlist.h"
 
 #include <glxcollectionpluginCamera.hrh>
-#include <glxcollectionpluginDownloads.hrh>
 #include <glxcollectionpluginMonths.hrh>
 #include <glxcollectionpluginalbums.hrh>
 #include <glxcollectionpluginall.hrh>
@@ -138,13 +137,6 @@
                 objectDef = &DataSource()->TagDef();
                 break;
                 }
-            case KGlxCollectionPluginMonthsImplementationUid:
-                {
-                container = DataSource()->CameraAlbumId();
-                objectDef = &DataSource()->AlbumDef();
-                resultMode = EQueryResultModeObjectWithoutFreetexts;
-                break;
-                }
             default:
                 {
                 // default gallery query returns all objects as per filter
@@ -166,13 +158,6 @@
                 objectDef = &DataSource()->TagDef();
                 break;
                 }
-            case KGlxCollectionPluginMonthsImplementationUid: 
-                {
-                AddMonthFilterL(container, iFilterProperties);
-                container = DataSource()->CameraAlbumId();
-                objectDef = &DataSource()->AlbumDef();
-                break;
-                }
             default:
                 {
                 User::Leave(KErrNotSupported);
--- a/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde/src/glxdatasourcetaskmdethumbnail.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde/src/glxdatasourcetaskmdethumbnail.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -22,7 +22,6 @@
 
 #include <caf/content.h>
 #include <glxcollectionpluginCamera.hrh>
-#include <glxcollectionpluginDownloads.hrh>
 #include <glxcollectionpluginMonths.hrh>
 #include <glxcollectionpluginalbums.hrh>
 #include <glxcollectionpluginall.hrh>
--- a/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcemds.h	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcemds.h	Wed Jun 09 09:41:51 2010 +0300
@@ -285,7 +285,6 @@
 
     static TInt CreateSession(TAny* aPtr);
 
-    void PrepareMonthsL();
     void TaskCompletedL();
 
     void TaskStartedL();
@@ -329,12 +328,6 @@
     inline CMdEObjectDef& MediaDef() const;
     inline CMdEObjectDef& TagDef() const;
     
-    /**
-     * Return object definition used to describe months.
-     * @return object definition used to describe months.
-     */
-    inline CMdEObjectDef& MonthDef() const;
-    
     inline CMdERelationDef& ContainsDef() const;
     
     inline CMdERelationDef& ContainsLocationDef() const;
@@ -351,10 +344,6 @@
     
     TItemType ItemType(CMdEObject* aObject);
  
-    const TGlxMediaId GetMonthIdL(const TTime& aMonth);
-
-    TBool SameMonth(const TTime& aOldDate, const TTime& aNewDate);
-     
 	TBool ContainerIsLeft(CMdEObjectDef& aObjectDef);    
 	
 	// from MGlxMDSShutdownObserver
@@ -389,7 +378,6 @@
     CMdEObjectDef* iAlbumDef;
     CMdEObjectDef* iMediaDef;
     CMdEObjectDef* iTagDef;
-    CMdEObjectDef* iMonthDef;
     /**
      * Location object definition.
      */
@@ -397,13 +385,8 @@
     CMdERelationDef* iContainsDef;
     CMdERelationDef* iContainsLocationDef;
     
-    RArray<TTime> iMonthArray;
-    RArray<TGlxMediaId> iMonthList;
     RArray<TItemId> iAddedItems;
     
-    TTime iFirstMonth;
-    TTime iLastMonth;
-    
     CAsyncCallBack* iUpdateCallback;
     
     CAsyncCallBack* iCreateSessionCallback;
--- a/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcemds.inl	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcemds.inl	Wed Jun 09 09:41:51 2010 +0300
@@ -146,15 +146,6 @@
     }
 
 // ----------------------------------------------------------------------------
-//  CGlxDataSourceMde::MonthDef
-// ----------------------------------------------------------------------------
-//  
-CMdEObjectDef& CGlxDataSourceMde::MonthDef() const
-    {
-    return *iMonthDef;
-    }
-
-// ----------------------------------------------------------------------------
 //  CGlxDataSourceMde::ContainsDef
 // ----------------------------------------------------------------------------
 //    
--- a/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcetaskmds.h	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcetaskmds.h	Wed Jun 09 09:41:51 2010 +0300
@@ -143,12 +143,7 @@
      * @return a pointer to the CGlxDataSourceMde object passed in on instantiation.
      */
     CGlxDataSourceMde* DataSource();
-
-    void AddMonthFilterL(const TGlxMediaId& aContainerId, 
-            TGlxFilterProperties& aFilterProperties);
     
-    void AddMonthFilterL(CMdEObject* aMonth, TGlxFilterProperties& aFilterProperties);
-        
 	/**
 	 * Set query contditions by container id and filter properties.
      * @param aLogicCondition logic condition to add conditions to
@@ -206,13 +201,6 @@
     void QueueAlbumObjectQueryL(const RArray<TGlxMediaId>& aObjectIds);
     
     /**
-     * Adds a query for "month" objects that have ids specified by aObjectIds
-     * to the query queue.
-     * @param aObjectIds A list of the ids of the required objects.
-     */
-    void QueueMonthObjectQueryL(const RArray<TGlxMediaId>& aObjectIds);
-    
-    /**
      * Adds a query for objects of type specified by aObjectDef
      * that have ids specified by aObjectIds to the query queue.
      * @param aObjectDef type of objects required.
--- a/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcetaskmdsidlist.h	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/inc/glxdatasourcetaskmdsidlist.h	Wed Jun 09 09:41:51 2010 +0300
@@ -121,9 +121,6 @@
 private:
 	void DoHandleListQueryCompletedL();
 		
-    void DoMonthListCreationL(CMdEQuery& aQuery, const TGlxFilterProperties& 
-            aFilterProperties);
-        
     void DoPostFilterComplete(const RArray<TGlxMediaId>& aIdArray, TInt aErrorCode);	
     
     void PostFilterL(const RArray<TGlxMediaId>& aFilteredList,
--- a/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcemds.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcemds.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -65,15 +65,9 @@
 _LIT(KObjectDefNameObject, "Object");
 _LIT(KObjectDefNameTag, "Tag");
 _LIT(KObjectDefNameVideo, "Video");
-_LIT(KPropertyDefNameCreationDate, "CreationDate");
-_LIT(KPropertyDefNameLastModifiedDate, "LastModifiedDate");
-_LIT(KPropertyDefNameSize, "Size");
-_LIT(KPropertyDefNameTitle, "Title");
 _LIT(KRelationDefNameContains, "Contains");
 _LIT(KRelationDefNameContainsLocation, "ContainsLocation");
 
-_LIT(KObjectDefNameMonth, "MediaObject");/// @todo nasty hack remove and use base object
-
 _LIT(KGlxMdeCameraAlbumUri, "defaultalbum_captured");
 _LIT(KGlxMdeFavoritesUri, "defaultalbum_favourites");
 
@@ -254,8 +248,6 @@
     iFs.Close();
     iHC.Close();
     RFbsSession::Disconnect();
-    iMonthArray.Close();
-    iMonthList.Close();
     iUpdateData.Close();
     iAddedItems.Reset();
     iAddedItems.Close();
@@ -326,14 +318,16 @@
         HandleSessionError(aSession, aError);
         }
     TRAPD(err, DoSessionInitL());
-    if( KErrNone != err )
+    if (KErrNone == err)
+        {
+        iSessionOpen = ETrue;
+        iDataSourceReady = ETrue;
+        TryStartTask(ETrue);
+        }
+    else
         {
         HandleSessionError(aSession, err);
         }
-    
-    iSessionOpen = ETrue;
-    iDataSourceReady = ETrue;
-	TryStartTask(ETrue);
     }
     
 // ----------------------------------------------------------------------------
@@ -499,12 +493,9 @@
     iMediaDef = &iNameSpaceDef->GetObjectDefL(KObjectDefNameMedia);
     iAlbumDef = &iNameSpaceDef->GetObjectDefL(KObjectDefNameAlbum);
     iTagDef = &iNameSpaceDef->GetObjectDefL(KObjectDefNameTag);
-    iMonthDef = &iNameSpaceDef->GetObjectDefL(KObjectDefNameMonth);
     iLocationDef = &iNameSpaceDef->GetObjectDefL(KObjectDefLocation);
 	
 	AddMdEObserversL();
-	
-	PrepareMonthsL();
 	}
 
 // ---------------------------------------------------------------------------
@@ -855,10 +846,6 @@
 		{
 		containerType = EContainerTypeTag;
 		}
-	else if( 0 == aObject->Def().Compare(*iMonthDef) )
-	    {
-		containerType = EContainerTypeMonth;
-	    }
 
 	return containerType;
 	}
@@ -882,10 +869,6 @@
 		{
 		containerType = EContainerTypeTag;
 		}
-	else if( 0 == aObjectDef->Compare(*iMonthDef) )
-	    {
-		containerType = EContainerTypeMonth;
-	    }
 
 	return containerType;
 	}
@@ -909,113 +892,7 @@
 		}
 	
 	return itemType;
-	}
-	
-// ---------------------------------------------------------------------------
-// PrepareMonthsL()
-// ---------------------------------------------------------------------------
-//
-void CGlxDataSourceMde::PrepareMonthsL()
-    {
-    TRACER("CGlxDataSourceMde::PrepareMonthsL()");
-    TTime month(0);
-    iFirstMonth = month;
-    }
-    
-// ---------------------------------------------------------------------------
-// GetMonthIdL()
-// ---------------------------------------------------------------------------
-//
-const TGlxMediaId CGlxDataSourceMde::GetMonthIdL(const TTime& aMonth)
-    {
-    TRACER("CGlxDataSourceMde::GetMonthIdL()");
-    TTime monthStart = iFirstMonth + aMonth.MonthsFrom(iFirstMonth);
-    const TTimeIntervalMonths KGlxOneMonth = 1;
-    const TTimeIntervalMicroSeconds KGlxOneMicrosecond = 1;
-
-    TGlxMediaId monthId;    
-    TInt monthIndex = iMonthArray.Find(monthStart);
-    if( monthIndex != KErrNotFound )
-        {
-        monthId = iMonthList[monthIndex];
-        }
-    else
-        {
-        _LIT(KGlxMonthTitleFormat, "%F%Y%M%D:");
-        const TInt KGlxMonthTitleLength = 12;
-        TBuf<KGlxMonthTitleLength> title;
-        monthStart.FormatL(title, KGlxMonthTitleFormat);
-        
-        CMdEObject* month = iSession->GetObjectL(title);
-        if( month )
-            {
-            monthId = (TGlxMediaId)month->Id();
-            iMonthArray.AppendL(monthStart);
-            iMonthList.AppendL(monthId);
-            delete month;
-            }
-        else
-            {
-            TTime monthEnd = monthStart + KGlxOneMonth - KGlxOneMicrosecond;
-            month = iSession->NewObjectLC(*iMonthDef, title); 
-            
-            // A title property def of type text is required.
-            CMdEPropertyDef& titlePropertyDef = iObjectDef->GetPropertyDefL(
-                    KPropertyDefNameTitle);
-            if (titlePropertyDef.PropertyType() != EPropertyText)
-            	{
-            	User::Leave(KErrCorrupt);
-            	}
-            // Set the object title.
-            month->AddTextPropertyL (titlePropertyDef, title);
-
-            // A size property is required.
-            CMdEPropertyDef& sizePropertyDef = iObjectDef->GetPropertyDefL(
-                    KPropertyDefNameSize);
-            if (sizePropertyDef.PropertyType() != EPropertyUint32)
-            	{
-            	User::Leave(KErrCorrupt);
-            	}
-            month->AddUint32PropertyL(sizePropertyDef,0);
-
-            
-            // A creation date property is required.
-        	CMdEPropertyDef& creationDateDef = iObjectDef->GetPropertyDefL(
-        	        KPropertyDefNameCreationDate);
-            if (creationDateDef.PropertyType() != EPropertyTime)
-            	{
-            	User::Leave(KErrCorrupt);
-            	}
-        	month->AddTimePropertyL(creationDateDef, monthStart);
-
-            // A last modified date property is required.
-        	CMdEPropertyDef& lmDateDef = iObjectDef->GetPropertyDefL(
-        	        KPropertyDefNameLastModifiedDate);
-            if (lmDateDef.PropertyType() != EPropertyTime)
-            	{
-            	User::Leave(KErrCorrupt);
-            	}
-            
-        	month->AddTimePropertyL(lmDateDef, monthEnd);
-        	
-            monthId = (TGlxMediaId)iSession->AddObjectL(*month);
-            CleanupStack::PopAndDestroy(month);
-            iMonthArray.AppendL(monthStart);
-            iMonthList.AppendL(monthId);
-            }
-        }
-    return monthId;
-    }
-    
-// ---------------------------------------------------------------------------
-// SameMonth
-// ---------------------------------------------------------------------------
-//
-TBool CGlxDataSourceMde::SameMonth(const TTime& aOldDate, const TTime& aNewDate)
-    {
-    TRACER("CGlxDataSourceMde::SameMonth(const TTime& aOldDate, const TTime& aNewDate)")
-    return ( aOldDate.MonthsFrom(iFirstMonth) == aNewDate.MonthsFrom(iFirstMonth) );
-    }
+	} 
 
 // ---------------------------------------------------------------------------
 // ContainerIsLeft
--- a/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmds.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmds.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -26,8 +26,6 @@
 #include "glxdatasourcetaskmds.h"
 
 #include <glxcollectionplugincamera.hrh>
-#include <glxcollectionplugindownloads.hrh>
-#include <glxcollectionpluginmonths.hrh>
 #include <glxcollectionpluginalbums.hrh>
 #include <glxcollectionpluginall.hrh>
 #include <glxcollectionplugintags.hrh>
@@ -180,66 +178,6 @@
     }
 
 // ----------------------------------------------------------------------------
-//  CGlxDataSourceTaskMde::AddMonthFilterL
-// ----------------------------------------------------------------------------
-//     
-void CGlxDataSourceTaskMde::AddMonthFilterL(const TGlxMediaId& aContainerId,
-        TGlxFilterProperties& aFilterProperties)
-    {
-    TRACER("CGlxDataSourceTaskMde::AddMonthFilterL(const TGlxMediaId& aContainerId, TGlxFilterProperties& aFilterProperties)");
-    CMdEObject* month = DataSource()->Session().GetObjectL(aContainerId.Value());
-    if( !month )
-        {
-        User::Leave(KErrNotFound);
-        }
-    CleanupStack::PushL(month);
-    
-    AddMonthFilterL(month, aFilterProperties);
-        
-    CleanupStack::PopAndDestroy(month);
-    }
-
-
-// ----------------------------------------------------------------------------
-//  CGlxDataSourceTaskMde::AddMonthFilterL
-// ----------------------------------------------------------------------------
-//   
-void CGlxDataSourceTaskMde::AddMonthFilterL(CMdEObject* aMonth, TGlxFilterProperties& 
-        aFilterProperties)
-    {
-    TRACER("CGlxDataSourceTaskMde::AddMonthFilterL(CMdEObject* aMonth, TGlxFilterProperties& aFilterProperties)");
-    CMdEPropertyDef& creationDateDef = DataSource()->ObjectDef().GetPropertyDefL(
-            KPropertyDefNameCreationDate);
-    if (creationDateDef.PropertyType() != EPropertyTime)
-        {
-        User::Leave(KErrCorrupt);
-        }
-
-    CMdEPropertyDef& lmDateDef = DataSource()->ObjectDef().GetPropertyDefL(
-            KPropertyDefNameLastModifiedDate);
-    if (lmDateDef.PropertyType() != EPropertyTime)
-        {
-        User::Leave(KErrCorrupt);
-        }
-        
-    CMdEProperty* startDate;
-    TInt startDateIndex = aMonth->Property(creationDateDef, startDate);
-    if( KErrNotFound == startDateIndex) 
-        {
-        User::Leave(KErrCorrupt);
-        }
-    aFilterProperties.iStartDate = static_cast<CMdETimeProperty*>(startDate)->Value();
-     
-    CMdEProperty* endDate;
-    TInt endDateIndex = aMonth->Property(lmDateDef, endDate);
-    if( KErrNotFound == endDateIndex) 
-        {
-        User::Leave(KErrCorrupt);
-        }
-    aFilterProperties.iEndDate = static_cast<CMdETimeProperty*>(endDate)->Value();
-    }
-
-// ----------------------------------------------------------------------------
 //  CGlxDataSourceTaskMde::SetQueryConditionsL
 // ----------------------------------------------------------------------------
 //    
@@ -354,8 +292,7 @@
 			}
 		else if(EGlxFilterOriginAll == aFilterProperties.iOrigin )            
 			{
-			// The Months Collection Populates All the Items, filter 
-		    // it for Images and Videos only
+			// Filter for all Images and Videos
             CMdELogicCondition& logicCondition = 
                 aLogicCondition.AddLogicConditionL(ELogicConditionOperatorOr);
             logicCondition.AddObjectConditionL( DataSource()->ImageDef() ); 
@@ -604,13 +541,6 @@
     QueueObjectQueryL(DataSource()->AlbumDef(), aObjectIds, EImageVideoQuery);
     }
 
-
-void CGlxDataSourceTaskMde::QueueMonthObjectQueryL(const RArray<TGlxMediaId>& aObjectIds)
-    {
-    TRACER("CGlxDataSourceTaskMde::QueueMonthObjectQueryL()");
-    QueueObjectQueryL(DataSource()->MonthDef(), aObjectIds, EImageVideoQuery);
-    }
-
 // ----------------------------------------------------------------------------
 // CGlxDataSourceTask::QueueObjectQueryL
 // ----------------------------------------------------------------------------
--- a/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdsattribute.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdsattribute.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -18,10 +18,7 @@
 
 
 #include "glxdatasourcetaskmdsattribute.h"
-
 #include <glxcollectionplugincamera.hrh>
-#include <glxcollectionplugindownloads.hrh>
-#include <glxcollectionpluginmonths.hrh>
 #include <glxcollectionpluginalbums.hrh>
 #include <glxcollectionpluginall.hrh>
 #include <glxcollectionplugintags.hrh>
@@ -156,13 +153,7 @@
                 QueueTagObjectQueryL(request->MediaIds());
                 break;
                 }
-            case EGlxFilterMonth:
-                {
-                QueueMonthObjectQueryL(request->MediaIds());
-                break;
-                }
             }
-        
     	}
 
     DoNextQueryL();
@@ -385,11 +376,6 @@
                     objectDef = &DataSource()->TagDef();
                     break;
                     }
-                case KGlxCollectionPluginMonthsImplementationUid:
-                    {
-					filterProperties.iOrigin = EGlxFilterOriginAll;
-                    break;
-                    }
                 default:
                     {
                     // default gallery query returns all objects as per filter
@@ -491,10 +477,6 @@
                 {
                 aEntry->SetTObjectValueL(KMPXMediaGeneralCategory, EMPXTag);
                 }
-            else if( CGlxDataSource::EContainerTypeMonth == aType)
-                {
-                aEntry->SetTObjectValueL(KMPXMediaGeneralCategory, EMPXMonth);
-                }
             else
                 {
                 User::Leave(KErrNotSupported);
@@ -545,22 +527,8 @@
                     {
                     break;
                     }
-                case CGlxDataSource::EContainerTypeMonth:
-                    {
-                    request->AppendCpiAttributeL(KMPXMediaGeneralTitle);
-                    CMdEProperty* time;
-                    CMdEPropertyDef& timeProperty = aContainer->Def().GetPropertyDefL(
-                            KPropertyDefNameCreationDate);
-                    TInt timeIndex = aContainer->Property(timeProperty, time);
-                    if( KErrNotFound == timeIndex )
-                        {
-                        User::Leave(KErrCorrupt);
-                        }
-
-                    aEntry->SetTObjectValueL(KGlxMediaCollectionInternalStartDate, 
-                            static_cast<CMdETimeProperty*>(time)->Value());
+                default:
                     break;
-                    }
                 }
             }
         else if ( request->Attributes()[i] == KMPXMediaGeneralDate )
@@ -627,16 +595,6 @@
                     aEntry->SetTObjectValueL(request->Attributes()[i], countTypeIndex);
                     break;
                     }
-                case CGlxDataSource::EContainerTypeMonth:
-                    {
-                    iFilterProperties.iOrigin = EGlxFilterOriginAll;                    
-                    TGlxFilterProperties filterProperties = iFilterProperties;
-                    AddMonthFilterL(aContainer, filterProperties);
-                    QueueObjectQueryL(DataSource()->AlbumDef(), ETrue, EAttributeQuery,
-                            EQueryResultModeCount, TGlxMediaId(KGlxCollectionRootId),
-                            request->Attributes()[i], aEntry, filterProperties);
-                    break;
-                    }
                 }
             }
         else if ( request->Attributes()[i] == KGlxMediaGeneralSystemItem )
@@ -668,63 +626,9 @@
                     systemItem = EFalse;
                     break;
                     }
-                case CGlxDataSource::EContainerTypeMonth:
-                    {
-                    systemItem = ETrue;
-                    break;
-                    }
                 }
             aEntry->SetTObjectValueL(KGlxMediaGeneralSystemItem, systemItem);
             }
-            
-         //Attributes to get the Count of Images in Container                
-        else if	( request->Attributes()[i] == KGlxMediaItemTypeImage )    
-			{
-			switch (aType)
-				{
-				case CGlxDataSource::EContainerTypeMonth:
-					{
-					TGlxFilterProperties filterProperties = iFilterProperties;
-					AddMonthFilterL(aContainer, filterProperties);
-					filterProperties.iItemType = EGlxFilterImage;
-#if 0 	/// AB camera album					
-					QueueObjectQueryL(DataSource()->AlbumDef(), ETrue, EAttributeQuery,
-					        EQueryResultModeCount, DataSource()->CameraAlbumId(), 
-					        request->Attributes()[i], aEntry, filterProperties);
-#endif					
-					break;
-					}			             					
-				default:
-					{
-					break;	
-					}
-				}
-			}           	
-		// Attributes to get the Count of Videos in Container 		
-						                   	
-         else if ( request->Attributes()[i] == KGlxMediaItemTypeVideo )    
-			{
-			switch (aType)
-				{
-				case CGlxDataSource::EContainerTypeMonth:
-					{
-					TGlxFilterProperties filterProperties = iFilterProperties;
-					AddMonthFilterL(aContainer, filterProperties);
-					filterProperties.iItemType = EGlxFilterVideo;
-#if 0 	/// AB camera album					
-					QueueObjectQueryL(DataSource()->AlbumDef(), ETrue, EAttributeQuery,
-					        EQueryResultModeCount, DataSource()->CameraAlbumId(),
-					        request->Attributes()[i], aEntry, filterProperties);
-#endif					
-					break;
-					}
-				default:
-					{
-					break;	
-					}
-				}
-			}
-			
         else if ( request->Attributes()[i] == KMPXMediaColDetailSpaceId )
             {
             aEntry->SetTObjectValueL(KMPXMediaColDetailSpaceId, 
@@ -768,15 +672,6 @@
                             request->Attributes()[i], aEntry, filterProperties);
                     break;
                     }
-                case CGlxDataSource::EContainerTypeMonth:
-                    {
-                    filterProperties.iOrigin = EGlxFilterOriginAll;               
-                    AddMonthFilterL(aContainer, filterProperties);
-                    QueueObjectQueryL(DataSource()->AlbumDef(), ETrue, EAttributeQuery,
-                            EQueryResultModeCount, TGlxMediaId(KGlxCollectionRootId),
-                            request->Attributes()[i], aEntry, filterProperties);
-                    break;
-                    }
                 }
             }
         else if ( request->Attributes()[i] == KGlxMediaGeneralLastModifiedDate )
--- a/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdscommand.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdscommand.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -1028,7 +1028,7 @@
             objectsForRemoval.AppendL(object.Id());
             }
 			 
-        // After every 50 items are deleted, break from the for loop 
+        // After every 10 items are deleted, break from the for loop 
         // and process other pending requests if any
         if(deleteItemCounter == KDeletedItemCount)
 			{	
@@ -1036,6 +1036,13 @@
 							TCallBack( &SchedulerStopCallback, (TAny *)this ) );	
 			iSchedulerWait->Start();  
 			deleteItemCounter = 0;
+			if(objectsForRemoval.Count()>0)
+				{
+				// Inform the MdS for media items Delete Updation in batches of 10
+				DataSource()->Session().RemoveObjectsL(objectsForRemoval,
+						sucessfullyRemovedObjects);
+				objectsForRemoval.Reset();
+				}
 			}     
         deleteItemCounter++;     
         }
@@ -1044,7 +1051,7 @@
     
     User::LeaveIfError(lastErr);
     
-    if (queryCount)
+    if (queryCount && objectsForRemoval.Count()>0)
     	{
     	// Some objects may have already been removed by the harvester
     	DataSource()->Session().RemoveObjectsL(objectsForRemoval, sucessfullyRemovedObjects);
--- a/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdsidlist.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdsidlist.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -25,8 +25,6 @@
 #include "glxdatasourcetaskmdsidlist.h"
 
 #include <glxcollectionplugincamera.hrh>
-#include <glxcollectionplugindownloads.hrh>
-#include <glxcollectionpluginmonths.hrh>
 #include <glxcollectionpluginalbums.hrh>
 #include <glxcollectionpluginall.hrh>
 #include <glxcollectionplugintags.hrh>
@@ -72,7 +70,6 @@
 const TInt KGlxCameraAlbumPromotionPosition = 0;
 const TInt KGlxfavoritesAlbumPromotionPosition = 1;
 
-_LIT(KPropertyDefNameCreationDate, "CreationDate");
 
 // ----------------------------------------------------------------------------
 //  Constructor
@@ -146,13 +143,6 @@
                 objectDef = &DataSource()->TagDef();
                 break;
                 }
-            case KGlxCollectionPluginMonthsImplementationUid:
-                {
-                iFilterProperties.iOrigin = EGlxFilterOriginAll;          
-                container = TGlxMediaId(KGlxCollectionRootId);
-                resultMode = EQueryResultModeItem;
-                break;
-                }
             case KGlxCollectionPluginImageViewerImplementationUid:
                 {
                 RArray<TGlxMediaId> list;
@@ -183,13 +173,6 @@
                 objectDef = &DataSource()->TagDef();
                 break;
                 }
-            case KGlxCollectionPluginMonthsImplementationUid: 
-                {
-				iFilterProperties.iOrigin = EGlxFilterOriginAll;
-                AddMonthFilterL(container, iFilterProperties);
-                container = TGlxMediaId(KGlxCollectionRootId);
-                break;
-                }
             default:
                 {
                 User::Leave(KErrNotSupported);
@@ -224,66 +207,15 @@
 void CGlxDataSourceTaskMdeIdList::DoHandleListQueryCompletedL()
     {
     TRACER("CGlxDataSourceTaskMdeIdList::DoHandleListQueryCompletedL()")
-    if(iQueries[0]->ResultMode() == EQueryResultModeItem)
-        {
-        DoMonthListCreationL(*iQueries[0], iFilterProperties);
-        }
-    else // only id or item supported
-        {
-
-        RArray<TGlxMediaId> localList;
-        CleanupClosePushL(localList);
-        NGlxDataSourceMdsUtility::CopyItemIdArrayL(localList,iQueries[0]->ResultIds());
-        PostFilterL(localList, iFilterProperties);
-        CleanupStack::PopAndDestroy(&localList);
-        }
+    RArray<TGlxMediaId> localList;
+    CleanupClosePushL(localList);
+    NGlxDataSourceMdsUtility::CopyItemIdArrayL(localList,
+            iQueries[0]->ResultIds());
+    PostFilterL(localList, iFilterProperties);
+    CleanupStack::PopAndDestroy(&localList);
     }     
 
 // ----------------------------------------------------------------------------
-// CGlxDataSourceTaskMdeIdList::DoMonthListCreationL
-// ----------------------------------------------------------------------------
-//      
-void CGlxDataSourceTaskMdeIdList::DoMonthListCreationL(CMdEQuery& aQuery,
-                                  const TGlxFilterProperties& aFilterProperties)
-    {
-    TRACER("CGlxDataSourceTaskMdeIdList::DoMonthListCreationL()")
-    CMdEProperty* time;
-    CMdEPropertyDef& creationDateDef = DataSource()->ObjectDef().GetPropertyDefL(KPropertyDefNameCreationDate);
-    if (creationDateDef.PropertyType() != EPropertyTime)
-        {
-        User::Leave(KErrCorrupt);
-        }
-    RArray<TGlxMediaId> monthList;
-    CleanupClosePushL(monthList);
-    TTime lastMonth;
-    TTime currentMonth;
-    TInt count = aQuery.Count();
-    GLX_DEBUG2("CGlxDataSourceTaskMdeIdList::DoMonthListCreationL count=%d", count);    
-    for( TInt i = 0 ; i < count ; i++ )
-        {
-        CMdEObject& object = (CMdEObject&)aQuery.ResultItem(i);
-        TInt timeIndex = object.Property(creationDateDef, time);
-        if( KErrNotFound == timeIndex )
-            {
-            User::Leave(KErrCorrupt);
-            }
-        currentMonth = static_cast<CMdETimeProperty*>(time)->Value();
-
-        // Also Checking for a Valid Month Entry Based on a Year Greater than 0000.
-        if( !DataSource()->SameMonth(lastMonth, currentMonth) && (currentMonth.DateTime().Year() > 0) )
-            {
-            const TGlxMediaId monthId = DataSource()->GetMonthIdL(currentMonth);
-            monthList.AppendL(monthId);
-            GLX_DEBUG2("CGlxDataSourceTaskMdeIdList::DoMonthListCreationL monthId=%d", monthId.Value());    
-            lastMonth = currentMonth;
-            }
-        }
-    GLX_DEBUG2("CGlxDataSourceTaskMdeIdList::DoMonthListCreationL monthList.Count=%d", monthList.Count());    
-    PostFilterL(monthList, aFilterProperties);
-    CleanupStack::PopAndDestroy(&monthList);
-    }
-
-// ----------------------------------------------------------------------------
 //  CGlxDataSourceTaskMdeIdList::DoPostFilterComplete
 // ----------------------------------------------------------------------------
 //
@@ -344,7 +276,7 @@
 		DoPostFilterComplete(list, KErrNone);
 		}
 	else
-            {
-            DoPostFilterComplete(aFilteredList, KErrNone);
-            }
+        {
+        DoPostFilterComplete(aFilteredList, KErrNone);
+        }
     }
--- a/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdsthumbnail.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/collectionframework/datasource/plugins/glxdatasourcemde2.5/src/glxdatasourcetaskmdsthumbnail.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -22,8 +22,6 @@
 
 #include <caf/content.h>
 #include <glxcollectionplugincamera.hrh>
-#include <glxcollectionplugindownloads.hrh>
-#include <glxcollectionpluginmonths.hrh>
 #include <glxcollectionpluginalbums.hrh>
 #include <glxcollectionpluginall.hrh>
 #include <glxcollectionplugintags.hrh>
@@ -384,14 +382,6 @@
         iFilterProperties.iSortDirection = EGlxFilterSortDirectionOverrideToDescendingIfDate;
         iFilterProperties.iLastCaptureDate = ETrue;
 
-        if( CGlxDataSource::EContainerTypeMonth == containerType )
-            {
-            iFilterProperties.iOrigin = EGlxFilterOriginAll;
-            AddMonthFilterL(item, iFilterProperties);
-            container = TGlxMediaId(KGlxCollectionRootId);
-            objectDef = &DataSource()->ObjectDef();
-            }
-            
         DoQueryL(*objectDef, ETrue, EContainerFirstItemQuery,  
                 EQueryResultModeItem, container);        
         }
@@ -594,14 +584,6 @@
         iFilterProperties.iSortOrder = EGlxFilterSortOrderCaptureDate;
         iFilterProperties.iSortDirection = EGlxFilterSortDirectionOverrideToDescendingIfDate;
         iFilterProperties.iLastCaptureDate = ETrue;
-
-        if( CGlxDataSource::EContainerTypeMonth == containerType )
-            {
-            iFilterProperties.iOrigin = EGlxFilterOriginAll;
-            AddMonthFilterL(item, iFilterProperties);
-            container = TGlxMediaId(KGlxCollectionRootId);
-            objectDef = &DataSource()->ObjectDef();
-            }
             
         DoQueryL(*objectDef, ETrue, EContainerFirstItemQuery, 
                 EQueryResultModeItem, container);        
--- a/photosgallery/collectionframework/group/bld.inf	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/collectionframework/group/bld.inf	Wed Jun 09 09:41:51 2010 +0300
@@ -75,7 +75,6 @@
 ../datasource/manager/group/glxdatasourcemanager.mmp
 ../plugins/glxcollectionpluginall/group/glxcollectionpluginall.mmp
 //../plugins/glxcollectionplugincamera/group/glxcollectionplugincamera.mmp
-../plugins/glxcollectionpluginmonths/group/glxcollectionpluginmonths.mmp
 ../plugins/glxcollectionpluginalbums/group/glxcollectionpluginalbums.mmp
 ../plugins/glxcollectionpluginimageviewer/group/glxcollectionpluginimageviewer.mmp
 
--- a/photosgallery/collectionframework/plugins/glxcollectionpluginalbums/src/glxcollectionpluginalbums.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/collectionframework/plugins/glxcollectionpluginalbums/src/glxcollectionpluginalbums.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -222,6 +222,10 @@
                 	// Set the title in the response.
             		aResponse->SetTextValueL(attr, *tempTitle);  
             		CleanupStack::PopAndDestroy(tempTitle);
+					
+            		// Set the count in the response.
+            		aResponse->SetTObjectValueL(KMPXMediaGeneralCount, usageCount); 
+					
             		continue;                	
             		}            	
             	else if (1 == usageCount)
@@ -229,6 +233,10 @@
                 	tempTitle = LoadLocalizedStringLC(KResourceFile, R_ALBUM_ITEM_SUB_TITLE_SINGLE);
                     aResponse->SetTextValueL(attr, *tempTitle);  
                     CleanupStack::PopAndDestroy(tempTitle);
+					
+            		// Set the count in the response.
+            		aResponse->SetTObjectValueL(KMPXMediaGeneralCount, usageCount);    
+
                     continue;                   
                 	}
                 else
@@ -247,6 +255,9 @@
             // Set the title in the response.
             aResponse->SetTextValueL(attr, *title);    
 
+            // Set the count in the response.
+            aResponse->SetTObjectValueL(KMPXMediaGeneralCount, usageCount);    
+
             CleanupStack::PopAndDestroy(title);
             CleanupStack::PopAndDestroy(tempTitle);
             }
--- a/photosgallery/collectionframework/plugins/glxcollectionplugindownloads/data/2000a76A.rss	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/collectionframework/plugins/glxcollectionplugindownloads/data/2000a76A.rss	Wed Jun 09 09:41:51 2010 +0300
@@ -19,7 +19,6 @@
 
 
 #include <ecom/registryinfo.rh>
-#include "glxcollectionplugindownloads.hrh"
 #include <photos.loc>
 #include <glxcollectionplugintype.hrh>
 #include <glxcollectionpluginpriority.hrh>
--- a/photosgallery/collectionframework/plugins/glxcollectionplugindownloads/src/glxcollectionplugindownloadsproxy.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/collectionframework/plugins/glxcollectionplugindownloads/src/glxcollectionplugindownloadsproxy.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -20,7 +20,6 @@
 
 #include <ecom/implementationproxy.h>
 #include "glxcollectionplugindownloads.h"
-#include "glxcollectionplugindownloads.hrh"
 
 #if (!defined IMPLEMENTATION_PROXY_ENTRY)
 typedef TAny* TProxyNewLPtr;
--- a/photosgallery/collectionframework/plugins/glxcollectionpluginmonths/src/glxcollectionpluginmonths.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/collectionframework/plugins/glxcollectionpluginmonths/src/glxcollectionpluginmonths.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -537,6 +537,10 @@
                 	// Set the title in the response.
             		aResponse->SetTextValueL(attr, *tempTitle);
             		CleanupStack::PopAndDestroy(tempTitle);
+					
+            		// Set the count in the response.
+            		aResponse->SetTObjectValueL(KMPXMediaGeneralCount, usageCount);    
+
             		continue;
             		}
 
@@ -547,6 +551,10 @@
 
                     aResponse->SetTextValueL(attr, *tempTitle);
                     CleanupStack::PopAndDestroy(tempTitle);
+					
+            		// Set the count in the response.
+            		aResponse->SetTObjectValueL(KMPXMediaGeneralCount, usageCount);    
+					
                     continue;
                     }
                 else
@@ -565,6 +573,9 @@
                 // Set the title in the response.
                 aResponse->SetTextValueL(attr, *title);    
 
+                // Set the count in the response.
+                aResponse->SetTObjectValueL(KMPXMediaGeneralCount, usageCount);    
+
                 CleanupStack::PopAndDestroy(title);
                 CleanupStack::PopAndDestroy(tempTitle);	
 #endif                			
--- a/photosgallery/commonui/src/glxnavigationalstate.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/commonui/src/glxnavigationalstate.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -207,12 +207,14 @@
     */
     inline void ActivatePreviousViewL()
         {
-        iViewingMode = NGlxNavigationalState::EBrowse;
-        //go back one view
-        if ( iViewUtility->ViewHistoryDepth() > 1 )
+        if (!iIsNavigating)
             {
-            iViewUtility->ActivatePreviousViewL();
-            
+            iViewingMode = NGlxNavigationalState::EBrowse;
+            //go back one view
+            if (iViewUtility->ViewHistoryDepth() > 1)
+                {
+                iViewUtility->ActivatePreviousViewL();
+                }
             }
         }
      
--- a/photosgallery/controllers/imageviewer/src/glximageviewermanager.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/controllers/imageviewer/src/glximageviewermanager.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -23,14 +23,14 @@
 
 #include <f32file.h>
 #include <caf/manager.h>
+#include <caf/content.h>
 #include <driveinfo.h>
 #include <coeutils.h>
 
 _LIT( KPrivateFolder, "\\Private\\" );
-_LIT( KGifFileExt, ".gif" );
-_LIT( KMbmFileExt, ".mbm");
-_LIT( KTempGifFilePath, "?:\\data\\images\\200104E7.gif" );
-_LIT( KTempMbmFilePath, "?:\\data\\images\\200104E7.mbm" );
+_LIT( KGifFileMime, "image/gif" );
+_LIT( KMbmFileExt, "image/x-epoc-mbm");
+_LIT( KTempFilePath, "?:\\data\\images\\" );
     
 EXPORT_C CGlxImageViewerManager* CGlxImageViewerManager::InstanceL()
     {
@@ -120,8 +120,7 @@
         {
         User::Leave(KErrNotSupported);    
         }
-   	
-    iImageUri = aFileName.AllocL();    
+    iImageUri = aFileName.AllocL();  
     }
 
 // ---------------------------------------------------------------------------
@@ -176,19 +175,23 @@
         iFile = new (ELeave) RFile64;
         User::LeaveIfError(iFile->Duplicate(aFileHandle));
         iIsPrivate = ETrue;
+
+        // Better to use contentaccess as we need to deal with DRM files
+        TBuf<KMaxName> mimeBuf;
+        ContentAccess::CContent* content = ContentAccess::CContent::NewLC(
+                *iFile);
+        TInt err(content->GetStringAttribute(ContentAccess::EMimeType,
+                mimeBuf));
+        CleanupStack::PopAndDestroy(content);
+
         // Gif / MBM file from private path, hence make a local copy.
-        if (parse.Ext().Compare(KGifFileExt) == 0 || parse.Ext().Compare(
-                KMbmFileExt) == 0)
+        if (mimeBuf.Compare(KGifFileMime) == 0
+                || mimeBuf.Compare(KMbmFileExt) == 0)
             {
             TFileName ramFilePath;
-            if (parse.Ext().Compare(KGifFileExt) == 0)
-                {
-                ramFilePath.Copy(KTempGifFilePath);
-                }
-            else
-                {
-                ramFilePath.Copy(KTempMbmFilePath);
-                }
+            ramFilePath.Copy(KTempFilePath);
+            ramFilePath.Append(parse.NameAndExt());
+
             TChar drive;
             User::LeaveIfError(DriveInfo::GetDefaultDrive(
                     DriveInfo::EDefaultRam, drive));
@@ -196,7 +199,7 @@
             ConeUtils::EnsurePathExistsL(ramFilePath);
             if (!iManager)
                 {
-                iManager = ContentAccess::CManager::NewL();    
+                iManager = ContentAccess::CManager::NewL();
                 }
             iManager->CopyFile(*iFile, ramFilePath);
             filePath.Copy(ramFilePath);
--- a/photosgallery/gallery/sis/glxgallery_stub.pkg	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/gallery/sis/glxgallery_stub.pkg	Wed Jun 09 09:41:51 2010 +0300
@@ -101,12 +101,6 @@
 ""-"z:\sys\bin\glxcollectionplugincamera.dll"
 ""-"z:\resource\plugins\glxcollectionplugincamera.rsc"
 ""-"z:\resource\plugins\glxplugincamera.rsc"
-""-"z:\sys\bin\glxcollectionplugindownloads.dll"
-""-"z:\resource\plugins\glxcollectionplugindownloads.rsc"
-""-"z:\resource\plugins\glxplugindownloads.rsc"
-""-"z:\sys\bin\glxcollectionpluginmonths.dll"
-""-"z:\resource\plugins\glxcollectionpluginmonths.rsc"
-""-"z:\resource\plugins\glxpluginmonths.rsc"
 ""-"z:\sys\bin\glxcollectionpluginimageviewer.dll"
 ""-"z:\resource\plugins\glxcollectionpluginimageviewer.rsc"
 ""-"z:\resource\plugins\glxpluginimageviewer.rsc"
--- a/photosgallery/gallery/src/glxappui.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/gallery/src/glxappui.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -38,7 +38,6 @@
 #include <glxcollectionplugincamera.hrh>
 #include <glxcollectionpluginall.hrh>
 #include <glxcollectionpluginalbums.hrh>
-#include <glxcollectionpluginmonths.hrh>
 #include <glxcollectionplugintags.hrh>
 #include <glxcollectionpluginimageviewer.hrh>
 #include <glxcollectionplugintype.hrh>
--- a/photosgallery/rom/glxgallery.iby	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/rom/glxgallery.iby	Wed Jun 09 09:41:51 2010 +0300
@@ -69,8 +69,6 @@
 
 ECOM_PLUGIN( glxcollectionpluginall.dll, glxcollectionpluginall.rsc )
 
-ECOM_PLUGIN( glxcollectionpluginmonths.dll, glxcollectionpluginmonths.rsc )
-
 ECOM_PLUGIN( glxcollectionpluginimageviewer.dll, glxcollectionpluginimageviewer.rsc )
 
 file=ABI_DIR\BUILD_DIR\glxlayouts.dll                           SHARED_LIB_DIR\glxlayouts.dll  
--- a/photosgallery/rom/glxgallery_resources.iby	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/rom/glxgallery_resources.iby	Wed Jun 09 09:41:51 2010 +0300
@@ -45,8 +45,6 @@
 
 data=DATAZ_\resource\plugins\glxpluginall.rsc                 resource\plugins\glxpluginall.rsc
 
-data=DATAZ_\resource\plugins\glxpluginmonths.rsc              resource\plugins\glxpluginmonths.rsc
-
 data=DATAZ_\APP_RESOURCE_DIR\glxuiutilities.rsc               APP_RESOURCE_DIR\glxuiutilities.rsc  
 
 data=DATAZ_\APP_RESOURCE_DIR\glxgridviewdata.rsc              APP_RESOURCE_DIR\glxgridviewdata.rsc
--- a/photosgallery/slideshow/engine/bwins/shwslideshowengineu.def	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/slideshow/engine/bwins/shwslideshowengineu.def	Wed Jun 09 09:41:51 2010 +0300
@@ -10,19 +10,20 @@
 	?SaveMusicStateL@CShwSettingsModel@@QAEXH@Z @ 9 NONAME ; void CShwSettingsModel::SaveMusicStateL(int)
 	?PreviousItemL@CShwSlideshowEngine@@QAEXXZ @ 10 NONAME ; void CShwSlideshowEngine::PreviousItemL(void)
 	?VolumeDownL@CShwSlideshowEngine@@QAEXXZ @ 11 NONAME ; void CShwSlideshowEngine::VolumeDownL(void)
-	?VolumeUpL@CShwSlideshowEngine@@QAEXXZ @ 12 NONAME ; void CShwSlideshowEngine::VolumeUpL(void)
-	?SaveTransitionTypeL@CShwSettingsModel@@QAEXVTUid@@I@Z @ 13 NONAME ; void CShwSettingsModel::SaveTransitionTypeL(class TUid, unsigned int)
-	?MusicNamePathL@CShwSettingsModel@@QBEXAAVTDes16@@@Z @ 14 NONAME ; void CShwSettingsModel::MusicNamePathL(class TDes16 &) const
-	?NewL@CShwSettingsModel@@SAPAV1@XZ @ 15 NONAME ; class CShwSettingsModel * CShwSettingsModel::NewL(void)
-	?NextItemL@CShwSlideshowEngine@@QAEXXZ @ 16 NONAME ; void CShwSlideshowEngine::NextItemL(void)
-	?MusicOnL@CShwSettingsModel@@QBEHXZ @ 17 NONAME ; int CShwSettingsModel::MusicOnL(void) const
-	?TransitionTypeL@CShwSettingsModel@@QBEXAAVTUid@@AAI@Z @ 18 NONAME ; void CShwSettingsModel::TransitionTypeL(class TUid &, unsigned int &) const
-	?ResumeL@CShwSlideshowEngine@@QAEXXZ @ 19 NONAME ; void CShwSlideshowEngine::ResumeL(void)
-	?SavePlayOrderL@CShwSettingsModel@@QAEXH@Z @ 20 NONAME ; void CShwSettingsModel::SavePlayOrderL(int)
-	?SaveTransDelayL@CShwSettingsModel@@QAEXH@Z @ 21 NONAME ; void CShwSettingsModel::SaveTransDelayL(int)
-	?TransDelayL@CShwSettingsModel@@QBEHXZ @ 22 NONAME ; int CShwSettingsModel::TransDelayL(void) const
-	?GetMusicVolumeL@CShwSlideshowEngine@@QAEXXZ @ 23 NONAME ; void CShwSlideshowEngine::GetMusicVolumeL(void)
-	?PauseL@CShwSlideshowEngine@@QAEXXZ @ 24 NONAME ; void CShwSlideshowEngine::PauseL(void)
-	?ToggleUiControlsVisibiltyL@CShwSlideshowEngine@@QAEXXZ @ 25 NONAME ; void CShwSlideshowEngine::ToggleUiControlsVisibiltyL(void)
-	?NewL@CShwSlideshowEngine@@SAPAV1@AAVMShwEngineObserver@@@Z @ 26 NONAME ; class CShwSlideshowEngine * CShwSlideshowEngine::NewL(class MShwEngineObserver &)
+	?HandleHDMIDecodingEventL@CShwSlideshowEngine@@QAEXW4THdmiDecodingStatus@@@Z @ 12 NONAME ; void CShwSlideshowEngine::HandleHDMIDecodingEventL(enum THdmiDecodingStatus)
+	?VolumeUpL@CShwSlideshowEngine@@QAEXXZ @ 13 NONAME ; void CShwSlideshowEngine::VolumeUpL(void)
+	?SaveTransitionTypeL@CShwSettingsModel@@QAEXVTUid@@I@Z @ 14 NONAME ; void CShwSettingsModel::SaveTransitionTypeL(class TUid, unsigned int)
+	?MusicNamePathL@CShwSettingsModel@@QBEXAAVTDes16@@@Z @ 15 NONAME ; void CShwSettingsModel::MusicNamePathL(class TDes16 &) const
+	?NewL@CShwSettingsModel@@SAPAV1@XZ @ 16 NONAME ; class CShwSettingsModel * CShwSettingsModel::NewL(void)
+	?NextItemL@CShwSlideshowEngine@@QAEXXZ @ 17 NONAME ; void CShwSlideshowEngine::NextItemL(void)
+	?MusicOnL@CShwSettingsModel@@QBEHXZ @ 18 NONAME ; int CShwSettingsModel::MusicOnL(void) const
+	?TransitionTypeL@CShwSettingsModel@@QBEXAAVTUid@@AAI@Z @ 19 NONAME ; void CShwSettingsModel::TransitionTypeL(class TUid &, unsigned int &) const
+	?ResumeL@CShwSlideshowEngine@@QAEXXZ @ 20 NONAME ; void CShwSlideshowEngine::ResumeL(void)
+	?SavePlayOrderL@CShwSettingsModel@@QAEXH@Z @ 21 NONAME ; void CShwSettingsModel::SavePlayOrderL(int)
+	?SaveTransDelayL@CShwSettingsModel@@QAEXH@Z @ 22 NONAME ; void CShwSettingsModel::SaveTransDelayL(int)
+	?TransDelayL@CShwSettingsModel@@QBEHXZ @ 23 NONAME ; int CShwSettingsModel::TransDelayL(void) const
+	?GetMusicVolumeL@CShwSlideshowEngine@@QAEXXZ @ 24 NONAME ; void CShwSlideshowEngine::GetMusicVolumeL(void)
+	?PauseL@CShwSlideshowEngine@@QAEXXZ @ 25 NONAME ; void CShwSlideshowEngine::PauseL(void)
+	?ToggleUiControlsVisibiltyL@CShwSlideshowEngine@@QAEXXZ @ 26 NONAME ; void CShwSlideshowEngine::ToggleUiControlsVisibiltyL(void)
+	?NewL@CShwSlideshowEngine@@SAPAV1@AAVMShwEngineObserver@@@Z @ 27 NONAME ; class CShwSlideshowEngine * CShwSlideshowEngine::NewL(class MShwEngineObserver &)
 
--- a/photosgallery/slideshow/engine/controlsrc/shweffectcontrol.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/slideshow/engine/controlsrc/shweffectcontrol.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -59,7 +59,9 @@
     iVisualList( aVisualList ),
     iMediaList( aMediaList ),
 	iEffectLoopRestarted( EFalse ),
-	iFailedThumbnailIndex( KErrNotFound )
+	iFailedThumbnailIndex( KErrNotFound ),
+	iHDMIFirstDecoded(EFalse),
+	iTNReadyReceived(EFalse)
     {
     // initialize the default layout chain
     iDefaultIconLayout.SetOpacity( KMaxOpacity, 0 );
@@ -204,6 +206,10 @@
         dynamic_cast< TShwEventPreviousImage* >( aEvent );
     TShwEventToggleControlUi* toggleControlUiEvent = 
         dynamic_cast< TShwEventToggleControlUi* >( aEvent );
+    TShwEventHDMIDisConnected* hdmiDisConnectEvent = 
+    dynamic_cast< TShwEventHDMIDisConnected* >( aEvent );
+    TShwEventHDMIFirstImageDecodingCompleted* hdmiDecodeImageEvent = 
+    dynamic_cast< TShwEventHDMIFirstImageDecodingCompleted* >( aEvent );        
 
     // process init event
     if( init )
@@ -247,6 +253,15 @@
         {
         HandlePreviousImageEventL();
         }
+    else if(hdmiDecodeImageEvent || hdmiDisConnectEvent)
+    	{
+    	iHDMIFirstDecoded = ETrue;
+    	if(iTNReadyReceived)
+    		{
+            TShwEventReadyToView readyToView;
+            SendEventL(&readyToView);    		
+    		}
+    	}    	
     // no other events are interesting for us
     }
 
@@ -342,10 +357,14 @@
         {
         GLX_LOG_INFO( 
             "HandleThumbnailLoadedL - sending TShwEventReadyToView" );
+        iTNReadyReceived = ETrue;
         // its focus index so lets send ready to view
         // send ready to view event
-        TShwEventReadyToView readyToView;
-        SendEventL( &readyToView );
+        if(iHDMIFirstDecoded)
+        	{
+            TShwEventReadyToView readyToView;
+            SendEventL( &readyToView );              	
+        	}
         }
     // is it next from focus
     else if( aIndex == NextListIndex( KNavigateForwards ) )
@@ -372,6 +391,11 @@
     // we need to remember this index however as we dont want to start the
     // effect for it
     iFailedThumbnailIndex = aIndex;
+    TInt focus = iVisualList.FocusIndex();
+    if (aIndex == focus)
+    	{
+        iHDMIFirstDecoded = ETrue;    	
+    	}
     HandleThumbnailLoadedL( aIndex );
     }
 
--- a/photosgallery/slideshow/engine/controlsrc/shweffectcontrol.h	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/slideshow/engine/controlsrc/shweffectcontrol.h	Wed Jun 09 09:41:51 2010 +0300
@@ -239,7 +239,10 @@
 		RPointerArray<CAlfVisual> iPausedVisuals;
 		
 		TInt iFailedThumbnailIndex;
-
+		/// Own: Flag to tell if HDMI decoding is completed
+		TBool iHDMIFirstDecoded;
+		/// Own: Flag to tell if TN ready received
+		TBool iTNReadyReceived;		
 	};
 
 #endif // __CSHWEFFECTCONTROL_H__
--- a/photosgallery/slideshow/engine/controlsrc/shwevent.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/slideshow/engine/controlsrc/shwevent.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -147,3 +147,24 @@
  * Selection key pressed for changed ui state (Hide or visible)
  */
 SHW_DEFINE_EVENT_CLASS( TShwEventToggleControlUi);
+
+/**
+ * Event for HDMI Disconnected.
+ */
+SHW_DEFINE_EVENT_CLASS( TShwEventHDMIDisConnected );
+
+/**
+ * Event for HDMI Image decoding has started.
+ */
+SHW_DEFINE_EVENT_CLASS( TShwEventHDMIImageDecodingStarted );
+
+/**
+ * Event for HDMI Image decoding has completed.
+ */
+SHW_DEFINE_EVENT_CLASS( TShwEventHDMIImageDecodingCompleted );
+
+/**
+ * Event for HDMI First Image decoding has completed.
+ */
+SHW_DEFINE_EVENT_CLASS( TShwEventHDMIFirstImageDecodingCompleted );
+
--- a/photosgallery/slideshow/engine/controlsrc/shwviewcontrol.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/slideshow/engine/controlsrc/shwviewcontrol.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -36,6 +36,7 @@
 	iTransitionReadyReceived( EFalse ),
 	iReadyToAdvanceReceived( EFalse ),
 	iTimerReceived( EFalse ),
+	iHDMIDecoded(ETrue),
 	iUserNavigated( EFalse ),
 	iPaused( EFalse ),
 	iUserNavigatedWhilePaused( EFalse )
@@ -179,6 +180,25 @@
         GLX_LOG_INFO( "CShwViewControl::NotifyL - TShwEventToggleControlUi" );
         // Have to impliment if need comes
         }	 
+	else if( dynamic_cast< TShwEventHDMIDisConnected* >( aEvent ) )
+		{
+		GLX_LOG_INFO( "CShwViewControl::NotifyL - TShwEventHDMIDisConnected" );
+		iHDMIDecoded = ETrue ;
+		// check if we are ok to go to start transition
+        CheckAndSendStartTransitionL();
+		}
+	else if( dynamic_cast< TShwEventHDMIImageDecodingStarted* >( aEvent ) )
+		{
+		GLX_LOG_INFO( "CShwViewControl::NotifyL - TShwEventHDMIImageDecodingStarted" );
+		iHDMIDecoded = EFalse ; 
+		}
+	else if( dynamic_cast< TShwEventHDMIImageDecodingCompleted* >( aEvent ) )
+		{
+		GLX_LOG_INFO( "CShwViewControl::NotifyL - TShwEventHDMIImageDecodingCompleted" );
+		iHDMIDecoded = ETrue ;
+		// check if we are ok to go to start transition
+        CheckAndSendStartTransitionL();
+		}
 	}
 
 // -----------------------------------------------------------------------------
@@ -190,8 +210,8 @@
     GLX_LOG_INFO( "CShwViewControl::CheckAndSendStartTransitionL" );
 	// check if we got timer and ready to advance and 
 	// we are not paused and there is more than one item
-	if( iTimerReceived && iReadyToAdvanceReceived && 
-	    (!iPaused) && (iList.Count() > 1) )
+	if (iTimerReceived && iReadyToAdvanceReceived && iHDMIDecoded && (!iPaused)
+			&& (iList.Count() > 1))
 	    {
         GLX_LOG_INFO( "CShwViewControl::Sending TShwEventStartTransition" );
         // reset timer and viewready flags
--- a/photosgallery/slideshow/engine/controlsrc/shwviewcontrol.h	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/slideshow/engine/controlsrc/shwviewcontrol.h	Wed Jun 09 09:41:51 2010 +0300
@@ -98,6 +98,8 @@
 		TBool iReadyToAdvanceReceived;
 		/// Own: Flag to tell whether we received timer beat
 		TBool iTimerReceived;
+		/// Own: Flag to tell HDMI decoding is completed
+		TBool iHDMIDecoded;
 		/// Own: Flag to tell that user navigated during pause
 		TBool iUserNavigated;
 		/// Own: Flag set to ETrue when paused, EFalse when playing
--- a/photosgallery/slideshow/engine/coresrc/shwslideshowengine.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/slideshow/engine/coresrc/shwslideshowengine.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -181,3 +181,14 @@
     GLX_LOG_INFO("CShwSlideshowEngine::LSKPressedL");
     this->iImpl->LSKPressedL();
     }
+
+// -----------------------------------------------------------------------------
+// HandleHDMIDecodingEvent
+// -----------------------------------------------------------------------------
+EXPORT_C void CShwSlideshowEngine::HandleHDMIDecodingEventL(
+        THdmiDecodingStatus aStatus)
+    {
+    TRACER("CShwSlideshowEngine::HandleHDMIDecodingEventL");
+    this->iImpl->HandleHDMIDecodingEventL(aStatus);
+    }
+
--- a/photosgallery/slideshow/engine/coresrc/shwslideshowengineimpl.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/slideshow/engine/coresrc/shwslideshowengineimpl.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -370,3 +370,44 @@
 	// This should be queried from the playback factory
 	CShwPlaybackFactory::AvailableEffectsL( aEffects );
 	}
+
+// -----------------------------------------------------------------------------
+// HandleHDMIDecodingEventL
+// -----------------------------------------------------------------------------
+void CShwSlideshowEngineImpl::HandleHDMIDecodingEventL(
+        THdmiDecodingStatus aStatus)
+    {
+    TRACER("CShwSlideshowEngineImpl::HandleHDMIDecodingEventL");
+    GLX_LOG_INFO1("CShwSlideshowEngineImpl::HandleHDMIDecodingEventL: %d",
+            aStatus);
+
+    switch (aStatus)
+        {
+        case EHdmiDecodingStarted:
+            {
+            TShwEventHDMIImageDecodingStarted decodingStarted;
+            SendEventL(&decodingStarted);
+            break;
+            }
+        case EHdmiDecodingCompleted:
+            {
+            TShwEventHDMIImageDecodingCompleted decodingCompleted;
+            SendEventL(&decodingCompleted);
+            break;
+            }
+		case EHdmiDecodingFirstCompleted:
+			{
+			TShwEventHDMIFirstImageDecodingCompleted decodingFirstCompleted;
+			SendEventL( &decodingFirstCompleted );
+			break;
+			}						
+        case EHdmiDisconnected:
+		default:
+            {
+            TShwEventHDMIDisConnected hdmiDisconnected;
+            SendEventL(&hdmiDisconnected);
+            break;
+            }
+        }
+    }
+
--- a/photosgallery/slideshow/engine/coresrc/shwslideshowengineimpl.h	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/slideshow/engine/coresrc/shwslideshowengineimpl.h	Wed Jun 09 09:41:51 2010 +0300
@@ -109,6 +109,8 @@
 		void VolumeDownL();
 	    /// @ref CShwSlideshowEngine::GetMusicVolumeL
 	    void GetMusicVolumeL();
+	    /// @ref CShwSlideshowEngine::HandleHDMIDecodingEventL
+		void HandleHDMIDecodingEventL(THdmiDecodingStatus aStatus);
 
 	public: // From MShwEventObserver
 
--- a/photosgallery/slideshow/engine/eabi/shwslideshowengineu.def	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/slideshow/engine/eabi/shwslideshowengineu.def	Wed Jun 09 09:41:51 2010 +0300
@@ -14,19 +14,20 @@
 	_ZN19CShwSlideshowEngine13PreviousItemLEv @ 13 NONAME
 	_ZN19CShwSlideshowEngine15GetMusicVolumeLEv @ 14 NONAME
 	_ZN19CShwSlideshowEngine17AvailableEffectsLER6RArrayI14TShwEffectInfoE @ 15 NONAME
-	_ZN19CShwSlideshowEngine26ToggleUiControlsVisibiltyLEv @ 16 NONAME
-	_ZN19CShwSlideshowEngine4NewLER18MShwEngineObserver @ 17 NONAME
-	_ZN19CShwSlideshowEngine6PauseLEv @ 18 NONAME
-	_ZN19CShwSlideshowEngine6StartLER7CAlfEnvR11CAlfDisplayR13MGlxMediaListR17MShwMusicObserver5TSize @ 19 NONAME
-	_ZN19CShwSlideshowEngine7ResumeLEv @ 20 NONAME
-	_ZN19CShwSlideshowEngine9NextItemLEv @ 21 NONAME
-	_ZN19CShwSlideshowEngine9VolumeUpLEv @ 22 NONAME
-	_ZN19CShwSlideshowEngineD0Ev @ 23 NONAME
-	_ZN19CShwSlideshowEngineD1Ev @ 24 NONAME
-	_ZN19CShwSlideshowEngineD2Ev @ 25 NONAME
-	_ZNK17CShwSettingsModel11TransDelayLEv @ 26 NONAME
-	_ZNK17CShwSettingsModel14MusicNamePathLER6TDes16 @ 27 NONAME
-	_ZNK17CShwSettingsModel15TransitionTypeLER4TUidRj @ 28 NONAME
-	_ZNK17CShwSettingsModel8MusicOnLEv @ 29 NONAME
-	_ZNK19CShwSlideshowEngine5StateEv @ 30 NONAME
+	_ZN19CShwSlideshowEngine24HandleHDMIDecodingEventLE19THdmiDecodingStatus @ 16 NONAME
+	_ZN19CShwSlideshowEngine26ToggleUiControlsVisibiltyLEv @ 17 NONAME
+	_ZN19CShwSlideshowEngine4NewLER18MShwEngineObserver @ 18 NONAME
+	_ZN19CShwSlideshowEngine6PauseLEv @ 19 NONAME
+	_ZN19CShwSlideshowEngine6StartLER7CAlfEnvR11CAlfDisplayR13MGlxMediaListR17MShwMusicObserver5TSize @ 20 NONAME
+	_ZN19CShwSlideshowEngine7ResumeLEv @ 21 NONAME
+	_ZN19CShwSlideshowEngine9NextItemLEv @ 22 NONAME
+	_ZN19CShwSlideshowEngine9VolumeUpLEv @ 23 NONAME
+	_ZN19CShwSlideshowEngineD0Ev @ 24 NONAME
+	_ZN19CShwSlideshowEngineD1Ev @ 25 NONAME
+	_ZN19CShwSlideshowEngineD2Ev @ 26 NONAME
+	_ZNK17CShwSettingsModel11TransDelayLEv @ 27 NONAME
+	_ZNK17CShwSettingsModel14MusicNamePathLER6TDes16 @ 28 NONAME
+	_ZNK17CShwSettingsModel15TransitionTypeLER4TUidRj @ 29 NONAME
+	_ZNK17CShwSettingsModel8MusicOnLEv @ 30 NONAME
+	_ZNK19CShwSlideshowEngine5StateEv @ 31 NONAME
 
--- a/photosgallery/slideshow/engine/group/shwslideshowengine.mmp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/slideshow/engine/group/shwslideshowengine.mmp	Wed Jun 09 09:41:51 2010 +0300
@@ -57,7 +57,8 @@
 SYSTEMINCLUDE ../../../common/inc                              
 SYSTEMINCLUDE ../../../commonui/inc
 SYSTEMINCLUDE     ../../../gallery/loc
-
+// for mglxhdmidecoderobserver
+SYSTEMINCLUDE ../../../viewframework/inc
 
 
 SOURCEPATH ../coresrc
@@ -119,5 +120,6 @@
 LIBRARY     mpxcommon.lib
 LIBRARY avkon.lib 
 LIBRARY eikcore.lib 
+LIBRARY glxtvout.lib 
 
 
--- a/photosgallery/slideshow/engine/inc/shwevent.h	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/slideshow/engine/inc/shwevent.h	Wed Jun 09 09:41:51 2010 +0300
@@ -185,5 +185,24 @@
  */
 SHW_DECLARE_EVENT_CLASS( TShwEventToggleControlUi );
 
+/**
+ * Event for HDMI Disconnected.
+ */
+SHW_DECLARE_EVENT_CLASS( TShwEventHDMIDisConnected );
+
+/**
+ * Event for HDMI Image decoding has started.
+ */
+SHW_DECLARE_EVENT_CLASS( TShwEventHDMIImageDecodingStarted );
+
+/**
+ * Event for HDMI Image decoding has completed.
+ */
+SHW_DECLARE_EVENT_CLASS( TShwEventHDMIImageDecodingCompleted );
+
+/**
+ * Event for HDMI Image decoding has completed.
+ */
+SHW_DECLARE_EVENT_CLASS( TShwEventHDMIFirstImageDecodingCompleted );
 
 #endif // __SHWEVENT_H__
--- a/photosgallery/slideshow/engine/inc/shwslideshowengine.h	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/slideshow/engine/inc/shwslideshowengine.h	Wed Jun 09 09:41:51 2010 +0300
@@ -26,6 +26,7 @@
 #include <e32std.h>
 #include <alf/alfdisplay.h>
 #include <alf/alfenv.h>
+#include <mglxhdmidecoderobserver.h>
 
 // Forward declarations
 class CAlfEnv;
@@ -146,6 +147,11 @@
          */
         IMPORT_C void LSKPressedL();
 
+        /**
+         * This method gets called when there is an HDMI event
+         */
+        IMPORT_C void HandleHDMIDecodingEventL(THdmiDecodingStatus aStatus);
+
     private: // Implementation
 
         /// C++ constructor, no derivation or use outside the DLL
--- a/photosgallery/slideshow/settingsdialog/group/shwsettingsdialog.mmp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/slideshow/settingsdialog/group/shwsettingsdialog.mmp	Wed Jun 09 09:41:51 2010 +0300
@@ -65,7 +65,7 @@
 SYSTEMINCLUDE   ../../../inc
 SYSTEMINCLUDE   ../../../viewframework/uiutilities/inc	// for CGlxHuiUtility
 SYSTEMINCLUDE	../../../common/inc                     // for CGlxResourceUtilities
-
+SYSTEMINCLUDE   ../../../viewframework/inc
 
 APP_LAYER_SYSTEMINCLUDE
 
--- a/photosgallery/slideshow/view/inc/shwslideshowview.h	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/slideshow/view/inc/shwslideshowview.h	Wed Jun 09 09:41:51 2010 +0300
@@ -34,6 +34,8 @@
 #include "glxmmcnotifier.h"
 #include <mglxtvobserver.h>
 #include <glxtv.h>
+#include <mglxhdmidecoderobserver.h>
+
 // FORWARD DECLARATIONS
 class CAlfEnv;
 class CAlfDisplay;
@@ -70,7 +72,8 @@
                                        public MShwTickObserver,
                                        public MShwGestureObserver,
                                        public MStorageNotifierObserver,
-                                       public MGlxTvObserver
+                                       public MGlxTvObserver,
+									   public MGlxHDMIDecoderObserver
     {
     public:
 
@@ -148,6 +151,12 @@
     	 */	
         void DoViewDeactivate();
 
+   public://From MGlxHDMIDecoderObserver
+	   /**
+		* Handle notification of HDMI Image Decoder.
+		*/    
+	   void HandleHDMIDecodingEventL(THdmiDecodingStatus aStatus);
+
     private: // from MGlxMediaListObserver
 
     	/// @ref MGlxMediaListObserver::HandleItemAddedL
@@ -327,6 +336,11 @@
          * HandleMMCRemovalL.
          */
         void HandleMMCRemovalL();
+		/**
+		 * Returns the index of the next item 
+		 * for which HDMI advance decoding will be done
+		 */
+		TInt GetNextIndex();
 	public:
 	//to keep in track which of the command set is active/on top
 		enum TShwState
--- a/photosgallery/slideshow/view/src/shwslideshowview.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/slideshow/view/src/shwslideshowview.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -223,48 +223,55 @@
 // StartEngineL
 // -----------------------------------------------------------------------------
 TInt CShwSlideshowView::StartEngineL()
-    {
-    TRACER("CShwSlideshowView::StartEngineL");
-  	GLX_LOG_INFO( "CShwSlideshowView::StartEngineL" );
-    // Check that the list has some items
-  	if( iFilteredList )
-        {
-	    TInt filteredCount = iFilteredList->Count();
-	    TInt inputlistCount = iMediaList->Count();
-	    if ( ( inputlistCount < 1 )||
-	         ( filteredCount  < 1 ) )
-	        {
-	      	GLX_LOG_INFO2( 
-	            "CShwSlideshowView::PopulateListL error, counts: %d, %d", 
-	                inputlistCount, filteredCount );
-	        iEngineStartFailed = ETrue;
-	        // need to dismiss the dialog if it's still there
-	        if( iWaitDialog )
-	            {
-	            iWaitDialog->ProcessFinishedL();
-	            }
-	        }
-	    else
-	        {
-	        // The list should now be populated, so set the focus
-	       	SetListFocusL();
-	       	// Need to take latest screen size as layout has changed
-	       	TRect currentScreen;
-	       	AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EScreen,currentScreen);
-	       	iScrnSize = currentScreen.Size();
+	{
+	TRACER("CShwSlideshowView::StartEngineL");
+	GLX_LOG_INFO( "CShwSlideshowView::StartEngineL" );
+	// Check that the list has some items
+	if (iFilteredList)
+		{
+		TInt filteredCount = iFilteredList->Count();
+		TInt inputlistCount = iMediaList->Count();
+		if ((inputlistCount < 1) || (filteredCount < 1))
+			{
+			GLX_LOG_INFO2(
+					"CShwSlideshowView::PopulateListL error, counts: %d, %d",
+					inputlistCount, filteredCount );
+			iEngineStartFailed = ETrue;
+			// need to dismiss the dialog if it's still there
+			if (iWaitDialog)
+				{
+				iWaitDialog->ProcessFinishedL();
+				}
+			}
+		else
+			{
+			// The list should now be populated, so set the focus
+			SetListFocusL();
+			// Need to take latest screen size as layout has changed
+			TRect currentScreen;
+			AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EScreen,
+					currentScreen);
+			iScrnSize = currentScreen.Size();
 
-	       	iHdmiWidth = (iScrnSize.iWidth > iScrnSize.iHeight ?
-                                iScrnSize.iWidth :iScrnSize.iHeight);
-	        iHdmiHeight = (iScrnSize.iWidth < iScrnSize.iHeight ?
-                                iScrnSize.iWidth :iScrnSize.iHeight);
-
-	    	iEngine->StartL( 
-	    	    *iEnv, *iDisplay, *iFilteredList, *this, iScrnSize );
-	        }
-        }  
-    // return value needed as this is a TCallBack
-    return KErrNone;
-    }
+			iHdmiWidth
+					= (iScrnSize.iWidth > iScrnSize.iHeight ? iScrnSize.iWidth
+							: iScrnSize.iHeight);
+			iHdmiHeight
+					= (iScrnSize.iWidth < iScrnSize.iHeight ? iScrnSize.iWidth
+							: iScrnSize.iHeight);
+			iEngine->StartL(*iEnv, *iDisplay, *iFilteredList, *this, iScrnSize);
+			if (iHdmiController == NULL || (iHdmiController
+					&& !iHdmiController->IsHDMIConnected()))
+				{
+				iEngine->HandleHDMIDecodingEventL(EHdmiDisconnected);
+				}
+			SetItemToHDMIL();
+			iHdmiActive = ETrue;
+			}
+		}
+	// return value needed as this is a TCallBack
+	return KErrNone;
+	}
 
 // -----------------------------------------------------------------------------
 // PopulateListL
@@ -451,7 +458,7 @@
 
 	if(!iHdmiController)
 		{
-	    iHdmiController = CGlxHdmiController::NewL();
+	    iHdmiController = CGlxHdmiController::NewL(*this);
 		}
 	if(!iTvConnection)
 		{
@@ -753,22 +760,24 @@
 // ---------------------------------------------------------------------------
 //
 void CShwSlideshowView::EngineStartedL()
-    {
-    TRACER("CShwSlideshowView::EngineStartedL");
-  	GLX_LOG_INFO( "CShwSlideshowView::EngineStartedL()" );
-    
-    if ( iWaitDialog )
-        {
-        // cancel the progress bar
-        iWaitDialog->ProcessFinishedL();
-        }
-    iShwState = EShwPlay;
-    SetItemToHDMIL();
-	iHdmiActive = ETrue;
-    ReplaceCommandSetL(R_SHW_SOFTKEYS_END_PAUSE,R_SHW_SOFTKEYS_END_PAUSE);
-    ShowShwFurnitureL();
-    }
-    
+	{
+	TRACER("CShwSlideshowView::EngineStartedL");
+	GLX_LOG_INFO( "CShwSlideshowView::EngineStartedL()" );
+
+	if (iWaitDialog)
+		{
+		// cancel the progress bar
+		iWaitDialog->ProcessFinishedL();
+		}
+	if (iHdmiController)
+		{
+		iHdmiController->ShiftToPostingMode();
+		}
+	iShwState = EShwPlay;
+	ReplaceCommandSetL(R_SHW_SOFTKEYS_END_PAUSE, R_SHW_SOFTKEYS_END_PAUSE);
+	ShowShwFurnitureL();
+	}
+
 // ---------------------------------------------------------------------------
 // From MShwEngineObserver
 // Engine paused callback.
@@ -1295,6 +1304,7 @@
     TRACER("CShwSlideshowView::SetImageToHDMIL() ");
 
     TInt focusIndex = iFilteredList->FocusIndex();
+    TInt nextIndex = GetNextIndex();
 
     // If we dont know what item we are focussing on 
     // or if our filtered list is empty
@@ -1312,6 +1322,9 @@
     TGlxMedia item = iFilteredList->Item(focusIndex);
     TInt error = GlxErrorManager::HasAttributeErrorL(item.Properties(),
         KGlxMediaIdThumbnail);
+    TGlxMedia nextItem = iFilteredList->Item(nextIndex);
+    TInt nexterror = GlxErrorManager::HasAttributeErrorL(nextItem.Properties(),
+        KGlxMediaIdThumbnail);
     
     // Item will be supported by HDMI ONLY if
     // it is not a video
@@ -1334,7 +1347,14 @@
             
             GLX_LOG_INFO2("CShwSlideshowView::SetImageToHDMIL - CGlxHdmi - FS Bitmap Size width=%d, height=%d", 
                     fsBitmap->SizeInPixels().iWidth, fsBitmap->SizeInPixels().iHeight);
-            iHdmiController->SetImageL(item.Uri(),fsBitmap);
+            if(nexterror == KErrNone)
+            	{
+                iHdmiController->SetImageL(item.Uri(), nextItem.Uri(), fsBitmap);            	
+            	}
+            else
+            	{
+            	iHdmiController->SetImageL(item.Uri(), KNullDesC, fsBitmap);
+            	}
             CleanupStack::PopAndDestroy(fsBitmap);
             }
         else
@@ -1355,7 +1375,14 @@
                 
                 GLX_LOG_INFO2("CShwSlideshowView::SetImageToHDMIL - CGlxHdmi - gridBitmap Size width=%d, height=%d", 
                         gridBitmap->SizeInPixels().iWidth, gridBitmap->SizeInPixels().iHeight);
-                iHdmiController->SetImageL(item.Uri(),gridBitmap);
+                if(nexterror == KErrNone)
+                	{
+                	iHdmiController->SetImageL(item.Uri(), nextItem.Uri(), gridBitmap);
+                	}
+                else
+                	{
+                	iHdmiController->SetImageL(item.Uri(), KNullDesC, gridBitmap);                	
+                	}
                 CleanupStack::PopAndDestroy(gridBitmap);
                 }
             else
@@ -1372,7 +1399,15 @@
                 
                 GLX_LOG_INFO2("CShwSlideshowView::SetImageToHDMIL - CGlxHdmi - Default Size width=%d, height=%d", 
                         defaultBitmap->SizeInPixels().iWidth, defaultBitmap->SizeInPixels().iHeight);
-                iHdmiController->SetImageL(item.Uri(),defaultBitmap);
+                if(nexterror == KErrNone)
+                	{
+                    iHdmiController->SetImageL(item.Uri(), nextItem.Uri(),
+							defaultBitmap);                	
+                	}
+                else
+                	{
+                    iHdmiController->SetImageL(item.Uri(), KNullDesC , defaultBitmap);                	
+                	}
                 CleanupStack::PopAndDestroy(defaultBitmap); 
                 }
             }
@@ -1382,7 +1417,7 @@
         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();
+        iHdmiController->ShiftToCloningMode();
         }
     }
 // ---------------------------------------------------------------------------
@@ -1475,3 +1510,31 @@
 		}
 
 	}
+
+// ---------------------------------------------------------------------------
+// GetNextIndex
+// ---------------------------------------------------------------------------
+//
+TInt CShwSlideshowView::GetNextIndex()
+	{
+	TRACER("CShwSlideshowView::GetNextIndex");
+	TInt count = iFilteredList->Count();
+	TInt focusIndex = iFilteredList->FocusIndex();
+	TInt nextIndex = focusIndex + 1;
+	if (nextIndex > count - 1)
+		{
+		nextIndex = nextIndex - count;
+		}
+	GLX_LOG_INFO1("CShwSlideshowView::GetNextIndex-nextIndex:%d",nextIndex);
+	return nextIndex;
+	}
+
+//---------------------------------------------------------------------------
+// From MGlxHDMIDecoderObserver
+// Handle notification of HDMI Image Decoder.
+//---------------------------------------------------------------------------   
+void CShwSlideshowView::HandleHDMIDecodingEventL(THdmiDecodingStatus aStatus)
+	{
+	TRACER("CShwSlideshowView::HandleHDMIDecodingEventL()");
+	iEngine->HandleHDMIDecodingEventL(aStatus);
+	}
--- a/photosgallery/viewframework/commandhandlers/commandhandlerbase/src/glxmedialistcommandhandler.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/commandhandlers/commandhandlerbase/src/glxmedialistcommandhandler.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -691,6 +691,11 @@
             return ETrue;
             }        
         }
+		//Hide Slideshow with one or more items marked
+    else if((!mlCount || selectionCount) && (aCommandId == EGlxCmdSlideshow))
+    	{
+		return ETrue;
+    	}
 		//If count is >0 and if its context menu item then enable them
 		//always, Since all the items are static it would not affect
 		//the normal behaviour present earlier.
--- a/photosgallery/viewframework/commandhandlers/commandhandlerbase/src/glxmpxcommandcommandhandler.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/commandhandlers/commandhandlerbase/src/glxmpxcommandcommandhandler.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -94,9 +94,9 @@
 
     // Check if the selected / focused file(s)s have been deleted from
 	// another application while the confirmation note is displayed
-    if (((selectionCount > 0) && (aList.SelectionCount() == 0)) ||
-        ((selectionCount == 0) &&
-        (focusedMedia.Id() != aList.Item(aList.FocusIndex()).Id())))
+    if (((selectionCount > 0) && (aList.SelectionCount() == 0))
+			|| ((selectionCount == 0) && aList.Count() && (focusedMedia.Id()
+					!= aList.Item(aList.FocusIndex()).Id())))
 		{
 		// All the selected / focused item(s) have been deleted,
 		// do not allow the command to execute.
--- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/bwins/glxcommoncommandhandlersu.def	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/bwins/glxcommoncommandhandlersu.def	Wed Jun 09 09:41:51 2010 +0300
@@ -1,65 +1,63 @@
 EXPORTS
 	?NewL@CGlxCommandHandlerAiwAssign@@SAPAV1@PAVMGlxMediaListProvider@@HABVTDesC16@@@Z @ 1 NONAME ; class CGlxCommandHandlerAiwAssign * CGlxCommandHandlerAiwAssign::NewL(class MGlxMediaListProvider *, int, class TDesC16 const &)
 	?NewL@CGlxCommandHandlerHelp@@SAPAV1@VTGlxHelpContext@@@Z @ 2 NONAME ; class CGlxCommandHandlerHelp * CGlxCommandHandlerHelp::NewL(class TGlxHelpContext)
-	?NewAddToAlbumSingleClickCommandHandlerL@CGlxCommandHandlerAddToContainer@@SAPAV1@PAVMGlxMediaListProvider@@HABVTDesC16@@@Z @ 3 NONAME ; class CGlxCommandHandlerAddToContainer * CGlxCommandHandlerAddToContainer::NewAddToAlbumSingleClickCommandHandlerL(class MGlxMediaListProvider *, int, class TDesC16 const &)
-	?HandleItemAddedL@CGlxCommandHandlerNewMedia@@MAEXHHPAVMGlxMediaList@@@Z @ 4 NONAME ; void CGlxCommandHandlerNewMedia::HandleItemAddedL(int, int, class MGlxMediaList *)
-	?ExecuteLD@CGlxCommandHandlerNewMedia@@QAEHAAVTGlxMediaId@@@Z @ 5 NONAME ; int CGlxCommandHandlerNewMedia::ExecuteLD(class TGlxMediaId &)
-	??1CGlxCommandHandlerFilterImagesOrVideos@@UAE@XZ @ 6 NONAME ; CGlxCommandHandlerFilterImagesOrVideos::~CGlxCommandHandlerFilterImagesOrVideos(void)
-	?NewL@CGlxCommandHandlerNewMedia@@SAPAV1@PAVMGlxMediaListProvider@@ABVTDesC16@@@Z @ 7 NONAME ; class CGlxCommandHandlerNewMedia * CGlxCommandHandlerNewMedia::NewL(class MGlxMediaListProvider *, class TDesC16 const &)
-	?NewL@CGlxCommandHandlerRemoveFrom@@SAPAV1@PAVMGlxMediaListProvider@@W4TMPXGeneralCategory@@ABVTDesC16@@@Z @ 8 NONAME ; class CGlxCommandHandlerRemoveFrom * CGlxCommandHandlerRemoveFrom::NewL(class MGlxMediaListProvider *, enum TMPXGeneralCategory, class TDesC16 const &)
-	??0CGlxMediaListAdaptor@@QAE@PBVMGlxMediaList@@H@Z @ 9 NONAME ; CGlxMediaListAdaptor::CGlxMediaListAdaptor(class MGlxMediaList const *, int)
-	?NewL@CGlxCommandHandlerUpload@@SAPAV1@PAVMGlxMediaListProvider@@H@Z @ 10 NONAME ; class CGlxCommandHandlerUpload * CGlxCommandHandlerUpload::NewL(class MGlxMediaListProvider *, int)
-	??1CGlxCommandHandlerUpload@@UAE@XZ @ 11 NONAME ; CGlxCommandHandlerUpload::~CGlxCommandHandlerUpload(void)
-	??1CGlxCommandHandlerNewMedia@@UAE@XZ @ 12 NONAME ; CGlxCommandHandlerNewMedia::~CGlxCommandHandlerNewMedia(void)
-	?NewL@CGlxCommandHandlerAiwPrintPreview@@SAPAV1@PAVMGlxMediaListProvider@@HABVTDesC16@@@Z @ 13 NONAME ; class CGlxCommandHandlerAiwPrintPreview * CGlxCommandHandlerAiwPrintPreview::NewL(class MGlxMediaListProvider *, int, class TDesC16 const &)
-	??1CGlxCommandHandlerSlideshow@@UAE@XZ @ 14 NONAME ; CGlxCommandHandlerSlideshow::~CGlxCommandHandlerSlideshow(void)
-	??1CGlxCommandHandlerSave@@UAE@XZ @ 15 NONAME ; CGlxCommandHandlerSave::~CGlxCommandHandlerSave(void)
-	?NewAddToFavCommandHandlerL@CGlxCommandHandlerAddToContainer@@SAPAV1@PAVMGlxMediaListProvider@@HABVTDesC16@@@Z @ 16 NONAME ; class CGlxCommandHandlerAddToContainer * CGlxCommandHandlerAddToContainer::NewAddToFavCommandHandlerL(class MGlxMediaListProvider *, int, class TDesC16 const &)
-	??1CGlxCommandHandlerAddToContainer@@UAE@XZ @ 17 NONAME ; CGlxCommandHandlerAddToContainer::~CGlxCommandHandlerAddToContainer(void)
-	??0CGlxMediaSelectionPopup@@QAE@XZ @ 18 NONAME ; CGlxMediaSelectionPopup::CGlxMediaSelectionPopup(void)
-	?NewL@CGlxCommandHandlerRotate@@SAPAV1@PAVMGlxMediaListProvider@@PAVMGlxLayoutOwner@@H@Z @ 19 NONAME ; class CGlxCommandHandlerRotate * CGlxCommandHandlerRotate::NewL(class MGlxMediaListProvider *, class MGlxLayoutOwner *, int)
-	?NewAddToTagSingleClickCommandHandlerL@CGlxCommandHandlerAddToContainer@@SAPAV1@PAVMGlxMediaListProvider@@HABVTDesC16@@@Z @ 20 NONAME ; class CGlxCommandHandlerAddToContainer * CGlxCommandHandlerAddToContainer::NewAddToTagSingleClickCommandHandlerL(class MGlxMediaListProvider *, int, class TDesC16 const &)
-	?ExecuteLD@CGlxMediaSelectionPopup@@QAEPAVCMPXCollectionPath@@AAV2@AAHHHPAVCMPXMedia@@@Z @ 21 NONAME ; class CMPXCollectionPath * CGlxMediaSelectionPopup::ExecuteLD(class CMPXCollectionPath &, int &, int, int, class CMPXMedia *)
-	?NewL@CGlxCommandHandlerSend@@SAPAV1@PAVMGlxMediaListProvider@@HABVTDesC16@@@Z @ 22 NONAME ; class CGlxCommandHandlerSend * CGlxCommandHandlerSend::NewL(class MGlxMediaListProvider *, int, class TDesC16 const &)
-	?OkToExit@CGlxCommandHandlerNewMedia@@UBEHXZ @ 23 NONAME ; int CGlxCommandHandlerNewMedia::OkToExit(void) const
-	?NewL@CGlxCommandHandlerAddToContainer@@SAPAV1@PAVMGlxMediaListProvider@@HHABVTDesC16@@@Z @ 24 NONAME ; class CGlxCommandHandlerAddToContainer * CGlxCommandHandlerAddToContainer::NewL(class MGlxMediaListProvider *, int, int, class TDesC16 const &)
-	??1CGlxCommandHandlerBack@@UAE@XZ @ 25 NONAME ; CGlxCommandHandlerBack::~CGlxCommandHandlerBack(void)
-	?NewPreviousViewCommandHandlerL@CGlxCommandHandlerBack@@SAPAV1@PAVMGlxMediaListProvider@@@Z @ 26 NONAME ; class CGlxCommandHandlerBack * CGlxCommandHandlerBack::NewPreviousViewCommandHandlerL(class MGlxMediaListProvider *)
-	??1CGlxCommandHandlerCopyAndMove@@UAE@XZ @ 27 NONAME ; CGlxCommandHandlerCopyAndMove::~CGlxCommandHandlerCopyAndMove(void)
-	??1CGlxCommandHandlerAiwEdit@@UAE@XZ @ 28 NONAME ; CGlxCommandHandlerAiwEdit::~CGlxCommandHandlerAiwEdit(void)
-	?SetContainerId@CGlxCommandHandlerRemoveFrom@@QAEXVTGlxMediaId@@@Z @ 29 NONAME ; void CGlxCommandHandlerRemoveFrom::SetContainerId(class TGlxMediaId)
-	?NewL@CGlxCommandHandlerVideoPlayback@@SAPAV1@PAVMGlxMediaListProvider@@@Z @ 30 NONAME ; class CGlxCommandHandlerVideoPlayback * CGlxCommandHandlerVideoPlayback::NewL(class MGlxMediaListProvider *)
-	?MdcaCount@CGlxMediaListAdaptor@@UBEHXZ @ 31 NONAME ; int CGlxMediaListAdaptor::MdcaCount(void) const
-	??0TGlxHelpContext@@QAE@XZ @ 32 NONAME ; TGlxHelpContext::TGlxHelpContext(void)
-	??1CGlxCommandHandlerSortOrder@@UAE@XZ @ 33 NONAME ; CGlxCommandHandlerSortOrder::~CGlxCommandHandlerSortOrder(void)
-	?NewL@CGlxCommandHandlerFilterImagesOrVideos@@SAPAV1@PAVMGlxMediaListProvider@@@Z @ 34 NONAME ; class CGlxCommandHandlerFilterImagesOrVideos * CGlxCommandHandlerFilterImagesOrVideos::NewL(class MGlxMediaListProvider *)
-	??1CGlxCommandHandlerRemoveFrom@@UAE@XZ @ 35 NONAME ; CGlxCommandHandlerRemoveFrom::~CGlxCommandHandlerRemoveFrom(void)
-	?NewL@CGlxCommandHandlerAiwShowMapHardKey@@SAPAV1@PAVMGlxMediaListProvider@@H@Z @ 36 NONAME ; class CGlxCommandHandlerAiwShowMapHardKey * CGlxCommandHandlerAiwShowMapHardKey::NewL(class MGlxMediaListProvider *, int)
-	?NewL@CGlxCommandHandlerHideUi@@SAPAV1@XZ @ 37 NONAME ; class CGlxCommandHandlerHideUi * CGlxCommandHandlerHideUi::NewL(void)
-	??1CGlxCommandHandlerSend@@UAE@XZ @ 38 NONAME ; CGlxCommandHandlerSend::~CGlxCommandHandlerSend(void)
-	?NewL@CGlxCommandHandlerAiwShowMap@@SAPAV1@PAVMGlxMediaListProvider@@HABVTDesC16@@@Z @ 39 NONAME ; class CGlxCommandHandlerAiwShowMap * CGlxCommandHandlerAiwShowMap::NewL(class MGlxMediaListProvider *, int, class TDesC16 const &)
-	?NewL@CGlxCommandHandlerOpen@@SAPAV1@PAVMGlxMediaListProvider@@@Z @ 40 NONAME ; class CGlxCommandHandlerOpen * CGlxCommandHandlerOpen::NewL(class MGlxMediaListProvider *)
-	??1CGlxCommandHandlerDelete@@UAE@XZ @ 41 NONAME ; CGlxCommandHandlerDelete::~CGlxCommandHandlerDelete(void)
-	??1CGlxCommandHandlerDetails@@UAE@XZ @ 42 NONAME ; CGlxCommandHandlerDetails::~CGlxCommandHandlerDetails(void)
-	??1CGlxCommandHandlerDownload@@UAE@XZ @ 43 NONAME ; CGlxCommandHandlerDownload::~CGlxCommandHandlerDownload(void)
-	?NewAddToTagCommandHandlerL@CGlxCommandHandlerAddToContainer@@SAPAV1@PAVMGlxMediaListProvider@@HABVTDesC16@@@Z @ 44 NONAME ; class CGlxCommandHandlerAddToContainer * CGlxCommandHandlerAddToContainer::NewAddToTagCommandHandlerL(class MGlxMediaListProvider *, int, class TDesC16 const &)
-	?NewL@CGlxCommandHandlerSave@@SAPAV1@XZ @ 45 NONAME ; class CGlxCommandHandlerSave * CGlxCommandHandlerSave::NewL(void)
-	?NewL@CGlxCommandHandlerCopyAndMove@@SAPAV1@PAVMGlxMediaListProvider@@HABVTDesC16@@@Z @ 46 NONAME ; class CGlxCommandHandlerCopyAndMove * CGlxCommandHandlerCopyAndMove::NewL(class MGlxMediaListProvider *, int, class TDesC16 const &)
-	?NewL@CGlxCommandHandlerDelete@@SAPAV1@PAVMGlxMediaListProvider@@HHABVTDesC16@@@Z @ 47 NONAME ; class CGlxCommandHandlerDelete * CGlxCommandHandlerDelete::NewL(class MGlxMediaListProvider *, int, int, class TDesC16 const &)
-	??1CGlxCommandHandlerOpen@@UAE@XZ @ 48 NONAME ; CGlxCommandHandlerOpen::~CGlxCommandHandlerOpen(void)
-	??1CGlxCommandHandlerRename@@UAE@XZ @ 49 NONAME ; CGlxCommandHandlerRename::~CGlxCommandHandlerRename(void)
-	??1CGlxCommandHandlerVideoPlayback@@UAE@XZ @ 50 NONAME ; CGlxCommandHandlerVideoPlayback::~CGlxCommandHandlerVideoPlayback(void)
-	?MdcaPoint@CGlxMediaListAdaptor@@UBE?AVTPtrC16@@H@Z @ 51 NONAME ; class TPtrC16 CGlxMediaListAdaptor::MdcaPoint(int) const
-	?NewAddToAlbumCommandHandlerL@CGlxCommandHandlerAddToContainer@@SAPAV1@PAVMGlxMediaListProvider@@HABVTDesC16@@@Z @ 52 NONAME ; class CGlxCommandHandlerAddToContainer * CGlxCommandHandlerAddToContainer::NewAddToAlbumCommandHandlerL(class MGlxMediaListProvider *, int, class TDesC16 const &)
-	?NewL@CGlxCommandHandlerDownload@@SAPAV1@XZ @ 53 NONAME ; class CGlxCommandHandlerDownload * CGlxCommandHandlerDownload::NewL(void)
-	?NewL@CGlxCommandHandlerDetails@@SAPAV1@PAVMGlxMediaListProvider@@ABVTDesC16@@@Z @ 54 NONAME ; class CGlxCommandHandlerDetails * CGlxCommandHandlerDetails::NewL(class MGlxMediaListProvider *, class TDesC16 const &)
-	??1CGlxCommandHandlerHelp@@UAE@XZ @ 55 NONAME ; CGlxCommandHandlerHelp::~CGlxCommandHandlerHelp(void)
-	?BypassFiltersForExecute@CGlxCommandHandlerNewMedia@@UBEHXZ @ 56 NONAME ; int CGlxCommandHandlerNewMedia::BypassFiltersForExecute(void) const
-	?NewL@CGlxCommandHandlerAiwShareOnOvi@@SAPAV1@PAVMGlxMediaListProvider@@HABVTDesC16@@@Z @ 57 NONAME ; class CGlxCommandHandlerAiwShareOnOvi * CGlxCommandHandlerAiwShareOnOvi::NewL(class MGlxMediaListProvider *, int, class TDesC16 const &)
-	?NewL@CGlxCommandHandlerSortOrder@@SAPAV1@PAVMGlxMediaListProvider@@K@Z @ 58 NONAME ; class CGlxCommandHandlerSortOrder * CGlxCommandHandlerSortOrder::NewL(class MGlxMediaListProvider *, unsigned long)
-	?NewL@CGlxCommandHandlerSlideshow@@SAPAV1@PAVMGlxMediaListProvider@@HHABVTDesC16@@@Z @ 59 NONAME ; class CGlxCommandHandlerSlideshow * CGlxCommandHandlerSlideshow::NewL(class MGlxMediaListProvider *, int, int, class TDesC16 const &)
-	?NewBackCommandHandlerL@CGlxCommandHandlerBack@@SAPAV1@XZ @ 60 NONAME ; class CGlxCommandHandlerBack * CGlxCommandHandlerBack::NewBackCommandHandlerL(void)
-	?NewL@CGlxCommandHandlerAiwEdit@@SAPAV1@PAVMGlxMediaListProvider@@H@Z @ 61 NONAME ; class CGlxCommandHandlerAiwEdit * CGlxCommandHandlerAiwEdit::NewL(class MGlxMediaListProvider *, int)
-	?NewL@CGlxCommandHandlerRename@@SAPAV1@PAVMGlxMediaListProvider@@HABVTDesC16@@@Z @ 62 NONAME ; class CGlxCommandHandlerRename * CGlxCommandHandlerRename::NewL(class MGlxMediaListProvider *, int, class TDesC16 const &)
-	?NewContainerPreviousViewCommandHandlerL@CGlxCommandHandlerBack@@SAPAV1@PAVMGlxMediaListProvider@@H@Z @ 63 NONAME ; class CGlxCommandHandlerBack * CGlxCommandHandlerBack::NewContainerPreviousViewCommandHandlerL(class MGlxMediaListProvider *, int)
+	?HandleItemAddedL@CGlxCommandHandlerNewMedia@@MAEXHHPAVMGlxMediaList@@@Z @ 3 NONAME ; void CGlxCommandHandlerNewMedia::HandleItemAddedL(int, int, class MGlxMediaList *)
+	?ExecuteLD@CGlxCommandHandlerNewMedia@@QAEHAAVTGlxMediaId@@@Z @ 4 NONAME ; int CGlxCommandHandlerNewMedia::ExecuteLD(class TGlxMediaId &)
+	??1CGlxCommandHandlerFilterImagesOrVideos@@UAE@XZ @ 5 NONAME ; CGlxCommandHandlerFilterImagesOrVideos::~CGlxCommandHandlerFilterImagesOrVideos(void)
+	?NewL@CGlxCommandHandlerNewMedia@@SAPAV1@PAVMGlxMediaListProvider@@ABVTDesC16@@@Z @ 6 NONAME ; class CGlxCommandHandlerNewMedia * CGlxCommandHandlerNewMedia::NewL(class MGlxMediaListProvider *, class TDesC16 const &)
+	?NewL@CGlxCommandHandlerRemoveFrom@@SAPAV1@PAVMGlxMediaListProvider@@W4TMPXGeneralCategory@@ABVTDesC16@@@Z @ 7 NONAME ; class CGlxCommandHandlerRemoveFrom * CGlxCommandHandlerRemoveFrom::NewL(class MGlxMediaListProvider *, enum TMPXGeneralCategory, class TDesC16 const &)
+	??0CGlxMediaListAdaptor@@QAE@PBVMGlxMediaList@@H@Z @ 8 NONAME ; CGlxMediaListAdaptor::CGlxMediaListAdaptor(class MGlxMediaList const *, int)
+	?NewL@CGlxCommandHandlerUpload@@SAPAV1@PAVMGlxMediaListProvider@@H@Z @ 9 NONAME ; class CGlxCommandHandlerUpload * CGlxCommandHandlerUpload::NewL(class MGlxMediaListProvider *, int)
+	??1CGlxCommandHandlerUpload@@UAE@XZ @ 10 NONAME ; CGlxCommandHandlerUpload::~CGlxCommandHandlerUpload(void)
+	??1CGlxCommandHandlerNewMedia@@UAE@XZ @ 11 NONAME ; CGlxCommandHandlerNewMedia::~CGlxCommandHandlerNewMedia(void)
+	?NewL@CGlxCommandHandlerAiwPrintPreview@@SAPAV1@PAVMGlxMediaListProvider@@HABVTDesC16@@@Z @ 12 NONAME ; class CGlxCommandHandlerAiwPrintPreview * CGlxCommandHandlerAiwPrintPreview::NewL(class MGlxMediaListProvider *, int, class TDesC16 const &)
+	??1CGlxCommandHandlerSlideshow@@UAE@XZ @ 13 NONAME ; CGlxCommandHandlerSlideshow::~CGlxCommandHandlerSlideshow(void)
+	??1CGlxCommandHandlerSave@@UAE@XZ @ 14 NONAME ; CGlxCommandHandlerSave::~CGlxCommandHandlerSave(void)
+	?NewAddToFavCommandHandlerL@CGlxCommandHandlerAddToContainer@@SAPAV1@PAVMGlxMediaListProvider@@HABVTDesC16@@@Z @ 15 NONAME ; class CGlxCommandHandlerAddToContainer * CGlxCommandHandlerAddToContainer::NewAddToFavCommandHandlerL(class MGlxMediaListProvider *, int, class TDesC16 const &)
+	??1CGlxCommandHandlerAddToContainer@@UAE@XZ @ 16 NONAME ; CGlxCommandHandlerAddToContainer::~CGlxCommandHandlerAddToContainer(void)
+	??0CGlxMediaSelectionPopup@@QAE@XZ @ 17 NONAME ; CGlxMediaSelectionPopup::CGlxMediaSelectionPopup(void)
+	?NewL@CGlxCommandHandlerRotate@@SAPAV1@PAVMGlxMediaListProvider@@PAVMGlxLayoutOwner@@H@Z @ 18 NONAME ; class CGlxCommandHandlerRotate * CGlxCommandHandlerRotate::NewL(class MGlxMediaListProvider *, class MGlxLayoutOwner *, int)
+	?ExecuteLD@CGlxMediaSelectionPopup@@QAEPAVCMPXCollectionPath@@AAV2@AAHHHPAVCMPXMedia@@@Z @ 19 NONAME ; class CMPXCollectionPath * CGlxMediaSelectionPopup::ExecuteLD(class CMPXCollectionPath &, int &, int, int, class CMPXMedia *)
+	?NewL@CGlxCommandHandlerSend@@SAPAV1@PAVMGlxMediaListProvider@@HABVTDesC16@@@Z @ 20 NONAME ; class CGlxCommandHandlerSend * CGlxCommandHandlerSend::NewL(class MGlxMediaListProvider *, int, class TDesC16 const &)
+	?OkToExit@CGlxCommandHandlerNewMedia@@UBEHXZ @ 21 NONAME ; int CGlxCommandHandlerNewMedia::OkToExit(void) const
+	?NewL@CGlxCommandHandlerAddToContainer@@SAPAV1@PAVMGlxMediaListProvider@@HHABVTDesC16@@@Z @ 22 NONAME ; class CGlxCommandHandlerAddToContainer * CGlxCommandHandlerAddToContainer::NewL(class MGlxMediaListProvider *, int, int, class TDesC16 const &)
+	??1CGlxCommandHandlerBack@@UAE@XZ @ 23 NONAME ; CGlxCommandHandlerBack::~CGlxCommandHandlerBack(void)
+	?NewPreviousViewCommandHandlerL@CGlxCommandHandlerBack@@SAPAV1@PAVMGlxMediaListProvider@@@Z @ 24 NONAME ; class CGlxCommandHandlerBack * CGlxCommandHandlerBack::NewPreviousViewCommandHandlerL(class MGlxMediaListProvider *)
+	??1CGlxCommandHandlerCopyAndMove@@UAE@XZ @ 25 NONAME ; CGlxCommandHandlerCopyAndMove::~CGlxCommandHandlerCopyAndMove(void)
+	??1CGlxCommandHandlerAiwEdit@@UAE@XZ @ 26 NONAME ; CGlxCommandHandlerAiwEdit::~CGlxCommandHandlerAiwEdit(void)
+	?SetContainerId@CGlxCommandHandlerRemoveFrom@@QAEXVTGlxMediaId@@@Z @ 27 NONAME ; void CGlxCommandHandlerRemoveFrom::SetContainerId(class TGlxMediaId)
+	?NewL@CGlxCommandHandlerVideoPlayback@@SAPAV1@PAVMGlxMediaListProvider@@@Z @ 28 NONAME ; class CGlxCommandHandlerVideoPlayback * CGlxCommandHandlerVideoPlayback::NewL(class MGlxMediaListProvider *)
+	?MdcaCount@CGlxMediaListAdaptor@@UBEHXZ @ 29 NONAME ; int CGlxMediaListAdaptor::MdcaCount(void) const
+	??0TGlxHelpContext@@QAE@XZ @ 30 NONAME ; TGlxHelpContext::TGlxHelpContext(void)
+	??1CGlxCommandHandlerSortOrder@@UAE@XZ @ 31 NONAME ; CGlxCommandHandlerSortOrder::~CGlxCommandHandlerSortOrder(void)
+	?NewL@CGlxCommandHandlerFilterImagesOrVideos@@SAPAV1@PAVMGlxMediaListProvider@@@Z @ 32 NONAME ; class CGlxCommandHandlerFilterImagesOrVideos * CGlxCommandHandlerFilterImagesOrVideos::NewL(class MGlxMediaListProvider *)
+	??1CGlxCommandHandlerRemoveFrom@@UAE@XZ @ 33 NONAME ; CGlxCommandHandlerRemoveFrom::~CGlxCommandHandlerRemoveFrom(void)
+	?NewL@CGlxCommandHandlerAiwShowMapHardKey@@SAPAV1@PAVMGlxMediaListProvider@@H@Z @ 34 NONAME ; class CGlxCommandHandlerAiwShowMapHardKey * CGlxCommandHandlerAiwShowMapHardKey::NewL(class MGlxMediaListProvider *, int)
+	?NewL@CGlxCommandHandlerHideUi@@SAPAV1@XZ @ 35 NONAME ; class CGlxCommandHandlerHideUi * CGlxCommandHandlerHideUi::NewL(void)
+	??1CGlxCommandHandlerSend@@UAE@XZ @ 36 NONAME ; CGlxCommandHandlerSend::~CGlxCommandHandlerSend(void)
+	?NewL@CGlxCommandHandlerAiwShowMap@@SAPAV1@PAVMGlxMediaListProvider@@HABVTDesC16@@@Z @ 37 NONAME ; class CGlxCommandHandlerAiwShowMap * CGlxCommandHandlerAiwShowMap::NewL(class MGlxMediaListProvider *, int, class TDesC16 const &)
+	?NewL@CGlxCommandHandlerOpen@@SAPAV1@PAVMGlxMediaListProvider@@@Z @ 38 NONAME ; class CGlxCommandHandlerOpen * CGlxCommandHandlerOpen::NewL(class MGlxMediaListProvider *)
+	??1CGlxCommandHandlerDelete@@UAE@XZ @ 39 NONAME ; CGlxCommandHandlerDelete::~CGlxCommandHandlerDelete(void)
+	??1CGlxCommandHandlerDetails@@UAE@XZ @ 40 NONAME ; CGlxCommandHandlerDetails::~CGlxCommandHandlerDetails(void)
+	??1CGlxCommandHandlerDownload@@UAE@XZ @ 41 NONAME ; CGlxCommandHandlerDownload::~CGlxCommandHandlerDownload(void)
+	?NewAddToTagCommandHandlerL@CGlxCommandHandlerAddToContainer@@SAPAV1@PAVMGlxMediaListProvider@@HABVTDesC16@@@Z @ 42 NONAME ; class CGlxCommandHandlerAddToContainer * CGlxCommandHandlerAddToContainer::NewAddToTagCommandHandlerL(class MGlxMediaListProvider *, int, class TDesC16 const &)
+	?NewL@CGlxCommandHandlerSave@@SAPAV1@XZ @ 43 NONAME ; class CGlxCommandHandlerSave * CGlxCommandHandlerSave::NewL(void)
+	?NewL@CGlxCommandHandlerCopyAndMove@@SAPAV1@PAVMGlxMediaListProvider@@HABVTDesC16@@@Z @ 44 NONAME ; class CGlxCommandHandlerCopyAndMove * CGlxCommandHandlerCopyAndMove::NewL(class MGlxMediaListProvider *, int, class TDesC16 const &)
+	?NewL@CGlxCommandHandlerAiwEdit@@SAPAV1@PAVMGlxMediaListProvider@@@Z @ 45 NONAME ; class CGlxCommandHandlerAiwEdit * CGlxCommandHandlerAiwEdit::NewL(class MGlxMediaListProvider *)
+	?NewL@CGlxCommandHandlerDelete@@SAPAV1@PAVMGlxMediaListProvider@@HHABVTDesC16@@@Z @ 46 NONAME ; class CGlxCommandHandlerDelete * CGlxCommandHandlerDelete::NewL(class MGlxMediaListProvider *, int, int, class TDesC16 const &)
+	??1CGlxCommandHandlerOpen@@UAE@XZ @ 47 NONAME ; CGlxCommandHandlerOpen::~CGlxCommandHandlerOpen(void)
+	??1CGlxCommandHandlerRename@@UAE@XZ @ 48 NONAME ; CGlxCommandHandlerRename::~CGlxCommandHandlerRename(void)
+	??1CGlxCommandHandlerVideoPlayback@@UAE@XZ @ 49 NONAME ; CGlxCommandHandlerVideoPlayback::~CGlxCommandHandlerVideoPlayback(void)
+	?MdcaPoint@CGlxMediaListAdaptor@@UBE?AVTPtrC16@@H@Z @ 50 NONAME ; class TPtrC16 CGlxMediaListAdaptor::MdcaPoint(int) const
+	?NewAddToAlbumCommandHandlerL@CGlxCommandHandlerAddToContainer@@SAPAV1@PAVMGlxMediaListProvider@@HABVTDesC16@@@Z @ 51 NONAME ; class CGlxCommandHandlerAddToContainer * CGlxCommandHandlerAddToContainer::NewAddToAlbumCommandHandlerL(class MGlxMediaListProvider *, int, class TDesC16 const &)
+	?NewL@CGlxCommandHandlerDownload@@SAPAV1@XZ @ 52 NONAME ; class CGlxCommandHandlerDownload * CGlxCommandHandlerDownload::NewL(void)
+	?NewL@CGlxCommandHandlerDetails@@SAPAV1@PAVMGlxMediaListProvider@@ABVTDesC16@@@Z @ 53 NONAME ; class CGlxCommandHandlerDetails * CGlxCommandHandlerDetails::NewL(class MGlxMediaListProvider *, class TDesC16 const &)
+	??1CGlxCommandHandlerHelp@@UAE@XZ @ 54 NONAME ; CGlxCommandHandlerHelp::~CGlxCommandHandlerHelp(void)
+	?BypassFiltersForExecute@CGlxCommandHandlerNewMedia@@UBEHXZ @ 55 NONAME ; int CGlxCommandHandlerNewMedia::BypassFiltersForExecute(void) const
+	?NewL@CGlxCommandHandlerAiwShareOnOvi@@SAPAV1@PAVMGlxMediaListProvider@@HABVTDesC16@@@Z @ 56 NONAME ; class CGlxCommandHandlerAiwShareOnOvi * CGlxCommandHandlerAiwShareOnOvi::NewL(class MGlxMediaListProvider *, int, class TDesC16 const &)
+	?NewL@CGlxCommandHandlerSortOrder@@SAPAV1@PAVMGlxMediaListProvider@@K@Z @ 57 NONAME ; class CGlxCommandHandlerSortOrder * CGlxCommandHandlerSortOrder::NewL(class MGlxMediaListProvider *, unsigned long)
+	?NewL@CGlxCommandHandlerSlideshow@@SAPAV1@PAVMGlxMediaListProvider@@HHABVTDesC16@@@Z @ 58 NONAME ; class CGlxCommandHandlerSlideshow * CGlxCommandHandlerSlideshow::NewL(class MGlxMediaListProvider *, int, int, class TDesC16 const &)
+	?NewBackCommandHandlerL@CGlxCommandHandlerBack@@SAPAV1@XZ @ 59 NONAME ; class CGlxCommandHandlerBack * CGlxCommandHandlerBack::NewBackCommandHandlerL(void)
+	?NewL@CGlxCommandHandlerRename@@SAPAV1@PAVMGlxMediaListProvider@@HABVTDesC16@@@Z @ 60 NONAME ; class CGlxCommandHandlerRename * CGlxCommandHandlerRename::NewL(class MGlxMediaListProvider *, int, class TDesC16 const &)
+	?NewContainerPreviousViewCommandHandlerL@CGlxCommandHandlerBack@@SAPAV1@PAVMGlxMediaListProvider@@H@Z @ 61 NONAME ; class CGlxCommandHandlerBack * CGlxCommandHandlerBack::NewContainerPreviousViewCommandHandlerL(class MGlxMediaListProvider *, int)
 
--- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/eabi/glxcommoncommandhandlersu.def	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/eabi/glxcommoncommandhandlersu.def	Wed Jun 09 09:41:51 2010 +0300
@@ -42,7 +42,7 @@
 	_ZN24CGlxCommandHandlerUploadD0Ev @ 41 NONAME
 	_ZN24CGlxCommandHandlerUploadD1Ev @ 42 NONAME
 	_ZN24CGlxCommandHandlerUploadD2Ev @ 43 NONAME
-	_ZN25CGlxCommandHandlerAiwEdit4NewLEP21MGlxMediaListProvideri @ 44 NONAME
+	_ZN25CGlxCommandHandlerAiwEdit4NewLEP21MGlxMediaListProvider @ 44 NONAME
 	_ZN25CGlxCommandHandlerAiwEditD0Ev @ 45 NONAME
 	_ZN25CGlxCommandHandlerAiwEditD1Ev @ 46 NONAME
 	_ZN25CGlxCommandHandlerAiwEditD2Ev @ 47 NONAME
@@ -87,23 +87,21 @@
 	_ZN32CGlxCommandHandlerAddToContainer26NewAddToFavCommandHandlerLEP21MGlxMediaListProvideriRK7TDesC16 @ 86 NONAME
 	_ZN32CGlxCommandHandlerAddToContainer26NewAddToTagCommandHandlerLEP21MGlxMediaListProvideriRK7TDesC16 @ 87 NONAME
 	_ZN32CGlxCommandHandlerAddToContainer28NewAddToAlbumCommandHandlerLEP21MGlxMediaListProvideriRK7TDesC16 @ 88 NONAME
-	_ZN32CGlxCommandHandlerAddToContainer37NewAddToTagSingleClickCommandHandlerLEP21MGlxMediaListProvideriRK7TDesC16 @ 89 NONAME
-	_ZN32CGlxCommandHandlerAddToContainer39NewAddToAlbumSingleClickCommandHandlerLEP21MGlxMediaListProvideriRK7TDesC16 @ 90 NONAME
-	_ZN32CGlxCommandHandlerAddToContainer4NewLEP21MGlxMediaListProvideriiRK7TDesC16 @ 91 NONAME
-	_ZN32CGlxCommandHandlerAddToContainerD0Ev @ 92 NONAME
-	_ZN32CGlxCommandHandlerAddToContainerD1Ev @ 93 NONAME
-	_ZN32CGlxCommandHandlerAddToContainerD2Ev @ 94 NONAME
-	_ZN33CGlxCommandHandlerAiwPrintPreview4NewLEP21MGlxMediaListProvideriRK7TDesC16 @ 95 NONAME
-	_ZN35CGlxCommandHandlerAiwShowMapHardKey4NewLEP21MGlxMediaListProvideri @ 96 NONAME
-	_ZN38CGlxCommandHandlerFilterImagesOrVideos4NewLEP21MGlxMediaListProvider @ 97 NONAME
-	_ZN38CGlxCommandHandlerFilterImagesOrVideosD0Ev @ 98 NONAME
-	_ZN38CGlxCommandHandlerFilterImagesOrVideosD1Ev @ 99 NONAME
-	_ZN38CGlxCommandHandlerFilterImagesOrVideosD2Ev @ 100 NONAME
-	_ZNK20CGlxMediaListAdaptor9MdcaCountEv @ 101 NONAME
-	_ZNK20CGlxMediaListAdaptor9MdcaPointEi @ 102 NONAME
-	_ZNK26CGlxCommandHandlerNewMedia23BypassFiltersForExecuteEv @ 103 NONAME
-	_ZNK26CGlxCommandHandlerNewMedia8OkToExitEv @ 104 NONAME
-	_ZThn48_N26CGlxCommandHandlerNewMedia16HandleItemAddedLEiiP13MGlxMediaList @ 105 NONAME
-	_ZThn4_NK20CGlxMediaListAdaptor9MdcaCountEv @ 106 NONAME
-	_ZThn4_NK20CGlxMediaListAdaptor9MdcaPointEi @ 107 NONAME
+	_ZN32CGlxCommandHandlerAddToContainer4NewLEP21MGlxMediaListProvideriiRK7TDesC16 @ 89 NONAME
+	_ZN32CGlxCommandHandlerAddToContainerD0Ev @ 90 NONAME
+	_ZN32CGlxCommandHandlerAddToContainerD1Ev @ 91 NONAME
+	_ZN32CGlxCommandHandlerAddToContainerD2Ev @ 92 NONAME
+	_ZN33CGlxCommandHandlerAiwPrintPreview4NewLEP21MGlxMediaListProvideriRK7TDesC16 @ 93 NONAME
+	_ZN35CGlxCommandHandlerAiwShowMapHardKey4NewLEP21MGlxMediaListProvideri @ 94 NONAME
+	_ZN38CGlxCommandHandlerFilterImagesOrVideos4NewLEP21MGlxMediaListProvider @ 95 NONAME
+	_ZN38CGlxCommandHandlerFilterImagesOrVideosD0Ev @ 96 NONAME
+	_ZN38CGlxCommandHandlerFilterImagesOrVideosD1Ev @ 97 NONAME
+	_ZN38CGlxCommandHandlerFilterImagesOrVideosD2Ev @ 98 NONAME
+	_ZNK20CGlxMediaListAdaptor9MdcaCountEv @ 99 NONAME
+	_ZNK20CGlxMediaListAdaptor9MdcaPointEi @ 100 NONAME
+	_ZNK26CGlxCommandHandlerNewMedia23BypassFiltersForExecuteEv @ 101 NONAME
+	_ZNK26CGlxCommandHandlerNewMedia8OkToExitEv @ 102 NONAME
+	_ZThn48_N26CGlxCommandHandlerNewMedia16HandleItemAddedLEiiP13MGlxMediaList @ 103 NONAME
+	_ZThn4_NK20CGlxMediaListAdaptor9MdcaCountEv @ 104 NONAME
+	_ZThn4_NK20CGlxMediaListAdaptor9MdcaPointEi @ 105 NONAME
 
--- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/inc/glxcommandhandleraddtocontainer.h	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/inc/glxcommandhandleraddtocontainer.h	Wed Jun 09 09:41:51 2010 +0300
@@ -47,16 +47,6 @@
 					MGlxMediaListProvider* aMediaListProvider,
 					TBool aHasToolbarItem, const TDesC& aFileName);
 
-	/** 
-	 * Create add to album command handler for singleclick
-	 * @param aMediaListProvider object that provides the media list.
-     * @param aFileName resource file
-	 */
-	IMPORT_C static CGlxCommandHandlerAddToContainer
-			* NewAddToAlbumSingleClickCommandHandlerL(
-					MGlxMediaListProvider* aMediaListProvider,
-					TBool aHasToolbarItem, const TDesC& aFileName);
-
      /** 
 	 * Create add (to) tags command handler 
 	 * @param aMediaListProvider object that provides the media list.
@@ -67,16 +57,6 @@
 					MGlxMediaListProvider* aMediaListProvider,
 					TBool aHasToolbarItem, const TDesC& aFileName);
 
-     /** 
-	 * Create add (to) tags command handler for singleclick
-	 * @param aMediaListProvider object that provides the media list.
-     * @param aFileName resource file
-	 */
-	IMPORT_C static CGlxCommandHandlerAddToContainer
-			* NewAddToTagSingleClickCommandHandlerL(
-					MGlxMediaListProvider* aMediaListProvider,
-					TBool aHasToolbarItem, const TDesC& aFileName);
-
     /** 
 	 * Create add (to) Favourites command handler 
 	 * @param aMediaListProvider object that provides the media list.
--- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/inc/glxcommandhandleraiwedit.h	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/inc/glxcommandhandleraiwedit.h	Wed Jun 09 09:41:51 2010 +0300
@@ -45,13 +45,12 @@
     /**
      * Two-phase constructor
      * @param aMediaListProvider object that provides the media list
-     * @param aCommandSingleClick Flag to identify single click command
      * @return Fully constructed command handler
      * @warning ConstructL of base class is called. If ConstructL is 
      *          implemented in this class, then care must be taken to call 
      *          CGlxCommandHandlerAiwBase::ConstructL
      */
-    IMPORT_C static CGlxCommandHandlerAiwEdit* NewL(MGlxMediaListProvider* aMediaListProvider, TBool aCommandSingleClick=EFalse);        
+    IMPORT_C static CGlxCommandHandlerAiwEdit* NewL(MGlxMediaListProvider* aMediaListProvider);        
 
     /**
      * Destructor
@@ -67,9 +66,8 @@
     /**
      * Constructor
      * @param aMediaListProvider object that provides the media list
-     * @param aCommandSingleClick Flag to identify single click command
      */
-    CGlxCommandHandlerAiwEdit( MGlxMediaListProvider* aMediaListProvider, TBool aCommandSingleClick);
+    CGlxCommandHandlerAiwEdit( MGlxMediaListProvider* aMediaListProvider);
     
     /*
      * return if the viewing mode is fullscreen or grid
@@ -88,11 +86,12 @@
      // Owned - AIW Service Handler
     CAiwServiceHandler* iServiceHandler;    
     
-     //Edit Supported
-    TBool iEditSupported;
+    //Is ImageEdit supported
+    TBool iIsImageEditSupported;
     
-    TBool iCommandSingleClick;
-    
+    //Is VideoEdit supported
+    TBool iIsVideoEditSupported;
+       
     // Not own
     CGlxImageViewerManager* iImageViewerInstance;
     
--- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/inc/glxcommandhandlerremovefrom.h	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/inc/glxcommandhandlerremovefrom.h	Wed Jun 09 09:41:51 2010 +0300
@@ -76,9 +76,6 @@
     /** See @ref CGlxCommandHandler::DoActivateL */
     void DoActivateL(TInt /*aViewId*/);
     
-	/** See @ref CGlxCommandHandler::DoIsDisabled*/ 
-    TBool DoIsDisabled(TInt aCommandId, MGlxMediaList& aList) const;
-
 private:
     /** Second phase constructor */
 	void ConstructL(const TDesC& aFileName);
--- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/inc/glxcommandhandlervideoplayback.h	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/inc/glxcommandhandlervideoplayback.h	Wed Jun 09 09:41:51 2010 +0300
@@ -129,20 +129,6 @@
     void DoHandlePlaybackMessageL( const CMPXMessage& aMessage ); 
  
     void HandlePlaybackPlayerChangedL(); 
-    
-    /**
-	 *  Provides the static function for the callback to 
-	 *  finish the MMPXPlaybackUtility construction
-	 *  Called by CPeriodic iConstructTimer
-	 *  @param aPtr Pointer to callback class
-	 *  @return KErrNone
-	 */
-	static TInt LateConstructCallback( TAny* aPtr );
-	
-	/**
-	 *  Called to finalize the MMPXPlaybackUtility construction.
-	 */
-	virtual void DoLateConstruct();
 	
 	/**
 	 *  Retrieves playback utility and creates it if needed
@@ -167,12 +153,7 @@
     
     MMPXPlaybackUtility*   iPlaybackUtility; 
     MMPXViewUtility*       iViewUtility; 
-    
-    /**
-	 * For Late construction of 'MMPXPlaybackUtility'.
-	 */
-	CPeriodic* iPbUtilityConstructTimer;
-        
+
  	};
 
 #endif // C_GLXCOMMANDHANDLERVIDEOPLAYBACK_H
--- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandleraddtocontainer.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandleraddtocontainer.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -67,20 +67,6 @@
 	}
 
 // ---------------------------------------------------------------------------
-// Return add to album command handler for singleclick options menu
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CGlxCommandHandlerAddToContainer*
-CGlxCommandHandlerAddToContainer::NewAddToAlbumSingleClickCommandHandlerL(
-		MGlxMediaListProvider* aMediaListProvider, TBool aHasToolbarItem,
-		const TDesC& aFileName)
-	{
-	return CGlxCommandHandlerAddToContainer::NewL(aMediaListProvider,
-			EGlxCmdSingleClickAddToAlbum, aHasToolbarItem, aFileName);
-	}
-
-
-// ---------------------------------------------------------------------------
 // Return add (to) tags command handler
 // ---------------------------------------------------------------------------
 //
@@ -95,20 +81,6 @@
 	}
 
 // ---------------------------------------------------------------------------
-// Return add (to) tags command handler for singleclick option menu
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CGlxCommandHandlerAddToContainer*
-CGlxCommandHandlerAddToContainer::NewAddToTagSingleClickCommandHandlerL(
-		MGlxMediaListProvider* aMediaListProvider, TBool aHasToolbarItem,
-		const TDesC& aFileName)
-	{
-	return CGlxCommandHandlerAddToContainer::NewL(aMediaListProvider,
-			EGlxCmdSingleClickAddTag, aHasToolbarItem, aFileName);
-	}
-
-
-// ---------------------------------------------------------------------------
 // Return add (to) Favourites command handler
 // ---------------------------------------------------------------------------
 //
@@ -223,7 +195,6 @@
             break;
             }
         case EGlxCmdAddToAlbum:
-        case EGlxCmdSingleClickAddToAlbum:
             {
             enablePopup = ETrue;
             targetCollection->AppendL(KGlxCollectionPluginAlbumsImplementationUid);
@@ -232,7 +203,6 @@
             break;
             }
         case EGlxCmdAddTag:
-        case EGlxCmdSingleClickAddTag:
             {
             enableMultipleSelection = ETrue;
             enablePopup = ETrue;
@@ -291,8 +261,7 @@
 HBufC* CGlxCommandHandlerAddToContainer::CompletionTextL() const
     {
     TRACER("CGlxCommandHandlerAddToContainer::CompletionTextL()");
-    if (iCommandId == EGlxCmdAddToAlbum || 
-        iCommandId == EGlxCmdSingleClickAddToAlbum )
+    if (iCommandId == EGlxCmdAddToAlbum)
     	{
    		if (iSelectionCount > 1)
    			{
@@ -300,8 +269,7 @@
    			}
    		return StringLoader::LoadL(R_GLX_COMPLETION_ADD_TO_CONTAINER_ONE_ITEM_ALBUM);
     	}
-   	else if (iCommandId == EGlxCmdAddTag || 
-             iCommandId == EGlxCmdSingleClickAddTag)
+   	else if (iCommandId == EGlxCmdAddTag)
    		{
    		if (iSelectionCount > 1)
    			{
@@ -369,17 +337,10 @@
                                                  MGlxMediaList& aList) const
     {
 	TRACER("CGlxCommandHandlerAddToContainer::DoIsDisabled");
-    if ( (EGlxCmdSingleClickAddToAlbum==aCommandId || 
-          EGlxCmdSingleClickAddTag == aCommandId) && 
-          aList.SelectionCount() > 0 )
-        {   
-        return EFalse;
-        }
-    else if (EGlxCmdAddToAlbum==aCommandId || EGlxCmdAddTag == aCommandId)
+	if (EGlxCmdAddToAlbum==aCommandId || EGlxCmdAddTag == aCommandId)
         {
         return EFalse;
         }
-
     return ETrue;
     }
-
+// End of File
--- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandleraiwedit.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandleraiwedit.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -44,10 +44,10 @@
 // -----------------------------------------------------------------------------
 //	
 EXPORT_C CGlxCommandHandlerAiwEdit* CGlxCommandHandlerAiwEdit::NewL(
-        MGlxMediaListProvider* aMediaListProvider, TBool aCommandSingleClick)
+        MGlxMediaListProvider* aMediaListProvider)
     {
     CGlxCommandHandlerAiwEdit* self = new (ELeave) CGlxCommandHandlerAiwEdit(
-            aMediaListProvider, aCommandSingleClick);
+            aMediaListProvider);
     CleanupStack::PushL(self);
     self->ConstructL();
     CleanupStack::Pop(self);
@@ -77,28 +77,28 @@
     CFeatureDiscovery* featManager = CFeatureDiscovery::NewL();
     CleanupStack::PushL(featManager);
     
-    if(featManager->IsFeatureSupportedL(KFeatureIdFfImageEditor)
-       && featManager->IsFeatureSupportedL(KFeatureIdFfVideoEditor))
+    if(featManager->IsFeatureSupportedL(KFeatureIdFfImageEditor))
+        {
+        iIsImageEditSupported = ETrue;
+        }
+    
+    if(featManager->IsFeatureSupportedL(KFeatureIdFfVideoEditor))
+        {
+        iIsVideoEditSupported = ETrue;
+        }
+      
+    if(iIsVideoEditSupported || iIsImageEditSupported)
         {
         TRAP_IGNORE(
                     {
                     iServiceHandler = CAiwServiceHandler::NewL();
                     iServiceHandler->AttachL( R_GLX_AIW_EDIT_INTEREST );
-                    iEditSupported = ETrue;
                     });
         }
     CleanupStack::PopAndDestroy(featManager);
 
-    if (iCommandSingleClick)
-        {
-        TCommandInfo info(EGlxCmdAiwSingleClickEdit);
-        AddCommandL(info);
-        }
-    else
-        {
-        TCommandInfo info(EGlxCmdAiwEdit);
-        AddCommandL(info);
-        }
+    TCommandInfo info(EGlxCmdAiwEdit);
+    AddCommandL(info);
 
     iImageViewerInstance = CGlxImageViewerManager::InstanceL();   
     
@@ -110,9 +110,8 @@
 // -----------------------------------------------------------------------------
 //
 CGlxCommandHandlerAiwEdit::CGlxCommandHandlerAiwEdit(
-        MGlxMediaListProvider* aMediaListProvider, TBool aCommandSingleClick) :
-    CGlxMediaListCommandHandler(aMediaListProvider), iCommandSingleClick(
-            aCommandSingleClick)
+        MGlxMediaListProvider* aMediaListProvider) :
+    CGlxMediaListCommandHandler(aMediaListProvider)
     {
     // Do Nothing
     }
@@ -137,25 +136,32 @@
     if (aMenuPane)
         {
         MGlxMediaList& mediaList = MediaList();
-        TInt pos;
-        //If stylus menu is present, hide it for multiple selection
-        if (iCommandSingleClick && aMenuPane->MenuItemExists(
-                EGlxCmdAiwSingleClickEdit, pos)
-
-                && (((!mediaList.Count()) || (mediaList.SelectionCount() > 1))
-                        || !iEditSupported))
+        TInt pos = 0;
+        
+        TBool editSupported = EFalse;
+        TGlxSelectionIterator iterator;
+        iterator.SetToFirst(&mediaList);
+        TInt index = iterator++;
+        if ( index != KErrNotFound )
             {
-            aMenuPane->SetItemDimmed(EGlxCmdAiwSingleClickEdit, ETrue);
+            TMPXGeneralCategory cat = mediaList.Item(index).Category();
+            
+            if ( cat == EMPXImage && iIsImageEditSupported)
+                {
+                editSupported = ETrue;
+                }
+            else if ( cat == EMPXVideo && iIsVideoEditSupported)
+                {
+                editSupported = ETrue;
+                }
             }
-        //For Edit menu item present in Options CBA 
-        else if (aMenuPane->MenuItemExists(EGlxCmdAiwEdit, pos))
+        if (aMenuPane->MenuItemExists(EGlxCmdAiwEdit, pos))
             {
             // 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
-                            && !iIsFullScreenMode))
-                    || !iEditSupported)
+            // selection is greater than 1, we should hide Edit menu item 
+            if (iImageViewerInstance->IsPrivate()
+                    || ((!mediaList.Count() || (mediaList.SelectionCount() > 1))
+                    || !editSupported))
                 {
                 aMenuPane->SetItemDimmed(EGlxCmdAiwEdit, ETrue);
                 }
@@ -171,8 +177,8 @@
         MGlxMediaList& aList)
     {
     TBool handled = EFalse;
-    if (iEditSupported && (EGlxCmdAiwEdit == aCommandId
-            || EGlxCmdAiwSingleClickEdit == aCommandId))
+    if ((iIsImageEditSupported || iIsVideoEditSupported)
+                    && (EGlxCmdAiwEdit == aCommandId))
         {
         CAiwGenericParamList& inputParams = iServiceHandler->InParamListL();
 
--- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlerback.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlerback.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -36,11 +36,7 @@
 #include <glxtracer.h>
 #include <glxlog.h>
 #include <glxnavigationalstate.h>
-#include <glxcollectionplugincamera.hrh>
-#include <glxcollectionplugindownloads.hrh>
 #include <glxcollectionpluginalbums.hrh>
-#include <glxcollectionpluginmonths.hrh>
-#include <glxcollectionplugintags.hrh>
 #include <glxcollectionpluginimageviewer.hrh>
 #include <glxgallery.hrh>
 
--- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlerdelete.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlerdelete.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -89,11 +89,6 @@
 	info.iMinSelectionLength = 1;
 	info.iDisallowSystemItems = aIsContainerList;
 	AddCommandL(info);
-
-	TCommandInfo singleclkinfo(EGlxCmdSingleClickDelete);
-	singleclkinfo.iMinSelectionLength = 1;
-	singleclkinfo.iDisallowSystemItems = aIsContainerList;
-	AddCommandL(singleclkinfo);
 	}
 
 // ---------------------------------------------------------------------------
@@ -246,13 +241,7 @@
 		                                 !fullscreenViewingMode)
             {   
             return ETrue;
-            }
-        
-        if (EGlxCmdSingleClickDelete==aCommandId && 0 == aList.SelectionCount())
-            {
-            return ETrue;
-            }
-        
+            }     
         return EFalse;
         }
 //end of file
--- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlerremovefrom.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlerremovefrom.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -78,11 +78,6 @@
 	info.iMinSelectionLength = 1;
 	info.iMaxSelectionLength = KMaxTInt;
 	AddCommandL(info);
-
-	TCommandInfo singleclickinfo(EGlxCmdSingleClickRemoveFrom);
-	singleclickinfo.iMinSelectionLength = 1;
-	singleclickinfo.iMaxSelectionLength = KMaxTInt;
-	AddCommandL(singleclickinfo);
 	}
 
 // ---------------------------------------------------------------------------
@@ -174,18 +169,5 @@
 		
  	}
 
-// ---------------------------------------------------------------------------
-// CGlxCommandHandlerRemoveFrom::DoIsDisabled
-// ---------------------------------------------------------------------------
-//
-TBool CGlxCommandHandlerRemoveFrom::DoIsDisabled(TInt aCommandId, 
-                                                 MGlxMediaList& aList) const
-    {
-    if (aCommandId == EGlxCmdSingleClickRemoveFrom && 
-                                  aList.SelectionCount()== 0)
-        {
-        return ETrue;
-        }
-    
-    return EFalse;
-    }
+
+// End of File
--- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlersend.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlersend.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -104,11 +104,6 @@
 	info.iMinSelectionLength = 1;
 	info.iMaxSelectionLength = KMaxTInt;
 	AddCommandL(info);
-
-	TCommandInfo singleclickinfo(EGlxCmdSingleClickSend);
-	singleclickinfo.iMinSelectionLength = 1;
-	singleclickinfo.iMaxSelectionLength = KMaxTInt;
-	AddCommandL(singleclickinfo);
 	}	
 	
 
@@ -140,7 +135,7 @@
 	{
     GLX_FUNC("CGlxCommandHandlerSend::DoExecuteL");
 	
-    if (aCommandId == EGlxCmdSend || aCommandId == EGlxCmdSingleClickSend)
+    if (aCommandId == EGlxCmdSend)
         {
         SendSelectedItemsL();
         return ETrue;
@@ -408,17 +403,10 @@
                                            MGlxMediaList& aList) const
     {
     GLX_FUNC("CGlxCommandHandlerSend::DoIsDisabled");
-    if ( (EGlxCmdSingleClickSend == aCommandId || EGlxCmdSend==aCommandId) &&
-         aList.SelectionCount() )
-        {
-        return EFalse;
-        }
-    
     if (EGlxCmdSend == aCommandId && aList.Count())
         {
         return EFalse;
-        }
-    
+        } 
     return ETrue;
     }
 
--- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlervideoplayback.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlervideoplayback.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -54,13 +54,6 @@
 
 const TUid KVideoHelixPlaybackPluginUid = { 0x10282551 };
 
-/**
- * Periodic interval for late construction.
- * GridView construction would take about 2 sec,
- * hence this can happen only after 2 secs 
- */
-const TTimeIntervalMicroSeconds32 KPeriodicInterval  = 2000000; // 2 sec
-
 #include "glxcommandfactory.h"
 
 // ---------------------------------------------------------------------------
@@ -99,12 +92,6 @@
     iUiUtility = CGlxUiUtility::UtilityL();
      
     iViewUtility = MMPXViewUtility::UtilityL(); 
-
-    //Start construct timer for late initialization of "MMPXPlaybackUtility"
-    TCallBack callback(
-            CGlxCommandHandlerVideoPlayback::LateConstructCallback, this);
-    iPbUtilityConstructTimer = CPeriodic::NewL(CActive::EPriorityIdle);
-    iPbUtilityConstructTimer->Start(KPeriodicInterval, 0, callback);
     
    	// Add supported commands
    	// Play videoplayback
@@ -132,12 +119,6 @@
         { 
         iViewUtility->Close(); 
         } 
-
-    if (iPbUtilityConstructTimer)
-        {
-        iPbUtilityConstructTimer->Cancel();
-        delete iPbUtilityConstructTimer;
-        }
     
     if ( iPlaybackUtility ) 
         { 
@@ -477,28 +458,6 @@
     } 
 
 // -----------------------------------------------------------------------------
-// CGlxCommandHandlerVideoPlayback::LateConstructCallback
-// -----------------------------------------------------------------------------
-TInt CGlxCommandHandlerVideoPlayback::LateConstructCallback(TAny* aPtr)
-    {
-    TRACER("CGlxCommandHandlerVideoPlayback::LateConstructCallback");
-    static_cast<CGlxCommandHandlerVideoPlayback*>(aPtr)->DoLateConstruct();
-    return KErrNone;
-    }
-
-// -----------------------------------------------------------------------------
-// CGlxCommandHandlerVideoPlayback::DoLateConstruct
-// -----------------------------------------------------------------------------
-void CGlxCommandHandlerVideoPlayback::DoLateConstruct()
-    {
-    TRACER("CGlxCommandHandlerVideoPlayback::DoLateConstruct");
-    //Cancel the periodic timer
-    iPbUtilityConstructTimer->Cancel();
-    //Start 'MMPXPlaybackUtility' construction
-    TRAP_IGNORE( PlaybackUtilityL());
-    }
-
-// -----------------------------------------------------------------------------
 // CGlxCommandHandlerVideoPlayback::PlaybackUtilityL
 // -----------------------------------------------------------------------------
 void CGlxCommandHandlerVideoPlayback::PlaybackUtilityL()
--- a/photosgallery/viewframework/commandhandlers/inc/glxcommandhandlers.hrh	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/commandhandlers/inc/glxcommandhandlers.hrh	Wed Jun 09 09:41:51 2010 +0300
@@ -91,12 +91,6 @@
     EGlxCmdRemoveFromFavourites,
     KGlxCmdMnShowMap,
     EGlxCmdSave,
-    EGlxCmdSingleClickAddToAlbum,
-    EGlxCmdSingleClickAddTag,
-    EGlxCmdSingleClickDelete,
-    EGlxCmdSingleClickSend,
-    EGlxCmdAiwSingleClickEdit,
-    EGlxCmdSingleClickRemoveFrom,
     EGlxCmdRenameCompleted, 
     EGlxCmdDialogLaunched,
     EGlxCmdAiwBase = 0x6000
--- a/photosgallery/viewframework/dataprovider/src/glxmuliconprovider.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/dataprovider/src/glxmuliconprovider.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -352,7 +352,7 @@
     {
     TRACER("CGlxMulVideoIconProvider::IconIdL");
         
-    if((aMedia.Category() == EMPXVideo) && (GlxErrorManager::HasAttributeErrorL(aMedia.Properties(), KGlxMediaIdThumbnail ) == KErrNone))
+    if(aMedia.Category() == EMPXVideo)
         {
 		if (iIsFullscreen)
             {                       	        	
--- a/photosgallery/viewframework/dataprovider/src/glxmulmodelproviderbase.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/dataprovider/src/glxmulmodelproviderbase.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -445,20 +445,8 @@
         }
     else if (UString(KCoverFlowWidget) == UString(iWidget.widgetName() ) )
         {
-        index = iModel->Highlight();
-        // Check if Model count is zero in FS view, activate back grid view.
-        if (iModel->Count() ==0)
-            {
-            // 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() );            
-            }
-        }
+      	index = iModel->Highlight();
+	    }
     else
         {
         return KErrGeneral;
--- a/photosgallery/viewframework/dataprovider/src/glxthumbnailvarianttype.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/dataprovider/src/glxthumbnailvarianttype.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -122,9 +122,20 @@
     if ( aIsFocused && frameCount > 1 && (fsTnmAvailable) )
         {
         GLX_DEBUG1("GlxThumbnailVariantType::CreateAnimatedGifTextureL");
-        TRAP( err, mTextureId = iUiUtility->GlxTextureManager().
-            CreateAnimatedGifTextureL( uri, aSize, aMedia, 
-                                       aMedia.IdSpaceId() ).Id() );
+
+        // If the image is DRM gif, we'll not animate.
+        // Only display the 1st frame. Otherwise animate for normal gif.
+        if (drm)
+            {
+            TRAP( err, mTextureId = iUiUtility->GlxTextureManager().CreateThumbnailTextureL(
+                            aMedia, aMedia.IdSpaceId(), aSize, this ).Id() );
+            }
+        else
+            {
+            TRAP( err, mTextureId = iUiUtility->GlxTextureManager().
+                    CreateAnimatedGifTextureL( uri, aSize, aMedia,
+                            aMedia.IdSpaceId() ).Id() );
+            }
         }
     //URI length could be zero for Media Id based Thumbnail fetch
     else if ( fsTnmAvailable ) 
@@ -200,6 +211,18 @@
         TRAP( err, mTextureId = iUiUtility->GlxTextureManager().CreateIconTextureL( 
     	    icon.bitmapId, resFile, defaultSize ).Id() );
         }
+    else if (KErrNone != thumbnailError && aMedia.Category() == EMPXVideo)
+        {
+        //show larger (twice) default icon for videos, which has errors
+        TSize newSize = defaultSize;
+        newSize += defaultSize;
+        GLX_DEBUG1(
+                "GlxThumbnailVariantType::CreateThumbnailTextureL::Default (video)");
+        TRAP(err, mTextureId
+                = iUiUtility->GlxTextureManager().CreateIconTextureL(
+                        EMbmGlxiconsQgn_prop_image_notcreated, resFile,
+                        newSize).Id());
+        }
     else if( drm && isValid == EGlxDrmRightsInvalid )
     	{
 		//show default image for DRM expired images
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/photosgallery/viewframework/inc/mglxhdmidecoderobserver.h	Wed Jun 09 09:41:51 2010 +0300
@@ -0,0 +1,44 @@
+/*
+* 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:    HDMI Image Decoder Observer
+*
+*/
+
+#ifndef M_GLXHDMIDECODEROBSERVER_H
+#define M_GLXHDMIDECODEROBSERVER_H
+
+/** The HDMI Decoding status notifications */
+enum THdmiDecodingStatus
+    {
+    EHdmiConnected = 0,
+    EHdmiDecodingStarted, //in case Decoding started or HDMI is connected in b/w SlideShow 
+    EHdmiDecodingFirstCompleted,
+    EHdmiDecodingCompleted, //HDMI image decoding completed
+    EHdmiDisconnected //in case HDMI is disconnected in b/w Slideshow
+    };
+
+/**
+ * Class that observes HDMI Image Decoding status
+ */
+NONSHARABLE_CLASS(MGlxHDMIDecoderObserver)
+    {
+public:     
+    /*
+     * Handle notification of HDMI Image Decoder.
+     */    
+    virtual void HandleHDMIDecodingEventL(THdmiDecodingStatus aStatus) = 0;
+    };
+
+
+#endif // M_GLXHDMIDECODEROBSERVER_H
--- a/photosgallery/viewframework/medialists/inc/glxmedialist.h	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/medialists/inc/glxmedialist.h	Wed Jun 09 09:41:51 2010 +0300
@@ -402,6 +402,11 @@
      * Handles the tasks after open completes
      */
     void HandleOpenL();
+    
+    /*
+     * Reopens Medialist after callback timeout.
+     */
+    static TInt TimeOut(TAny* aSelf);
 
 private:
     /** 
@@ -512,6 +517,10 @@
     
     /// VisibleWindow Index 
     TInt iVisibleWindowIndex;
+    
+    /// Periodic Timer
+    CPeriodic* iBatchOperationMonitorTimer;
+    
     };
 
 #endif // C_GLXMEDIALIST_H
--- a/photosgallery/viewframework/medialists/src/glxmedialist.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/medialists/src/glxmedialist.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -49,6 +49,10 @@
  * Maximum items count for minimum wait interval.
  */
 const TInt KMaxItemsCount = 500;
+/**
+ * Time between Callbacks to determine a batch delete operation.
+ */
+const TInt KCallbackInterval = 200000;
 
 namespace NGlxMediaList
     {
@@ -1105,8 +1109,20 @@
 
                     // Drop through to perform sync, in case the order has changed
                     }
+                case EMPXItemDeleted:
+                	{
+                	GLX_LOG_INFO("CGlxMediaList::HandleCollectionMessageL() EMPXItemDeleted");
+                	if(iBatchOperationMonitorTimer && !iCommandPending)
+                		{
+						if(iBatchOperationMonitorTimer->IsActive())
+							{
+							iBatchOperationMonitorTimer->Cancel();
+							}
+						iBatchOperationMonitorTimer->Start(KCallbackInterval,KCallbackInterval,TCallBack( TimeOut,this ));
+						}
+                	break;
+                	}
                 case EMPXItemInserted:
-                case EMPXItemDeleted:
                 default:
                     // Items have changed, determine whether to sync now
                     // or resync later if a sync is already pending after opening
@@ -1282,7 +1298,15 @@
 		{
 		iManager->HandleListDeleted( this );
 		iManager->Close();
-		}    
+		}
+	if(iBatchOperationMonitorTimer)
+		{
+		if(iBatchOperationMonitorTimer->IsActive())
+			{
+			iBatchOperationMonitorTimer->Cancel();			
+			}
+		delete iBatchOperationMonitorTimer;
+		}
     }
 
 // -----------------------------------------------------------------------------
@@ -1300,6 +1324,7 @@
     iCountAttributes.AppendL(KGlxMediaCollectionPluginSpecificSubTitle);
     iCountAttributes.AppendL(KGlxMediaGeneralSlideshowableContent);
     iCountAttributes.AppendL(KMPXMediaGeneralCount);
+    iBatchOperationMonitorTimer = CPeriodic::NewL( CActive::EPriorityStandard );
     }
 
 // -----------------------------------------------------------------------------
@@ -1890,3 +1915,35 @@
     // Place a new request for the item in focus, to fetch the media attributes
     iManager->CancelPreviousRequest();
     }
+
+// ---------------------------------------------------------------------------
+// TimeOut
+// ---------------------------------------------------------------------------
+//  
+TInt CGlxMediaList::TimeOut(TAny* aSelf)
+    {
+    TRACER("CGlxMediaList::TimeOut");    
+    if(aSelf)
+        {
+		CGlxMediaList* self = static_cast <CGlxMediaList*> (aSelf);
+        if (self)
+            {
+			self->iBatchOperationMonitorTimer->Cancel();
+			// Items have changed, determine whether to sync now
+			// or resync later if a sync is already pending after opening
+			if (self->iSyncStatus == KNonePending)
+				{
+				self->ReOpenL(); // force re-opens
+				self->iSyncStatus = KSyncPending;
+				}
+			else
+				{
+				self->iSyncStatus = KResyncPending;
+				}
+			}
+        }
+    return KErrNone;
+    }
+
+
+// END OF FILE
--- a/photosgallery/viewframework/plugins/fullscreenviewplugin/group/glxfullscreenviewplugin.mmp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/plugins/fullscreenviewplugin/group/glxfullscreenviewplugin.mmp	Wed Jun 09 09:41:51 2010 +0300
@@ -39,8 +39,6 @@
 SOURCE          glxmainfullscreenviewplugin.cpp
 SOURCE          glxalbumfullscreenviewplugin.cpp
 SOURCE          glxcameraalbumfullscreenviewplugin.cpp
-SOURCE          glxdownloadsfullscreenviewplugin.cpp
-SOURCE          glxmonthsfullscreenviewplugin.cpp
 SOURCE          glxfullscreenviewpluginproxy.cpp
 SOURCE          glxtagfullscreenviewplugin.cpp
 SOURCE	        glximageviewerfullscreenviewplugin.cpp
--- a/photosgallery/viewframework/plugins/fullscreenviewplugin/src/glxfullscreenviewpluginproxy.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/plugins/fullscreenviewplugin/src/glxfullscreenviewpluginproxy.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -25,8 +25,6 @@
 #include "glxmainfullscreenviewplugin.h"
 #include "glxalbumfullscreenviewplugin.h"
 #include "glxcameraalbumfullscreenviewplugin.h"
-#include "glxdownloadsfullscreenviewplugin.h"
-#include "glxmonthsfullscreenviewplugin.h"
 #include "glxtagfullscreenviewplugin.h"
 #include "glximageviewerfullscreenviewplugin.h"
 
@@ -57,14 +55,6 @@
         CGlxCameraAlbumFullScreenViewPlugin::NewL ),
          
     IMPLEMENTATION_PROXY_ENTRY( 
-        KGlxDownloadsFullScreenViewImplementationId, 
-        CGlxDownloadsFullScreenViewPlugin::NewL ), 
-        
-    IMPLEMENTATION_PROXY_ENTRY( 
-        KGlxMonthsFullScreenViewImplementationId, 
-        CGlxMonthsFullScreenViewPlugin::NewL ), 
-        
-    IMPLEMENTATION_PROXY_ENTRY( 
         KGlxTagFullScreenViewPluginImplementationUid, 
         CGlxTagFullScreenViewPlugin::NewL ),
     
--- a/photosgallery/viewframework/plugins/gridviewplugin/data/glxgridviewdata.rss	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/plugins/gridviewplugin/data/glxgridviewdata.rss	Wed Jun 09 09:41:51 2010 +0300
@@ -128,16 +128,12 @@
                   MENU_ITEM { command = EGlxCmdSend;
                               txt = qtn_options_send_via; 
                               flags = EEikMenuItemSpecific; },
-                  MENU_ITEM { command = EGlxCmdSingleClickSend;
-                                txt = qtn_options_send_via;},   
                   MENU_ITEM { command = EGlxCmdAiwShareOnOvi; 
                            /* txt comes from ShareOnline 4.3 */ 
                            flags = EEikMenuItemSpecific;},        
                   MENU_ITEM { command = EGlxCmdDelete;
                               txt = qtn_lgal_options_delete; 
                               flags = EEikMenuItemSpecific; }, 
-                  MENU_ITEM { command = EGlxCmdSingleClickDelete;
-                            txt = qtn_lgal_options_delete;}, 
                    MENU_ITEM { command = EGlxCmdSlideshowPlay;
                               txt = qtn_lgal_options_slideshow;
                               flags = EEikMenuItemSpecific;},
@@ -145,8 +141,6 @@
                               txt = qtn_lgal_options_slideshow;
                               cascade = r_grid_shw_menu; },
                   MENU_ITEM { command = EGlxCmdAiwEdit; 
-                              txt = qtn_lgal_options_edit; }, 
-                  MENU_ITEM { command = EGlxCmdAiwSingleClickEdit; 
                               txt = qtn_lgal_options_edit; 
                               flags = EEikMenuItemSpecificListQuery;}, 
                   MENU_ITEM { command = EGlxCmdDetails;
@@ -161,10 +155,6 @@
                   MENU_ITEM { command = EGlxCmdAddTag;
                               txt = qtn_lgal_options_properties_add_tag;
                               flags = EEikMenuItemSpecific; }, 
-                  MENU_ITEM { command = EGlxCmdSingleClickAddToAlbum;
-                              txt = qtn_lgal_options_add_to_album;},
-                  MENU_ITEM { command = EGlxCmdSingleClickAddTag;
-                              txt = qtn_lgal_options_properties_add_tag;}, 
                   MENU_ITEM { command = EAknCmdHelp; 
                               txt = qtn_options_help; },
                   MENU_ITEM { command = EAknCmdExit; 
@@ -182,21 +172,15 @@
                   MENU_ITEM { command = EGlxCmdSend;
                               txt = qtn_options_send_via; 
                               flags = EEikMenuItemSpecific; },  
-                  MENU_ITEM { command = EGlxCmdSingleClickSend;
-                              txt = qtn_options_send_via;},  
                   MENU_ITEM { command = EGlxCmdAiwShareOnOvi; 
                            /* txt comes from ShareOnline 4.3 */ 
                                flags = EEikMenuItemSpecific;},  
                   MENU_ITEM { command = EGlxCmdRemoveFrom;
                               txt = qtn_lgal_options_remove_from_album; 
                               flags = EEikMenuItemSpecific; },
-                  MENU_ITEM { command = EGlxCmdSingleClickRemoveFrom;
-                              txt = qtn_lgal_options_remove_from_album;},
                   MENU_ITEM { command = EGlxCmdDelete;
                               txt = qtn_lgal_options_delete; 
                               flags = EEikMenuItemSpecific; },
-                  MENU_ITEM { command = EGlxCmdSingleClickDelete;
-                              txt = qtn_lgal_options_delete;},
                   MENU_ITEM { command = EGlxCmdSlideshowPlay;
                               txt = qtn_lgal_options_slideshow;
                               flags = EEikMenuItemSpecific;},
@@ -204,8 +188,6 @@
                               txt = qtn_lgal_options_slideshow;
                               cascade = r_grid_shw_menu; },
                   MENU_ITEM { command = EGlxCmdAiwEdit; 
-                              txt = qtn_lgal_options_edit; }, 
-                  MENU_ITEM { command = EGlxCmdAiwSingleClickEdit; 
                               txt = qtn_lgal_options_edit; 
                               flags = EEikMenuItemSpecificListQuery;}, 
                   MENU_ITEM { command = EGlxCmdDetails;
@@ -217,10 +199,9 @@
                   MENU_ITEM { command = EGlxCmdAddToAlbum;
                               txt = qtn_lgal_options_add_to_album; 
                               flags = EEikMenuItemSpecific; },
-                  MENU_ITEM { command = EGlxCmdSingleClickAddToAlbum;
-                              txt = qtn_lgal_options_add_to_album;},
-                  MENU_ITEM { command = EGlxCmdSingleClickAddTag;
-                              txt = qtn_lgal_options_properties_add_tag;}, 
+                  MENU_ITEM { command = EGlxCmdAddTag;
+                              txt = qtn_lgal_options_properties_add_tag;
+                              flags = EEikMenuItemSpecific; }, 
                   MENU_ITEM { command = EAknCmdHelp; 
                               txt = qtn_options_help; },
                   MENU_ITEM { command = EAknCmdExit; 
@@ -238,21 +219,15 @@
         MENU_ITEM { command = EGlxCmdSend;
                     txt = qtn_options_send_via; 
                     flags = EEikMenuItemSpecific; },
-        MENU_ITEM { command = EGlxCmdSingleClickSend;
-                    txt = qtn_options_send_via;},  
         MENU_ITEM { command = EGlxCmdAiwShareOnOvi; 
                  /* txt comes from ShareOnline 4.3 */ 
                  flags = EEikMenuItemSpecific;},  
         MENU_ITEM { command=EGlxCmdRemoveFrom; 
                     txt = qtn_lgal_options_remove_from_tag; 
                     flags = EEikMenuItemSpecific; },
-        MENU_ITEM { command=EGlxCmdSingleClickRemoveFrom; 
-                    txt = qtn_lgal_options_remove_from_tag;},
         MENU_ITEM { command = EGlxCmdDelete;
                     txt = qtn_lgal_options_delete; 
                     flags = EEikMenuItemSpecific; }, 
-        MENU_ITEM { command = EGlxCmdSingleClickDelete;
-                    txt = qtn_lgal_options_delete;}, 
         MENU_ITEM { command = EGlxCmdSlideshowPlay;
                     txt = qtn_lgal_options_slideshow;
                     flags = EEikMenuItemSpecific;},
@@ -260,8 +235,6 @@
                     txt = qtn_lgal_options_slideshow;
                     cascade = r_grid_shw_menu; },
         MENU_ITEM { command = EGlxCmdAiwEdit; 
-                    txt = qtn_lgal_options_edit; }, 
-        MENU_ITEM { command = EGlxCmdAiwSingleClickEdit; 
                     txt = qtn_lgal_options_edit; 
                     flags = EEikMenuItemSpecificListQuery;}, 
         MENU_ITEM { command = EGlxCmdDetails;
@@ -270,13 +243,12 @@
                     txt = qtn_options_list_mark_all;},   
 		MENU_ITEM { command = EAknUnmarkAll;
                     txt = qtn_options_list_unmark_all;},
-        MENU_ITEM { command = EGlxCmdSingleClickAddToAlbum;
-                    txt = qtn_lgal_options_add_to_album;},
+        MENU_ITEM { command = EGlxCmdAddToAlbum;
+                    txt = qtn_lgal_options_add_to_album;
+                    flags = EEikMenuItemSpecific; },
         MENU_ITEM { command = EGlxCmdAddTag;
                     txt = qtn_lgal_options_properties_add_tag; 
                     flags = EEikMenuItemSpecific; },
-        MENU_ITEM { command = EGlxCmdSingleClickAddTag;
-                    txt = qtn_lgal_options_properties_add_tag;}, 
          MENU_ITEM { command = EAknCmdHelp; 
                      txt = qtn_options_help; },
          MENU_ITEM { command = EAknCmdExit; 
--- a/photosgallery/viewframework/plugins/gridviewplugin/group/glxgridviewplugin.mmp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/plugins/gridviewplugin/group/glxgridviewplugin.mmp	Wed Jun 09 09:41:51 2010 +0300
@@ -39,8 +39,6 @@
 SOURCE          glxmaingridviewplugin.cpp
 SOURCE          glxalbumgridviewplugin.cpp
 SOURCE          glxcameraalbumgridviewplugin.cpp
-SOURCE          glxdownloadsgridviewplugin.cpp
-SOURCE          glxmonthsgridviewplugin.cpp
 SOURCE          glxgridviewpluginproxy.cpp
 SOURCE          glxtaggridviewplugin.cpp
 
--- a/photosgallery/viewframework/plugins/gridviewplugin/src/glxgridviewpluginproxy.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/plugins/gridviewplugin/src/glxgridviewpluginproxy.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -25,8 +25,6 @@
 #include "glxmaingridviewplugin.h"
 #include "glxalbumgridviewplugin.h"
 #include "glxcameraalbumgridviewplugin.h"
-#include "glxdownloadsgridviewplugin.h"
-#include "glxmonthsgridviewplugin.h"
 #include "glxtaggridviewplugin.h"
 
 #if ( !defined IMPLEMENTATION_PROXY_ENTRY )
@@ -56,13 +54,6 @@
         CGlxCameraAlbumGridViewPlugin::NewL ),
          
     IMPLEMENTATION_PROXY_ENTRY( 
-        KGlxDownloadsGridViewImplementationId, 
-        CGlxDownloadsGridViewPlugin::NewL ), 
-        
-    IMPLEMENTATION_PROXY_ENTRY( 
-        KGlxMonthsGridViewImplementationId, 
-        CGlxMonthsGridViewPlugin::NewL ), 
-    IMPLEMENTATION_PROXY_ENTRY( 
         KGlxTagGridViewPluginImplementationUid, 
         CGlxTagGridViewPlugin::NewL ), 
     };
--- a/photosgallery/viewframework/plugins/gridviewpluginbase/src/glxgridviewpluginbase.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/plugins/gridviewpluginbase/src/glxgridviewpluginbase.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -137,10 +137,6 @@
 			CGlxCommandHandlerAddToContainer::NewAddToAlbumCommandHandlerL(
 					iGridView, EFalse, uiutilitiesrscfile));
 
-	GLX_LOG_INFO("Adding CGlxCommandHandlerAddToContainer-Album SingleClick");
-	iGridView->AddCommandHandlerL(
-			CGlxCommandHandlerAddToContainer::NewAddToAlbumSingleClickCommandHandlerL(
-					iGridView, EFalse, uiutilitiesrscfile));
 	GLX_LOG_INFO("Adding CGlxCommandHandlerDetails");
 	iGridView->AddCommandHandlerL(CGlxCommandHandlerDetails::NewL(iGridView,
 			uiutilitiesrscfile));
@@ -157,18 +153,10 @@
 			CGlxCommandHandlerAddToContainer::NewAddToTagCommandHandlerL(
 					iGridView, EFalse, uiutilitiesrscfile));
 
-	GLX_LOG_INFO("Adding CGlxCommandHandlerAddToContainer-Tag Single Click");
-	iGridView->AddCommandHandlerL(
-			CGlxCommandHandlerAddToContainer::NewAddToTagSingleClickCommandHandlerL(
-					iGridView, EFalse, uiutilitiesrscfile));
 	// The AIW service handlers 
 	GLX_LOG_INFO("Adding CGlxCommandHandlerAiwEdit");
 	iGridView->AddCommandHandlerL(CGlxCommandHandlerAiwEdit::NewL(iGridView));
 
-	GLX_LOG_INFO("Adding CGlxCommandHandlerAiwEdit-Single Click");
-	iGridView->AddCommandHandlerL(CGlxCommandHandlerAiwEdit::NewL(iGridView,
-			ETrue));
-
 	GLX_LOG_INFO("Adding CGlxCommandHandlerAiwShareOnOvi");
 	iGridView->AddCommandHandlerL(CGlxCommandHandlerAiwShareOnOvi::NewL(
 			iGridView, iResourceIds.iMenuId, uiutilitiesrscfile));
--- a/photosgallery/viewframework/plugins/listviewplugin/group/glxlistviewplugin.mmp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/plugins/listviewplugin/group/glxlistviewplugin.mmp	Wed Jun 09 09:41:51 2010 +0300
@@ -37,7 +37,6 @@
 SOURCE          glxlistviewpluginproxy.cpp
 SOURCE          glxmainlistviewplugin.cpp
 SOURCE          glxalbumlistviewplugin.cpp
-SOURCE          glxmonthlistviewplugin.cpp
 
 START RESOURCE  ../data/20000a0b.rss
 TARGET          glxlistviewplugin.rsc
--- a/photosgallery/viewframework/plugins/listviewplugin/src/glxlistviewpluginproxy.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/plugins/listviewplugin/src/glxlistviewpluginproxy.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -23,8 +23,6 @@
 
 #include "glxmainlistviewplugin.h"
 #include "glxalbumlistviewplugin.h"
-#include "glxmonthlistviewplugin.h"
-
 #include "glxlistviewplugin.hrh"
 
 // ======== MEMBER FUNCTIONS ========
@@ -41,8 +39,6 @@
     IMPLEMENTATION_PROXY_ENTRY(
             KGlxAlbumListViewImplementationUid, CGlxAlbumListViewPlugin::NewL),
 
-    IMPLEMENTATION_PROXY_ENTRY(
-            KGlxMonthListViewImplementationUid, CGlxMonthListViewPlugin::NewL)
     };
 
 // ---------------------------------------------------------------------------
--- a/photosgallery/viewframework/texturemanager/bwins/glxtexturemanageru.def	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/texturemanager/bwins/glxtexturemanageru.def	Wed Jun 09 09:41:51 2010 +0300
@@ -1,20 +1,20 @@
 EXPORTS
 	?FlushTextures@CGlxTextureManager@@QAEXXZ @ 1 NONAME ; void CGlxTextureManager::FlushTextures(void)
 	?CreateZoomedTextureL@CGlxTextureManager@@QAEPAVCAlfTexture@@XZ @ 2 NONAME ; class CAlfTexture * CGlxTextureManager::CreateZoomedTextureL(void)
-	?CreateColorAvkonIconTextureL@CGlxTextureManager@@QAEAAVCAlfTexture@@ABVTAknsItemID@@HVTRgb@@0HVTSize@@@Z @ 3 NONAME ; class CAlfTexture & CGlxTextureManager::CreateColorAvkonIconTextureL(class TAknsItemID const &, int, class TRgb, class TAknsItemID const &, int, class TSize)
+	?CreateAnimatedGifTextureL@CGlxTextureManager@@QAEAAVCAlfTexture@@ABVTDesC16@@ABVTSize@@ABVTGlxMedia@@V?$TGlxId@VTGlxIdSpaceIdBase@@@@@Z @ 3 NONAME ; class CAlfTexture & CGlxTextureManager::CreateAnimatedGifTextureL(class TDesC16 const &, class TSize const &, class TGlxMedia const &, class TGlxId<class TGlxIdSpaceIdBase>)
 	?CreateFlatColourTextureL@CGlxTextureManager@@QAEAAVCAlfTexture@@VTRgb@@@Z @ 4 NONAME ; class CAlfTexture & CGlxTextureManager::CreateFlatColourTextureL(class TRgb)
-	?CreateAvkonIconTextureL@CGlxTextureManager@@QAEAAVCAlfTexture@@ABVTAknsItemID@@HVTSize@@@Z @ 5 NONAME ; class CAlfTexture & CGlxTextureManager::CreateAvkonIconTextureL(class TAknsItemID const &, int, class TSize)
-	?CreateIconTextureL@CGlxTextureManager@@QAEAAVCAlfTexture@@HAAVTDesC16@@VTSize@@@Z @ 6 NONAME ; class CAlfTexture & CGlxTextureManager::CreateIconTextureL(int, class TDesC16 &, class TSize)
-	?CreateZoomedTextureL@CGlxTextureManager@@QAEAAVCAlfTexture@@ABVTGlxMedia@@ABVTMPXAttribute@@V?$TGlxId@VTGlxIdSpaceIdBase@@@@PAVMGlxTextureObserver@@@Z @ 7 NONAME ; class CAlfTexture & CGlxTextureManager::CreateZoomedTextureL(class TGlxMedia const &, class TMPXAttribute const &, class TGlxId<class TGlxIdSpaceIdBase>, class MGlxTextureObserver *)
-	?NewL@CGlxTextureManager@@SAPAV1@AAVCAlfTextureManager@@@Z @ 8 NONAME ; class CGlxTextureManager * CGlxTextureManager::NewL(class CAlfTextureManager &)
-	?RemoveTexture@CGlxTextureManager@@QAEXABVTGlxMediaId@@H@Z @ 9 NONAME ; void CGlxTextureManager::RemoveTexture(class TGlxMediaId const &, int)
-	?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 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>)
+	?CreateIconTextureL@CGlxTextureManager@@QAEAAVCAlfTexture@@HAAVTDesC16@@VTSize@@@Z @ 5 NONAME ; class CAlfTexture & CGlxTextureManager::CreateIconTextureL(int, class TDesC16 &, class TSize)
+	?CreateZoomedTextureL@CGlxTextureManager@@QAEAAVCAlfTexture@@ABVTGlxMedia@@ABVTMPXAttribute@@V?$TGlxId@VTGlxIdSpaceIdBase@@@@PAVMGlxTextureObserver@@@Z @ 6 NONAME ; class CAlfTexture & CGlxTextureManager::CreateZoomedTextureL(class TGlxMedia const &, class TMPXAttribute const &, class TGlxId<class TGlxIdSpaceIdBase>, class MGlxTextureObserver *)
+	?RemoveTexture@CGlxTextureManager@@QAEXABVCAlfTexture@@@Z @ 7 NONAME ; void CGlxTextureManager::RemoveTexture(class CAlfTexture const &)
+	?RemoveZoomList@CGlxTextureManager@@QAEXXZ @ 8 NONAME ; void CGlxTextureManager::RemoveZoomList(void)
+	?AnimateMediaItem@CGlxTextureManager@@QAEXABVTGlxMediaId@@H@Z @ 9 NONAME ; void CGlxTextureManager::AnimateMediaItem(class TGlxMediaId const &, int)
+	?CreateThumbnailTextureL@CGlxTextureManager@@QAEAAVCAlfTexture@@ABVTGlxMedia@@ABV?$TGlxId@VTGlxIdSpaceIdBase@@@@ABVTSize@@PAVMGlxTextureObserver@@H@Z @ 10 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 @ 11 NONAME ; class CAlfTexture & CGlxTextureManager::CreateNewTextureForMediaL(class TSize, class TGlxMedia const &, class TGlxId<class TGlxIdSpaceIdBase> const &, class MGlxTextureObserver *)
+	?CreateColorAvkonIconTextureL@CGlxTextureManager@@QAEAAVCAlfTexture@@ABVTAknsItemID@@HVTRgb@@0HVTSize@@@Z @ 12 NONAME ; class CAlfTexture & CGlxTextureManager::CreateColorAvkonIconTextureL(class TAknsItemID const &, int, class TRgb, class TAknsItemID const &, int, class TSize)
+	?CreateAvkonIconTextureL@CGlxTextureManager@@QAEAAVCAlfTexture@@ABVTAknsItemID@@HVTSize@@@Z @ 13 NONAME ; class CAlfTexture & CGlxTextureManager::CreateAvkonIconTextureL(class TAknsItemID const &, int, class TSize)
+	?NewL@CGlxTextureManager@@SAPAV1@AAVCAlfTextureManager@@@Z @ 14 NONAME ; class CGlxTextureManager * CGlxTextureManager::NewL(class CAlfTextureManager &)
+	?RemoveTexture@CGlxTextureManager@@QAEXABVTGlxMediaId@@H@Z @ 15 NONAME ; void CGlxTextureManager::RemoveTexture(class TGlxMediaId const &, int)
+	?TextureNeedsUpdating@CGlxTextureManager@@QAEHVTGlxMedia@@V?$TGlxId@VTGlxIdSpaceIdBase@@@@ABVTSize@@@Z @ 16 NONAME ; int CGlxTextureManager::TextureNeedsUpdating(class TGlxMedia, class TGlxId<class TGlxIdSpaceIdBase>, class TSize const &)
+	?CreateColorIconTextureL@CGlxTextureManager@@QAEAAVCAlfTexture@@HAAVTDesC16@@VTRgb@@ABVTAknsItemID@@HVTSize@@@Z @ 17 NONAME ; class CAlfTexture & CGlxTextureManager::CreateColorIconTextureL(int, class TDesC16 &, class TRgb, class TAknsItemID const &, int, class TSize)
+	?CreateAvkonIconTextureL@CGlxTextureManager@@QAEAAVCAlfTexture@@ABVTAknsItemID@@VTSize@@@Z @ 18 NONAME ; class CAlfTexture & CGlxTextureManager::CreateAvkonIconTextureL(class TAknsItemID const &, class TSize)
 
--- a/photosgallery/viewframework/texturemanager/eabi/glxtexturemanageru.def	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/texturemanager/eabi/glxtexturemanageru.def	Wed Jun 09 09:41:51 2010 +0300
@@ -3,21 +3,22 @@
 	_ZN18CGlxTextureManager13RemoveTextureERK11CAlfTexture @ 2 NONAME
 	_ZN18CGlxTextureManager13RemoveTextureERK11TGlxMediaIdi @ 3 NONAME
 	_ZN18CGlxTextureManager14RemoveZoomListEv @ 4 NONAME
-	_ZN18CGlxTextureManager18CreateIconTextureLEiR7TDesC165TSize @ 5 NONAME
-	_ZN18CGlxTextureManager20CreateZoomedTextureLERK9TGlxMediaRK13TMPXAttribute6TGlxIdI17TGlxIdSpaceIdBaseEP19MGlxTextureObserver @ 6 NONAME
-	_ZN18CGlxTextureManager20CreateZoomedTextureLEv @ 7 NONAME
-	_ZN18CGlxTextureManager20TextureNeedsUpdatingE9TGlxMedia6TGlxIdI17TGlxIdSpaceIdBaseERK5TSize @ 8 NONAME
-	_ZN18CGlxTextureManager23CreateAvkonIconTextureLERK11TAknsItemID5TSize @ 9 NONAME
-	_ZN18CGlxTextureManager23CreateAvkonIconTextureLERK11TAknsItemIDi5TSize @ 10 NONAME
-	_ZN18CGlxTextureManager23CreateColorIconTextureLEiR7TDesC164TRgbRK11TAknsItemIDi5TSize @ 11 NONAME
-	_ZN18CGlxTextureManager23CreateThumbnailTextureLERK9TGlxMediaRK6TGlxIdI17TGlxIdSpaceIdBaseERK5TSizeP19MGlxTextureObserveri @ 12 NONAME
-	_ZN18CGlxTextureManager24CreateFlatColourTextureLE4TRgb @ 13 NONAME
-	_ZN18CGlxTextureManager25CreateAnimatedGifTextureLERK7TDesC16RK5TSizeRK9TGlxMedia6TGlxIdI17TGlxIdSpaceIdBaseE @ 14 NONAME
-	_ZN18CGlxTextureManager25CreateNewTextureForMediaLE5TSizeRK9TGlxMediaRK6TGlxIdI17TGlxIdSpaceIdBaseEP19MGlxTextureObserver @ 15 NONAME
-	_ZN18CGlxTextureManager28CreateColorAvkonIconTextureLERK11TAknsItemIDi4TRgbS2_i5TSize @ 16 NONAME
-	_ZN18CGlxTextureManager4NewLER18CAlfTextureManager @ 17 NONAME
-	_ZTI22CGlxTextureManagerImpl @ 18 NONAME
-	_ZTI24CGlxBitmapDecoderWrapper @ 19 NONAME
-	_ZTV22CGlxTextureManagerImpl @ 20 NONAME
-	_ZTV24CGlxBitmapDecoderWrapper @ 21 NONAME
+	_ZN18CGlxTextureManager16AnimateMediaItemERK11TGlxMediaIdi @ 5 NONAME
+	_ZN18CGlxTextureManager18CreateIconTextureLEiR7TDesC165TSize @ 6 NONAME
+	_ZN18CGlxTextureManager20CreateZoomedTextureLERK9TGlxMediaRK13TMPXAttribute6TGlxIdI17TGlxIdSpaceIdBaseEP19MGlxTextureObserver @ 7 NONAME
+	_ZN18CGlxTextureManager20CreateZoomedTextureLEv @ 8 NONAME
+	_ZN18CGlxTextureManager20TextureNeedsUpdatingE9TGlxMedia6TGlxIdI17TGlxIdSpaceIdBaseERK5TSize @ 9 NONAME
+	_ZN18CGlxTextureManager23CreateAvkonIconTextureLERK11TAknsItemID5TSize @ 10 NONAME
+	_ZN18CGlxTextureManager23CreateAvkonIconTextureLERK11TAknsItemIDi5TSize @ 11 NONAME
+	_ZN18CGlxTextureManager23CreateColorIconTextureLEiR7TDesC164TRgbRK11TAknsItemIDi5TSize @ 12 NONAME
+	_ZN18CGlxTextureManager23CreateThumbnailTextureLERK9TGlxMediaRK6TGlxIdI17TGlxIdSpaceIdBaseERK5TSizeP19MGlxTextureObserveri @ 13 NONAME
+	_ZN18CGlxTextureManager24CreateFlatColourTextureLE4TRgb @ 14 NONAME
+	_ZN18CGlxTextureManager25CreateAnimatedGifTextureLERK7TDesC16RK5TSizeRK9TGlxMedia6TGlxIdI17TGlxIdSpaceIdBaseE @ 15 NONAME
+	_ZN18CGlxTextureManager25CreateNewTextureForMediaLE5TSizeRK9TGlxMediaRK6TGlxIdI17TGlxIdSpaceIdBaseEP19MGlxTextureObserver @ 16 NONAME
+	_ZN18CGlxTextureManager28CreateColorAvkonIconTextureLERK11TAknsItemIDi4TRgbS2_i5TSize @ 17 NONAME
+	_ZN18CGlxTextureManager4NewLER18CAlfTextureManager @ 18 NONAME
+	_ZTI22CGlxTextureManagerImpl @ 19 NONAME
+	_ZTI24CGlxBitmapDecoderWrapper @ 20 NONAME
+	_ZTV22CGlxTextureManagerImpl @ 21 NONAME
+	_ZTV24CGlxBitmapDecoderWrapper @ 22 NONAME
 
--- a/photosgallery/viewframework/texturemanager/inc/glxtexturemanager.h	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/texturemanager/inc/glxtexturemanager.h	Wed Jun 09 09:41:51 2010 +0300
@@ -239,6 +239,13 @@
        */
     IMPORT_C void FlushTextures() ;
     
+   /**
+    * Animate the given media.
+    * @param aMediaId The Id of the media to be animated
+    * @param aState Animation state [ETrue to Start, EFalse to Stop]
+    */
+    IMPORT_C void AnimateMediaItem(const TGlxMediaId& aMediaId, TBool aState);
+    
 public: // from MGlxSkinChangeObserver
 
     void HandleSkinChanged();    
--- a/photosgallery/viewframework/texturemanager/inc/glxtexturemanagerimpl.h	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/texturemanager/inc/glxtexturemanagerimpl.h	Wed Jun 09 09:41:51 2010 +0300
@@ -196,6 +196,13 @@
      */
     CAlfTexture& CreateFlatColourTextureL( TRgb aColour );   
 
+   /**
+    * Animate the given media.
+    * @param aMediaId The Id of the media to be animated
+    * @param aState Animation state [ETrue to Start, EFalse to Stop]
+    */
+    void AnimateMediaItem(const TGlxMediaId& aMediaId, TBool aState);
+        
 public:  // From MGlxCacheObserver
     void HandleAttributesAvailableL(const TGlxIdSpaceId& aIdSpaceId, 
                                     const TGlxMediaId& aMediaId, 
@@ -305,16 +312,26 @@
         CFbsBitmap*         iBitmap;
 		TTime				iImageDate; 
         /**
-         * Helper functor to be able to find texture from array
+         * Helper function to be able to find texture from array
          */
         static TBool MatchTexture( 
             const CAlfTexture* aTexture, 
-            const TGlxThumbnailIcon& aRhs )
+            const TGlxThumbnailIcon& aThumbData )
         	{
         	// return true if the address of the texture match
-        	return aTexture == aRhs.iTexture;
+        	return aTexture == aThumbData.iTexture;
         	}
-        };
+
+        /**
+         * Helper function to be able to find mediaid from array
+         */
+        static TBool MatchMediaId(const TGlxMediaId* aMediaId,
+                const TGlxThumbnailIcon& aThumbData)
+            {
+        	// return true if the Media Id match
+            return *aMediaId == aThumbData.iMediaId;
+            }
+         };
     /**
     * Requests the best match texture. If it already exists this method does nothing.
     * However if it doed not exist it will create it and replace the old texture
--- a/photosgallery/viewframework/texturemanager/src/glxtexturemanager.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/texturemanager/src/glxtexturemanager.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -318,3 +318,15 @@
     GLX_LOG_INFO( "CGlxTextureManager::RemoveZoomList" );
     iImpl->RemoveZoomList();
     }
+
+// -----------------------------------------------------------------------------
+// AnimateMediaItem
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CGlxTextureManager::AnimateMediaItem(
+    const TGlxMediaId& aMediaId, TBool aState)
+    {
+    TRACER("CGlxTextureManager::AnimateMediaItem");
+    iImpl->AnimateMediaItem(aMediaId, aState);
+    }
+
--- a/photosgallery/viewframework/texturemanager/src/glxtexturemanagerimpl.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/texturemanager/src/glxtexturemanagerimpl.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -842,6 +842,11 @@
                     EAlfTextureFlagDefault,iAnimatedTnmList[thumbnailIndex].iTextureId );   
             iAnimatedTnmList[thumbnailIndex].iTexture = &newTexture ;
             }
+        // While reloading texture, Need to start animaiton with 
+        // explicit call as we stopped animation while unloading texture
+        // This is not required when creating a new texture as Alf
+        // starts animation by default on those textures.
+        (iAnimatedTnmList[thumbnailIndex].iTexture)->StartAnimation();
         return *iAnimatedTnmList[thumbnailIndex].iTexture;
         }
     
@@ -1225,13 +1230,12 @@
 // HandleAttributesAvailableL
 // -----------------------------------------------------------------------------
 //
-void CGlxTextureManagerImpl::HandleAttributesAvailableL(const TGlxIdSpaceId& /*aIdSpaceId*/, 
-                                                const TGlxMediaId& /*aMediaId*/, 
-                                                const RArray<TMPXAttribute>& /*aAttributes*/, 
-                                                const CGlxMedia* /*aMedia*/)
-	{
-		
-	}
+void CGlxTextureManagerImpl::HandleAttributesAvailableL(
+        const TGlxIdSpaceId& /*aIdSpaceId*/, const TGlxMediaId& /*aMediaId*/,
+        const RArray<TMPXAttribute>& /*aAttributes*/, 
+        const CGlxMedia* /*aMedia*/)
+    {
+    }
 
 // -----------------------------------------------------------------------------
 // CleanupTextureCacheL
@@ -1243,8 +1247,6 @@
 	RemoveTexture(aMediaId, EFalse);
 	}
 
-
-
 // -----------------------------------------------------------------------------
 // ScaleGridTnmToFsL
 // -----------------------------------------------------------------------------
@@ -1335,3 +1337,32 @@
         iImageViewerInstance->DeleteInstance();
         }
     }
+
+// -----------------------------------------------------------------------------
+// AnimateMediaItem
+// -----------------------------------------------------------------------------
+//
+void CGlxTextureManagerImpl::AnimateMediaItem(const TGlxMediaId& aMediaId,
+        TBool aState)
+    {
+    TRACER("CGlxTextureManagerImpl::AnimateMediaItem");
+    TInt index = iAnimatedTnmList.Find(aMediaId,
+            &TGlxThumbnailIcon::MatchMediaId);
+    if (index != KErrNotFound)
+        {
+        if (iAnimatedTnmList[index].iTexture)
+            {
+            if (aState)
+                {
+                GLX_LOG_INFO("AnimateMediaItem - Start animation");
+                (iAnimatedTnmList[index].iTexture)->StartAnimation();
+                }
+            else
+                {
+                GLX_LOG_INFO("AnimateMediaItem - Stop animation");
+                (iAnimatedTnmList[index].iTexture)->StopAnimation();
+                }
+            }
+        }
+    }
+
--- a/photosgallery/viewframework/tvout/bwins/glxtvoutu.def	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/tvout/bwins/glxtvoutu.def	Wed Jun 09 09:41:51 2010 +0300
@@ -1,17 +1,17 @@
 EXPORTS
 	?ActivateZoom@CGlxHdmiController@@QAEXH@Z @ 1 NONAME ; void CGlxHdmiController::ActivateZoom(int)
 	?ScreenSizeL@CGlxTv@@QBE?AVTSize@@XZ @ 2 NONAME ; class TSize CGlxTv::ScreenSizeL(void) const
-	?SetImageL@CGlxHdmiController@@QAEXABVTDesC16@@PAVCFbsBitmap@@H@Z @ 3 NONAME ; void CGlxHdmiController::SetImageL(class TDesC16 const &, class CFbsBitmap *, int)
+	?NewL@CGlxHdmiController@@SAPAV1@AAVMGlxHDMIDecoderObserver@@@Z @ 3 NONAME ; class CGlxHdmiController * CGlxHdmiController::NewL(class MGlxHDMIDecoderObserver &)
 	??1CGlxTv@@UAE@XZ @ 4 NONAME ; CGlxTv::~CGlxTv(void)
 	??1CGlxHdmiController@@UAE@XZ @ 5 NONAME ; CGlxHdmiController::~CGlxHdmiController(void)
-	?NewL@CGlxHdmiController@@SAPAV1@XZ @ 6 NONAME ; class CGlxHdmiController * CGlxHdmiController::NewL(void)
+	?SetImageL@CGlxHdmiController@@QAEXABVTDesC16@@0PAVCFbsBitmap@@H@Z @ 6 NONAME ; void CGlxHdmiController::SetImageL(class TDesC16 const &, class TDesC16 const &, class CFbsBitmap *, int)
 	?IsWidescreen@CGlxTv@@QBEHXZ @ 7 NONAME ; int CGlxTv::IsWidescreen(void) const
 	?IsHDMIConnected@CGlxHdmiController@@QAEHXZ @ 8 NONAME ; int CGlxHdmiController::IsHDMIConnected(void)
 	?ShiftToPostingMode@CGlxHdmiController@@QAEXXZ @ 9 NONAME ; void CGlxHdmiController::ShiftToPostingMode(void)
 	?ShiftToCloningMode@CGlxHdmiController@@QAEXXZ @ 10 NONAME ; void CGlxHdmiController::ShiftToCloningMode(void)
-	?NewL@CGlxTv@@SAPAV1@AAVMGlxTvObserver@@@Z @ 11 NONAME ; class CGlxTv * CGlxTv::NewL(class MGlxTvObserver &)
-	?IsConnected@CGlxTv@@QBEHXZ @ 12 NONAME ; int CGlxTv::IsConnected(void) const
-	?ItemNotSupported@CGlxHdmiController@@QAEXXZ @ 13 NONAME ; void CGlxHdmiController::ItemNotSupported(void)
+	?IsConnected@CGlxTv@@QBEHXZ @ 11 NONAME ; int CGlxTv::IsConnected(void) const
+	?ItemNotSupported@CGlxHdmiController@@QAEXXZ @ 12 NONAME ; void CGlxHdmiController::ItemNotSupported(void)
+	?NewL@CGlxTv@@SAPAV1@AAVMGlxTvObserver@@@Z @ 13 NONAME ; class CGlxTv * CGlxTv::NewL(class MGlxTvObserver &)
 	?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	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/tvout/eabi/glxtvoutu.def	Wed Jun 09 09:41:51 2010 +0300
@@ -5,8 +5,8 @@
 	_ZN18CGlxHdmiController16ItemNotSupportedEv @ 4 NONAME
 	_ZN18CGlxHdmiController18ShiftToCloningModeEv @ 5 NONAME
 	_ZN18CGlxHdmiController18ShiftToPostingModeEv @ 6 NONAME
-	_ZN18CGlxHdmiController4NewLEv @ 7 NONAME
-	_ZN18CGlxHdmiController9SetImageLERK7TDesC16P10CFbsBitmapi @ 8 NONAME
+	_ZN18CGlxHdmiController4NewLER23MGlxHDMIDecoderObserver @ 7 NONAME
+	_ZN18CGlxHdmiController9SetImageLERK7TDesC16S2_P10CFbsBitmapi @ 8 NONAME
 	_ZN18CGlxHdmiControllerD0Ev @ 9 NONAME
 	_ZN18CGlxHdmiControllerD1Ev @ 10 NONAME
 	_ZN18CGlxHdmiControllerD2Ev @ 11 NONAME
--- a/photosgallery/viewframework/tvout/inc/glxhdmicontroller.h	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/tvout/inc/glxhdmicontroller.h	Wed Jun 09 09:41:51 2010 +0300
@@ -20,6 +20,7 @@
 
 // Internal includes
 #include <mglxtvobserver.h>     // for inteface MGlxTvObserver
+#include <mglxhdmidecoderobserver.h> //for MGlxHDMIDecoderObserver
 
 class CGlxHdmiContainer;
 class CGlxHdmiSurfaceUpdater;
@@ -36,7 +37,8 @@
      * NewLC 
      * @param1 - Image file path default to NULL
      */
-    IMPORT_C static CGlxHdmiController* NewL();
+    IMPORT_C static CGlxHdmiController* NewL(
+            MGlxHDMIDecoderObserver& aDecoderObserver);
 
     /*
      * Destructor
@@ -44,11 +46,15 @@
     IMPORT_C ~CGlxHdmiController();
     
     /*
-     * Update Image
-     * @param1 - Image file path
+     * Sets the Image to be displayed
+     * @aImageFile - Image file path
+     * @aNextImageFile - Next image file path
+     * @aFsBitmap - Bitmap to be displayed
+     * @aStore - Image info should be stored or not
      */
-    IMPORT_C void SetImageL(const TDesC& aImageFile, CFbsBitmap* aFsBitmap = NULL, 
-            TBool aStore = ETrue);
+    IMPORT_C void SetImageL(const TDesC& aImageFile, 
+            const TDesC& aNextImageFile = KNullDesC, 
+            CFbsBitmap* aFsBitmap = NULL, TBool aStore = ETrue);
 
     /*
      * To intimate that the item is not supported.  
@@ -86,7 +92,7 @@
     /*
      * Constructor
      */
-    CGlxHdmiController();
+    CGlxHdmiController(MGlxHDMIDecoderObserver& aDecoderObserver);
     
     /*
      * ConstructL 
@@ -100,9 +106,11 @@
     
     /*
      * Create surface updater and update background surface 
-     * @param1 - Image file     
+     * @aImageFile - Image file     
+     * @aNextImageFile - Next image file     
      */
-    void CreateSurfaceUpdaterL(const TDesC& aImageFile);
+    void CreateSurfaceUpdaterL(const TDesC& aImageFile,
+            const TDesC& aNextImageFile = KNullDesC);
     
     /*
      * To Destroy the surface updater if present
@@ -116,19 +124,23 @@
 
     /*
      * Stores the Image File name
-     * @param1 - Image file
+     * @aImageFile - Image file path
+     * @aNextImageFile - Next image file path
+     * @aFsBitmap - Bitmap to be displayed
      */
-    void StoreImageInfoL(const TDesC& aImageFile, CFbsBitmap* aFsBitmap);
+    void StoreImageInfoL(const TDesC& aImageFile,
+            const TDesC& aNextImageFile, CFbsBitmap* aFsBitmap);
 
 private:
     CFbsBitmap* iFsBitmap;
     HBufC*  iStoredImagePath;
-    
+    HBufC*  iStoredNextImagePath;
     CGlxHdmiContainer*      iHdmiContainer;
     CGlxHdmiSurfaceUpdater* iSurfaceUpdater;
     CGlxTv*  iGlxTvOut;
     TBool   iIsImageSupported;          // Flag to see if Image is supported
     TBool   iIsPhotosInForeground;          // Flag for determine if Photos is in foreground
+	MGlxHDMIDecoderObserver& iDecoderObserver;
     };
 
 #endif /* GLXHDMICONTROLLER_H_ */
--- a/photosgallery/viewframework/tvout/inc/glxhdmisurfaceupdater.h	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/tvout/inc/glxhdmisurfaceupdater.h	Wed Jun 09 09:41:51 2010 +0300
@@ -25,6 +25,7 @@
 #include "graphics/surface.h"
 #include "graphics/surfaceupdateclient.h"
 #include <graphics/surfaceconfiguration.h>
+#include "mglxhdmidecoderobserver.h" //For MGlxHDMIDecoderObserver
 
 // forward decleration
 class CGlxActiveCallBack;
@@ -41,10 +42,12 @@
     {
 public:
     /*
-     * NewL
-     */
-    static CGlxHdmiSurfaceUpdater* NewL(RWindow* aWindow, const TDesC& aImageFile, 
-            CFbsBitmap* aFsBitmap, MGlxGenCallback* aCallBack);
+	 * NewL
+	 */
+	static CGlxHdmiSurfaceUpdater* NewL(RWindow* aWindow,
+			const TDesC& aImageFile, const TDesC& aNextImageFile,
+			CFbsBitmap* aFsBitmap, MGlxGenCallback* aCallBack,
+			MGlxHDMIDecoderObserver& aDecoderObserver);
 
     /*
      * Destructor
@@ -60,7 +63,8 @@
     /*
      * This updates the new image.
      */
-    void UpdateNewImageL(const TDesC& aImageFile,CFbsBitmap* aFsBitmap);
+    void UpdateNewImageL(const TDesC& aImageFile,
+            const TDesC& aNextImageFile, CFbsBitmap* aFsBitmap);
 
     /*
      * Activate Zoom 
@@ -87,14 +91,16 @@
 
 private:
     /*
-     * Constructor 
-     */
-    CGlxHdmiSurfaceUpdater(RWindow* aWindow, MGlxGenCallback* aCallBack);
+	 * Constructor 
+	 */
+	CGlxHdmiSurfaceUpdater(RWindow* aWindow, MGlxGenCallback* aCallBack,
+			MGlxHDMIDecoderObserver& aDecoderObserver);
 
     /*
      * ConstructL()
      */
-    void ConstructL(CFbsBitmap* aFsBitmap,const TDesC& aImageFile);   
+    void ConstructL(CFbsBitmap* aFsBitmap, const TDesC& aImageFile,
+			const TDesC& aNextImageFile);   
 
     /*
      * Create a New surface with given size
@@ -109,7 +115,7 @@
      * This fundtion wont be called , could be used if double buffering is planned in future
      * to start the second decoder AO and update the surface with a new session. 
      */
-    static TInt SurfBuffer0Ready(TAny* aObject);    
+    static TInt SurfBuffer0ReadyL(TAny* aObject);    
     
     /*
      * Call a refresh on the screen  
@@ -185,15 +191,19 @@
     void ScaleDecodedBitmapL(TInt aBitmapIndex);
 
     /*
-     * InitiateHDMI
-     */
-    void InitiateHdmiL(CFbsBitmap* aFsBitmap,const TDesC& aImageFile);
+	 * Initiate HDMI
+	 */
+	void InitiateHdmiL(CFbsBitmap* aFsBitmap, const TDesC& aImageFile,
+			const TDesC& aNextImageFile);
+    
+    void DecodeNextImageL();
 
 private:
     RWindow*        iWindow;                        // window object
     CFbsBitmap*     iFsBitmap;                      // FS bitmap
     MGlxGenCallback* iCallBack;                     // callback to the HdmiContainer window
-    HBufC*          iImagePath;                     // To store the image uri path
+    HBufC*          iImagePath;                     // To store the image uri path    
+    HBufC*          iNextImagePath;                 // To store the image uri path
 
     // GCE Surface
     RSurfaceUpdateSession iSurfUpdateSession;
@@ -227,9 +237,13 @@
     TBool       iBitmapReady;                       // If the bitmap is decoded and ready
     TBool       iAutoZoomOut;                       // If the UI has asked for auto zoomout
     TBool       iSurfSessionConnected;              // If surface session is connected
-	TBool iShiftToCloning;
+    TBool       iShiftToCloning;
     TBool       iShwFsThumbnail;                    // If the Fs thumbnail is to be shown before decoding HD images
     TBool       iIsNonJpeg;                         // If the item is non jpeg
+    MGlxHDMIDecoderObserver& iDecoderObserver;      // doesn't own
+    TBool       iDecodingCurrent;                   // Decoding Current Image
+    TBool       iDecodingNext;                      // Decoding Next Image
+    TBool       iDecodingNextFailed;                // Decoding Next Image
 
 #ifdef _DEBUG
     TTime iStartTime;
--- a/photosgallery/viewframework/tvout/src/glxhdmicontroller.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/tvout/src/glxhdmicontroller.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -1,19 +1,19 @@
 /*
-* 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:    
-*
-*/
+ * 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:    
+ *
+ */
 
 #include <w32std.h>
 #include <alf/alfutil.h>
@@ -28,10 +28,12 @@
 // -----------------------------------------------------------------------------
 // NewLC
 // -----------------------------------------------------------------------------
-EXPORT_C CGlxHdmiController* CGlxHdmiController::NewL()
+EXPORT_C CGlxHdmiController* CGlxHdmiController::NewL(
+        MGlxHDMIDecoderObserver& aDecoderObserver)
     {
     TRACER("CGlxHdmiController* CGlxHdmiController::NewL()");
-    CGlxHdmiController* self = new (ELeave) CGlxHdmiController();
+    CGlxHdmiController* self = new (ELeave) CGlxHdmiController(
+            aDecoderObserver);
     CleanupStack::PushL(self);
     self->ConstructL();
     CleanupStack::Pop(self);
@@ -47,23 +49,22 @@
     DestroySurfaceUpdater();
     DestroyContainer();
     delete iStoredImagePath;
-    iStoredImagePath = NULL;
+    delete iStoredNextImagePath;
     if (iFsBitmap)
         {
         delete iFsBitmap;
-        iFsBitmap = NULL;
         }
-    if(iGlxTvOut)
-		{
+    if (iGlxTvOut)
+        {
         delete iGlxTvOut;
-		}
+        }
     }
 
 // -----------------------------------------------------------------------------
 // Setting an Image Path 
 // -----------------------------------------------------------------------------
-EXPORT_C void CGlxHdmiController::SetImageL(const TDesC& aImageFile, CFbsBitmap* aFsBitmap,
-                                             TBool aStore)
+EXPORT_C void CGlxHdmiController::SetImageL(const TDesC& aImageFile,
+        const TDesC& aNextImageFile, CFbsBitmap* aFsBitmap, TBool aStore)
     {
     TRACER("CGlxHdmiController::SetImageL()");
     if (aFsBitmap == NULL || !aImageFile.Length())
@@ -74,28 +75,29 @@
     if (aStore)
         {
         iIsImageSupported = ETrue;
-        StoreImageInfoL( aImageFile, aFsBitmap );
+        StoreImageInfoL(aImageFile, aNextImageFile, aFsBitmap);
         }
     if (iGlxTvOut->IsHDMIConnected())
         {
-        iIsPhotosInForeground = ETrue;         // the image should be in posting mode
+        iIsPhotosInForeground = ETrue; // the image should be in posting mode
         GLX_LOG_INFO("CGlxHdmiController::SetImageL() - 2");
         // do not close the surface , use the same surface instead.
         // Call a function to pass imagefile
         if (!iHdmiContainer)
-            {            
-            CreateHdmiContainerL(); 
-            }            
+            {
+            CreateHdmiContainerL();
+            }
         if (!iSurfaceUpdater)
             {
             // This case would come when surface updater is not created at the first instance and also
             // it satisfies the 720p condition                
-            CreateSurfaceUpdaterL(aImageFile);
+            CreateSurfaceUpdaterL(aImageFile, aNextImageFile);
             }
         else
             {
             GLX_LOG_INFO("CGlxHdmiController::SetImageL() - 3");
-            iSurfaceUpdater->UpdateNewImageL(aImageFile, aFsBitmap);
+            iSurfaceUpdater->UpdateNewImageL(aImageFile, aNextImageFile,
+                    aFsBitmap);
             }
         iHdmiContainer->DrawNow();
         }
@@ -114,7 +116,6 @@
         }
     }
 
-
 // -----------------------------------------------------------------------------
 // ActivateZoom 
 // -----------------------------------------------------------------------------
@@ -170,10 +171,11 @@
             // thus Background - Foreground when headphones connected during HDMI connected
             if (iFsBitmap == NULL || !iStoredImagePath->Length())
                 {
-                GLX_LOG_INFO("CGlxHdmiController::ShiftToPostingMode() - NULL Uri");
+                GLX_LOG_INFO(
+                        "CGlxHdmiController::ShiftToPostingMode() - NULL Uri");
                 return;
                 }
-            SetImageL(iStoredImagePath->Des(), iFsBitmap, EFalse);
+            SetImageL(iStoredImagePath->Des(), KNullDesC, iFsBitmap, EFalse);
             }
         else
             {
@@ -189,17 +191,16 @@
 EXPORT_C TBool CGlxHdmiController::IsHDMIConnected()
     {
     TRACER("CGlxHdmiController::IsHDMIConnected()");
-    return iGlxTvOut->IsHDMIConnected(); 
+    return iGlxTvOut->IsHDMIConnected();
     }
 
-
 // -----------------------------------------------------------------------------
 // Constructor
 // -----------------------------------------------------------------------------
-CGlxHdmiController::CGlxHdmiController():
-            iFsBitmap(NULL),
-            iStoredImagePath(NULL),
-            iIsPhotosInForeground(EFalse)
+CGlxHdmiController::CGlxHdmiController(
+        MGlxHDMIDecoderObserver& aDecoderObserver) :
+    iFsBitmap(NULL), iStoredImagePath(NULL), iStoredNextImagePath(NULL),
+            iIsPhotosInForeground(EFalse), iDecoderObserver(aDecoderObserver)
     {
     TRACER("CGlxHdmiController::CGlxHdmiController()");
     // Implement nothing here
@@ -222,7 +223,8 @@
     TRACER("CGlxHdmiController::DestroyContainer()");
     if (iHdmiContainer)
         {
-        GLX_LOG_INFO("CGlxHdmiController::DestroyHdmi() - deleting iHdmiContainer 1");
+        GLX_LOG_INFO(
+                "CGlxHdmiController::DestroyHdmi() - deleting iHdmiContainer 1");
         delete iHdmiContainer;
         iHdmiContainer = NULL;
         }
@@ -238,7 +240,7 @@
         {
         delete iSurfaceUpdater;
         iSurfaceUpdater = NULL;
-        }    
+        }
     }
 
 // -----------------------------------------------------------------------------
@@ -254,32 +256,40 @@
 // -----------------------------------------------------------------------------
 // CreateSurfaceUpdaterL 
 // -----------------------------------------------------------------------------
-void CGlxHdmiController::CreateSurfaceUpdaterL(const TDesC& aImageFile)
+void CGlxHdmiController::CreateSurfaceUpdaterL(const TDesC& aImageFile,
+        const TDesC& aNextImageFile)
     {
     TRACER("CGlxHdmiController::CreateSurfaceUpdater()");
     RWindow* window = iHdmiContainer->GetWindow();
-    iSurfaceUpdater = CGlxHdmiSurfaceUpdater::NewL(window, aImageFile, iFsBitmap,
-                                                    iHdmiContainer);
+    iSurfaceUpdater = CGlxHdmiSurfaceUpdater::NewL(window, aImageFile,
+            aNextImageFile, iFsBitmap, iHdmiContainer, iDecoderObserver);
     iHdmiContainer->DrawNow();
     }
 
 // -----------------------------------------------------------------------------
 // StoreImageInfoL 
 // -----------------------------------------------------------------------------
-void CGlxHdmiController::StoreImageInfoL(const TDesC& aImageFile, CFbsBitmap* aFsBitmap)
+void CGlxHdmiController::StoreImageInfoL(const TDesC& aImageFile,
+        const TDesC& aNextImageFile, CFbsBitmap* aFsBitmap)
     {
     TRACER("CGlxHdmiController::StoreImageInfoL()");
-    if(iStoredImagePath)
+    if (iStoredImagePath)
         {
         delete iStoredImagePath;
         iStoredImagePath = NULL;
         }
+    if (iStoredNextImagePath)
+        {
+        delete iStoredNextImagePath;
+        iStoredNextImagePath = NULL;
+        }
     if (iFsBitmap)
         {
         delete iFsBitmap;
         iFsBitmap = NULL;
         }
     iStoredImagePath = aImageFile.AllocL();
+    iStoredNextImagePath = aNextImageFile.AllocL();
     iFsBitmap = new (ELeave) CFbsBitmap;
     iFsBitmap->Duplicate(aFsBitmap->Handle());
     }
@@ -287,30 +297,46 @@
 // -----------------------------------------------------------------------------
 // HandleTvStatusChangedL 
 // -----------------------------------------------------------------------------
-void CGlxHdmiController::HandleTvStatusChangedL( TTvChangeType aChangeType )
+void CGlxHdmiController::HandleTvStatusChangedL(TTvChangeType aChangeType)
     {
     TRACER("CGlxHdmiController::HandleTvStatusChangedL()");
-    if ( aChangeType == ETvConnectionChanged )          
+    if (aChangeType == ETvConnectionChanged)
         {
-        if ( iGlxTvOut->IsHDMIConnected() && iGlxTvOut->IsConnected() && iSurfaceUpdater)
+        if (iGlxTvOut->IsHDMIConnected() && iGlxTvOut->IsConnected()
+                && iSurfaceUpdater)
             {
-            GLX_LOG_INFO("CGlxHdmiController::HandleTvStatusChangedL() - HDMI and TV Connected");
+            GLX_LOG_INFO(
+                    "CGlxHdmiController::HandleTvStatusChangedL() - HDMI and TV Connected");
             // Do nothing , as this means HDMI is already connected and headset/tv cable connected
             // meaning we shouldnt destroy HDMI and neither have to create surface updater.
             return;
             }
-        else if ( iGlxTvOut->IsHDMIConnected() && iIsImageSupported && iIsPhotosInForeground)
+        else if (iGlxTvOut->IsHDMIConnected() && iIsImageSupported
+                && iIsPhotosInForeground)
             {
-            GLX_LOG_INFO("CGlxHdmiController::HandleTvStatusChangedL() - HDMI Connected");
+            GLX_LOG_INFO(
+                    "CGlxHdmiController::HandleTvStatusChangedL() - HDMI Connected");
             // Calling SetImageL() with appropriate parameters
-            SetImageL(iStoredImagePath->Des(), iFsBitmap, EFalse);
+            if (iStoredNextImagePath)
+                {
+                SetImageL(iStoredImagePath->Des(),
+                        iStoredNextImagePath->Des(), iFsBitmap, EFalse);
+                }
+            else
+                {
+                SetImageL(iStoredImagePath->Des(), KNullDesC, iFsBitmap,
+                        EFalse);
+                }
             }
         else
             {
-            GLX_LOG_INFO3("CGlxHdmiController::HandleTvStatusChangedL() iIsImageSupported=%d, iGlxTvOut->IsHDMIConnected()=%d, iIsPostingMode=%d", 
-                    iIsImageSupported,iGlxTvOut->IsHDMIConnected(),iIsPhotosInForeground);
+            GLX_LOG_INFO3(
+                    "CGlxHdmiController::HandleTvStatusChangedL() iIsImageSupported=%d, iGlxTvOut->IsHDMIConnected()=%d, iIsPostingMode=%d",
+                    iIsImageSupported, iGlxTvOut->IsHDMIConnected(),
+                    iIsPhotosInForeground);
             // if it gets disconnected, destroy the surface 
-            GLX_LOG_INFO("CGlxHdmiController::HandleTvStatusChangedL() - HDMI Not Connected");
+            GLX_LOG_INFO(
+                    "CGlxHdmiController::HandleTvStatusChangedL() - HDMI Not Connected");
             DestroySurfaceUpdater();
             }
         }
--- a/photosgallery/viewframework/tvout/src/glxhdmisurfaceupdater.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/tvout/src/glxhdmisurfaceupdater.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -1,23 +1,24 @@
 /*
-* 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:    
-*
-*/
+ * 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:    
+ *
+ */
 
 #include <graphics/surface.h>
 #include <graphics/surfacemanager.h>
 #include <graphics/surfaceupdateclient.h>
+#include <graphics/surface_hints.h>
 #include <e32math.h>
 #include <apgcli.h>
 
@@ -45,14 +46,16 @@
 // -----------------------------------------------------------------------------
 // NewLC
 // -----------------------------------------------------------------------------
-CGlxHdmiSurfaceUpdater* CGlxHdmiSurfaceUpdater::NewL(RWindow* aWindow, const TDesC& aImageFile, 
-                                                      CFbsBitmap* aFsBitmap, 
-                                                      MGlxGenCallback* aCallBack)
+CGlxHdmiSurfaceUpdater* CGlxHdmiSurfaceUpdater::NewL(RWindow* aWindow,
+        const TDesC& aImageFile, const TDesC& aNextImageFile,
+        CFbsBitmap* aFsBitmap, MGlxGenCallback* aCallBack,
+        MGlxHDMIDecoderObserver& aDecoderObserver)
     {
     TRACER("CGlxHdmiSurfaceUpdater* CGlxHdmiSurfaceUpdater::NewL()");
-    CGlxHdmiSurfaceUpdater* self = new (ELeave) CGlxHdmiSurfaceUpdater(aWindow, aCallBack);
+    CGlxHdmiSurfaceUpdater* self = new (ELeave) CGlxHdmiSurfaceUpdater(
+            aWindow, aCallBack, aDecoderObserver);
     CleanupStack::PushL(self);
-    self->ConstructL(aFsBitmap,aImageFile);
+    self->ConstructL(aFsBitmap, aImageFile, aNextImageFile);
     CleanupStack::Pop(self);
     return self;
     }
@@ -63,41 +66,48 @@
 CGlxHdmiSurfaceUpdater::~CGlxHdmiSurfaceUpdater()
     {
     TRACER("CGlxHdmiSurfaceUpdater::~CGlxHdmiSurfaceUpdater()");
+    GLX_LOG_INFO(
+            "CGlxHdmiSurfaceUpdater::~CGlxHdmiSurfaceUpdater()-EHdmiDisconnected");
+    TRAP_IGNORE(iDecoderObserver.HandleHDMIDecodingEventL(EHdmiDisconnected));
+
     ReleaseContent();
-    if(iWindow)
+    if (iWindow)
         {
         iWindow->RemoveBackgroundSurface(ETrue);
         }
-	if(iTimer && iTimer->IsActive())	 	 	 // Check for a CPeriodic Instance
+    if (iTimer && iTimer->IsActive()) // Check for a CPeriodic Instance
         {
         iTimer->Cancel();
         }
-    delete iTimer;   
+    delete iTimer;
     if (iGlxDecoderAO)
         {
         delete iGlxDecoderAO;
-        }        
+        }
     iGlxDecoderAO = NULL;
     iFsSession.Close();
     if (iSurfManager)
         {
-        GLX_LOG_INFO("CGlxHdmiSurfaceUpdater::~CGlxHdmiSurfaceUpdater() - Close"); 
-        if(iSurfSessionConnected)
+        GLX_LOG_INFO(
+                "CGlxHdmiSurfaceUpdater::~CGlxHdmiSurfaceUpdater() - Close");
+        if (iSurfSessionConnected)
             {
             iSurfUpdateSession.Close();
             }
         if (iSurfChunk)
             {
             iSurfChunk->Close();
-            }            
+            }
         delete iSurfChunk;
-        iSurfChunk = NULL;        
-        GLX_LOG_INFO("CGlxHdmiSurfaceUpdater::~CGlxHdmiSurfaceUpdater(). iSurfManager->CloseSurface()"); 
+        iSurfChunk = NULL;
+        GLX_LOG_INFO(
+                "CGlxHdmiSurfaceUpdater::~CGlxHdmiSurfaceUpdater(). iSurfManager->CloseSurface()");
         iSurfManager->CloseSurface(iSurfId);
-        GLX_LOG_INFO("CGlxHdmiSurfaceUpdater::~CGlxHdmiSurfaceUpdater(). iSurfManager->Close()"); 
+        GLX_LOG_INFO(
+                "CGlxHdmiSurfaceUpdater::~CGlxHdmiSurfaceUpdater(). iSurfManager->Close()");
         iSurfManager->Close();
         delete iSurfManager;
-        iSurfManager = NULL;       
+        iSurfManager = NULL;
         }
     }
 
@@ -106,8 +116,8 @@
 // -----------------------------------------------------------------------------
 void CGlxHdmiSurfaceUpdater::ReleaseContent()
     {
-    TRACER("void CGlxHdmiSurfaceUpdater::ReleaseContent()"); 
-    if ( iGlxDecoderAO )
+    TRACER("void CGlxHdmiSurfaceUpdater::ReleaseContent()");
+    if (iGlxDecoderAO)
         {
         GLX_LOG_INFO("CGlxHdmiSurfaceUpdater::ReleaseContent() -1");
         iGlxDecoderAO->Cancel();
@@ -118,25 +128,25 @@
         delete iFsBitmap;
         iFsBitmap = NULL;
         }
-    for (TInt i=0; i<=2 ; i++)
+    for (TInt i = 0; i <= 2; i++)
         {
         GLX_LOG_INFO1("CGlxHdmiSurfaceUpdater::ReleaseContent() -3, %d", i);
         delete iDecodedBitmap[i];
-        iDecodedBitmap[i]= NULL;
+        iDecodedBitmap[i] = NULL;
         }
     GLX_LOG_INFO("CGlxHdmiSurfaceUpdater::ReleaseContent() -4");
-    if(iSurfBufferAO && iSurfBufferAO->IsActive())
+    if (iSurfBufferAO && iSurfBufferAO->IsActive())
         {
         GLX_LOG_INFO("CGlxHdmiSurfaceUpdater::ReleaseContent() -5");
-		iSurfBufferAO->Cancel();
+        iSurfBufferAO->Cancel();
         }
-    if ( iImageDecoder )
+    if (iImageDecoder)
         {
         GLX_LOG_INFO("CGlxHdmiSurfaceUpdater::ReleaseContent() -6");
         delete iImageDecoder;
-        iImageDecoder = NULL;    
+        iImageDecoder = NULL;
         }
-    if (iSurfSessionConnected &&  iSurfManager)
+    if (iSurfSessionConnected && iSurfManager)
         {
         GLX_LOG_INFO("CGlxHdmiSurfaceUpdater::ReleaseContent() -7");
         iSurfUpdateSession.CancelAllUpdateNotifications();
@@ -152,9 +162,9 @@
 // CTor 
 // -----------------------------------------------------------------------------
 CGlxHdmiSurfaceUpdater::CGlxHdmiSurfaceUpdater(RWindow* aWindow,
-                          MGlxGenCallback* aCallBack): 
-                          iWindow(aWindow), iCallBack(aCallBack), 
-                          iShwFsThumbnail(ETrue), iIsNonJpeg(EFalse)
+        MGlxGenCallback* aCallBack, MGlxHDMIDecoderObserver& aDecoderObserver) :
+    iWindow(aWindow), iCallBack(aCallBack), iShwFsThumbnail(ETrue),
+            iIsNonJpeg(EFalse), iDecoderObserver(aDecoderObserver)
     {
     TRACER("CGlxHdmiSurfaceUpdater::CGlxHdmiSurfaceUpdater()");
     // Implement nothing here
@@ -163,16 +173,22 @@
 // -----------------------------------------------------------------------------
 // ConstructL 
 // -----------------------------------------------------------------------------
-void CGlxHdmiSurfaceUpdater::ConstructL(CFbsBitmap* aFsBitmap, const TDesC& aImageFile)
+void CGlxHdmiSurfaceUpdater::ConstructL(CFbsBitmap* aFsBitmap,
+        const TDesC& aImageFile, const TDesC& aNextImageFile)
     {
     TRACER("CGlxHdmiSurfaceUpdater::ConstructL()");
     // Initiate the HDMI by assigning the necessary values
-    InitiateHdmiL(aFsBitmap,aImageFile);
-    
-    TInt error = iFsSession.Connect ();
-    GLX_LOG_INFO1("CGlxHdmiSurfaceUpdater::ConstructL() FsSession Connect error = %d", error);
+    InitiateHdmiL(aFsBitmap, aImageFile, aNextImageFile);
+
+    TInt error = iFsSession.Connect();
+    GLX_LOG_INFO1(
+            "CGlxHdmiSurfaceUpdater::ConstructL() FsSession Connect error = %d",
+            error);
     User::LeaveIfError(error);
     iShiftToCloning = EFalse;
+    iDecodingCurrent = EFalse;
+    iDecodingNext = EFalse;
+    iDecodingNextFailed = EFalse;
     // Create the active object
     iGlxDecoderAO = CGlxHdmiDecoderAO::NewL(this);
 
@@ -183,38 +199,83 @@
     CreateBitmapL();
 
     // Create the surface and AO for updating the surface
-    TRAP_IGNORE(CreateHdmiL());
+    TRAP_IGNORE( CreateHdmiL());
 
-    if(iSurfManager)
+    if (iSurfManager)
         {
         error = iSurfUpdateSession.Connect();
-        GLX_LOG_INFO1("CGlxHdmiSurfaceUpdater::ConstructL() Surface update Session Connect error = %d", error);
+        GLX_LOG_INFO1(
+                "CGlxHdmiSurfaceUpdater::ConstructL() Surface update Session Connect error = %d",
+                error);
         User::LeaveIfError(error);
         iSurfSessionConnected = ETrue;
 
-        ShowFsThumbnailL();
+        if (!aNextImageFile.Length())
+            {
+            ShowFsThumbnailL();
+            }
+        else
+            {
+            // Modify the surface position with respect to the buffer size 
+            ModifySurfacePostion();
+            }
 #ifdef _DEBUG
         iStartTime.HomeTime();
 #endif
         //start decoding the image    
-        iGlxDecoderAO->ConvertImageL(*iDecodedBitmap[EJpgDecodedBitmapIndex],iImageDecoder);   
+        iGlxDecoderAO->ConvertImageL(*iDecodedBitmap[EJpgDecodedBitmapIndex],
+                iImageDecoder);
+        iDecoderObserver.HandleHDMIDecodingEventL(EHdmiDecodingStarted);
+        iDecodingCurrent = ETrue;
         }
-    iTimer = CPeriodic::NewL( CActive::EPriorityStandard );
+    iTimer = CPeriodic::NewL(CActive::EPriorityStandard);
     }
 
 // -----------------------------------------------------------------------------
 // UpdateNewImageL 
 // -----------------------------------------------------------------------------
-void CGlxHdmiSurfaceUpdater::UpdateNewImageL(const TDesC& aImageFile,CFbsBitmap* aFsBitmap)
+void CGlxHdmiSurfaceUpdater::UpdateNewImageL(const TDesC& aImageFile,
+        const TDesC& aNextImageFile, CFbsBitmap* aFsBitmap)
     {
     TRACER("CGlxHdmiSurfaceUpdater::UpdateNewImageL()");
-    ReleaseContent();   
+    if (!aImageFile.CompareC(*iImagePath) && !iDecodingCurrent
+            && !iDecodingNext)
+        {
+        iNextImagePath = aNextImageFile.Alloc();
+        GLX_LOG_INFO(
+                "CGlxHdmiSurfaceUpdater::UpdateNewImageL() - Decoded Image is ready ");
+        if (iDecodingNextFailed)
+            {
+            ShiftToCloningMode();
+            iDecodingNextFailed = EFalse;
+            }
+        else if (iSurfManager)
+            {
+            iShwFsThumbnail = EFalse;
+            if (iIsNonJpeg)
+                {
+                // if this is non jpeg image, make sure we scale the bitmap
+                ScaleDecodedBitmapL( ENonJpgDecodedBitmapIndex);
+                }
+            // Modify the surface position with respect to the buffer size 
+            ModifySurfacePostion();
+            ProcessTvImage();
+            iWindow->SetBackgroundSurface(iConfig, ETrue);
+            iBitmapReady = ETrue;
+            return;
+            }
+        }
+    else
+        {
+        ReleaseContent();
+        }
     // Initiate the HDMI by assigning the necessary values
-    InitiateHdmiL(aFsBitmap,aImageFile);
+    InitiateHdmiL(aFsBitmap, aImageFile, aNextImageFile);
     //Cancel the zoom timers if any
-    if(iTimer->IsActive())
+    if (iTimer->IsActive())
         {
-        GLX_LOG_INFO("CGlxHdmiSurfaceUpdater::UpdateNewImageL() - Cancel Timer");
+        GLX_LOG_INFO(
+                "CGlxHdmiSurfaceUpdater::UpdateNewImageL() - Cancel Timer");
         iTimer->Cancel();
         }
 
@@ -223,42 +284,47 @@
 
     // Create the Bitmap
     CreateBitmapL();
-    if(iSurfManager)
+    if (iSurfManager)
         {
         // Create the surface and AO for updating the surface
-        CreateHdmiL(EFalse);
+        CreateHdmiL( EFalse);
         }
     else
         {
-        TRAP_IGNORE(CreateHdmiL(ETrue));
+        TRAP_IGNORE( CreateHdmiL(ETrue));
         }
 
 #ifdef _DEBUG
     iStartTime.HomeTime();
 #endif
-    if(iSurfManager)
+    if (iSurfManager)
         {
         // Show FS Thumbnail
         ShowFsThumbnailL();
         //start decoding the image
-        iGlxDecoderAO->ConvertImageL(*iDecodedBitmap[EJpgDecodedBitmapIndex],iImageDecoder);
+        iGlxDecoderAO->ConvertImageL(*iDecodedBitmap[EJpgDecodedBitmapIndex],
+                iImageDecoder);
+        iDecoderObserver.HandleHDMIDecodingEventL(EHdmiDecodingStarted);
+        iDecodingCurrent = ETrue;
         }
     }
 
 // -----------------------------------------------------------------------------
 // InitiateHdmiL 
 // -----------------------------------------------------------------------------
-void CGlxHdmiSurfaceUpdater::InitiateHdmiL(CFbsBitmap* aFsBitmap,const TDesC& aImageFile)
+void CGlxHdmiSurfaceUpdater::InitiateHdmiL(CFbsBitmap* aFsBitmap,
+        const TDesC& aImageFile, const TDesC& aNextImageFile)
     {
     TRACER("CGlxHdmiSurfaceUpdater::InitiateHdmiL()");
     iImagePath = aImageFile.Alloc();
+    iNextImagePath = aNextImageFile.Alloc();
     iFsBitmap = new (ELeave) CFbsBitmap;
     iFsBitmap->Duplicate(aFsBitmap->Handle());
     iIsNonJpeg = EFalse;
     iTvScreenSize = iWindow->Size();
 
     iBitmapReady = EFalse;
-    iLeftCornerForZoom.iX = 0; 
+    iLeftCornerForZoom.iX = 0;
     iLeftCornerForZoom.iY = 0;
 
     iZoom = ETrue;
@@ -270,19 +336,19 @@
 void CGlxHdmiSurfaceUpdater::CreateHdmiL(TBool aCreateSurface)
     {
     TRACER("CGlxHdmiSurfaceUpdater::CreateHdmiL()");
-    
+
     if (aCreateSurface)
         {
         GLX_LOG_INFO("CGlxHdmiSurfaceUpdater::CreateHdmiL() Create Surface");
-        CreateSurfaceL();        
+        CreateSurfaceL();
         }
-    
+
     // Active objects for double buffered draw signalling
-    if(!iSurfBufferAO)
+    if (!iSurfBufferAO)
         {
-        iSurfBufferAO = new(ELeave) CGlxActiveCallBack(TCallBack(SurfBuffer0Ready, this),
-                    CActive::EPriorityStandard-1);
-        CActiveScheduler::Add(iSurfBufferAO);    
+        iSurfBufferAO = new (ELeave) CGlxActiveCallBack(TCallBack(
+                SurfBuffer0ReadyL, this), CActive::EPriorityStandard - 1);
+        CActiveScheduler::Add( iSurfBufferAO);
         }
     }
 
@@ -292,38 +358,54 @@
 void CGlxHdmiSurfaceUpdater::CreateSurfaceL()
     {
     TRACER("CGlxHdmiSurfaceUpdater::CreateSurfaceL()");
-    iSurfManager = new(ELeave) RSurfaceManager();
+    iSurfManager = new (ELeave) RSurfaceManager();
     TInt error = iSurfManager->Open();
-    GLX_LOG_INFO1("CGlxHdmiSurfaceUpdater::CreateSurfaceL Open Surface manager error = %d", error);
+    GLX_LOG_INFO1(
+            "CGlxHdmiSurfaceUpdater::CreateSurfaceL Open Surface manager error = %d",
+            error);
     User::LeaveIfError(error);
-    
+
+    //Need to set the surface Hint for the surface to indicate
+    //that photos do not need overscan compensation and the image will
+    //be displayed in 720p resolution. 
+    //Refer error: HJVA-85DD25 for more info.
+    RSurfaceManager::THintPair surfHint;
+    TUid uid(KNullUid);
+    uid.iUid = surfaceHints::KSurfaceContent;
+    surfHint.Set(uid, surfaceHints::EStillImage, EFalse);
+
     RSurfaceManager::TSurfaceCreationAttributesBuf attributes;
-    attributes().iPixelFormat           = EUidPixelFormatARGB_8888;// EUidPixelFormatYUV_420Planar;
-    attributes().iSize                  = iTvScreenSize;
-    
-    attributes().iBuffers               = 1;
-    attributes().iStride                = iTvScreenSize.iWidth * KMulFactorToCreateBitmap;  
-    attributes().iAlignment             = KMulFactorToCreateBitmap;
-    attributes().iContiguous            = EFalse;
-    attributes().iMappable              = ETrue;
-        
+    attributes().iPixelFormat = EUidPixelFormatARGB_8888;// EUidPixelFormatYUV_420Planar;
+    attributes().iSize = iTvScreenSize;
+
+    attributes().iBuffers = 1;
+    attributes().iStride = iTvScreenSize.iWidth * KMulFactorToCreateBitmap;
+    attributes().iAlignment = KMulFactorToCreateBitmap;
+    attributes().iContiguous = EFalse;
+    attributes().iMappable = ETrue;
+    attributes().iSurfaceHints = &surfHint;
+    attributes().iHintCount = 1;
+
     error = iSurfManager->CreateSurface(attributes, iSurfId);
-    GLX_LOG_INFO1("CGlxHdmiSurfaceUpdater::CreateSurfaceL, Creating surface error : %d",error);
-    if(error == KErrNoMemory)
-    	{
-    	GLX_LOG_INFO("CGlxHdmiSurfaceUpdater::CreateSurfaceL(). iSurfManager->Close()"); 
-		iSurfManager->Close();
-		delete iSurfManager;
-		iSurfManager = NULL;
-    	if(iShiftToCloning == EFalse)
-    		{
-    		GlxGeneralUiUtilities::ShowErrorNoteL(error); // Show Low Memory Popup Once before shifting to Cloning Mode
-    		iShiftToCloning = ETrue;
-    		}
-    	ShiftToCloningMode();	 	 	 	 	 	 	  // Shift from Posting Mode to Cloning Mode
-    	}
+    GLX_LOG_INFO1(
+            "CGlxHdmiSurfaceUpdater::CreateSurfaceL, Creating surface error : %d",
+            error);
+    if (error == KErrNoMemory)
+        {
+        GLX_LOG_INFO(
+                "CGlxHdmiSurfaceUpdater::CreateSurfaceL(). iSurfManager->Close()");
+        iSurfManager->Close();
+        delete iSurfManager;
+        iSurfManager = NULL;
+        if (iShiftToCloning == EFalse)
+            {
+            GlxGeneralUiUtilities::ShowErrorNoteL(error); // Show Low Memory Popup Once before shifting to Cloning Mode
+            iShiftToCloning = ETrue;
+            }
+        ShiftToCloningMode(); // Shift from Posting Mode to Cloning Mode
+        }
     User::LeaveIfError(error);
-        
+
     //Map the surface and stride the surface info
     MapSurfaceL();
     // Set the Configuration to the surface ID when creating a surface
@@ -336,33 +418,52 @@
 void CGlxHdmiSurfaceUpdater::MapSurfaceL()
     {
     TRACER("CGlxHdmiSurfaceUpdater::MapSurfaceL()");
-    
+
     //Create chunk to map it to the surface ID.
-    iSurfChunk = new(ELeave) RChunk();
-    User::LeaveIfNull(iSurfChunk);    
+    iSurfChunk = new (ELeave) RChunk();
+    User::LeaveIfNull( iSurfChunk);
     TInt error = iSurfManager->MapSurface(iSurfId, *iSurfChunk);
-    GLX_LOG_INFO1("CGlxHdmiSurfaceUpdater::MapSurfaceL(), MapSurface 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);
-    GLX_LOG_INFO1("CGlxHdmiSurfaceUpdater::MapSurfaceL(), SurfaceInfo error : %d",error);
-    User::LeaveIfError(error);  
-    
-    iSurfaceStride = info().iStride;    
+    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;
+    iSurfManager->GetBufferOffset(iSurfId, 0, offset);
+    iSurfBuffer = iSurfChunk->Base() + offset;
     }
 
 // -----------------------------------------------------------------------------
-// SurfBuffer0Ready 
+// SurfBuffer0ReadyL 
 // -----------------------------------------------------------------------------
-TInt CGlxHdmiSurfaceUpdater::SurfBuffer0Ready(TAny* /*aObject*/)
+TInt CGlxHdmiSurfaceUpdater::SurfBuffer0ReadyL(TAny* aObject)
     {
-    TRACER("CGlxHdmiSurfaceUpdater::SurfBuffer0Ready()");
+    TRACER("CGlxHdmiSurfaceUpdater::SurfBuffer0ReadyL()");
+    CGlxHdmiSurfaceUpdater* self =
+            reinterpret_cast<CGlxHdmiSurfaceUpdater*> (aObject);
+    if (!self->iShwFsThumbnail)
+        {
+        self->iDecodingCurrent = EFalse;
+        if (self->iNextImagePath->Length())
+            {
+            self->DecodeNextImageL();
+            }
+        else
+            {
+            self->iDecoderObserver.HandleHDMIDecodingEventL(
+                    EHdmiDecodingCompleted);
+            }
+        }
     return ETrue;
     }
 
@@ -373,10 +474,10 @@
     {
     TRACER("CGlxHdmiSurfaceUpdater::Refresh()");
     // copy the decoded bitmap on to the surface
-    SwapBuffers();     
+    SwapBuffers();
 
     // refresh the window
-    iCallBack->DoGenCallback();       
+    iCallBack->DoGenCallback();
     }
 
 // -----------------------------------------------------------------------------
@@ -386,50 +487,52 @@
 // -----------------------------------------------------------------------------
 void CGlxHdmiSurfaceUpdater::SwapBuffers()
     {
-    TRACER("CGlxHdmiSurfaceUpdater::SwapBuffers()"); 
+    TRACER("CGlxHdmiSurfaceUpdater::SwapBuffers()");
     TInt bitmapIndex = KErrNotFound;
-    
+
     if (iShwFsThumbnail) // show FS thumbnail
         {
         bitmapIndex = EFSBitmapIndex;
         }
-    else if(iIsNonJpeg && !iShwFsThumbnail) // this indicates it is non jpeg image and decoding finished
+    else if (iIsNonJpeg && !iShwFsThumbnail) // this indicates it is non jpeg image and decoding finished
         {
         bitmapIndex = ENonJpgDecodedBitmapIndex;
         }
-    else                // if none of the above state means it is jpeg image and decoding finished
+    else // if none of the above state means it is jpeg image and decoding finished
         {
         bitmapIndex = EJpgDecodedBitmapIndex;
         }
-        
+
     // Lock the heap so that subsequent call to dataaddress doesnt happen
-    iDecodedBitmap[bitmapIndex]->LockHeap();    
+    iDecodedBitmap[bitmapIndex]->LockHeap();
 
     // Data stride
-    TUint fs = iDecodedBitmap[bitmapIndex]->DataStride();    
+    TUint fs = iDecodedBitmap[bitmapIndex]->DataStride();
 
     //Bitmap address from where the data has to be copied.
-    TUint8* from = (TUint8*)iDecodedBitmap[bitmapIndex]->DataAddress();
+    TUint8* from = (TUint8*) iDecodedBitmap[bitmapIndex]->DataAddress();
 
     //surface chunk address to where the bitmap data has to be copied.
-    TUint8* to = (TUint8*)iSurfBuffer;    
+    TUint8* to = (TUint8*) iSurfBuffer;
 
     // To buffer (32 bit colors)
     TUint ts = iSurfaceStride;
     //No of bytes to be copied on to the surface.
-    TUint bytes = iDecodedBitmap[bitmapIndex]->SizeInPixels().iWidth * KMulFactorToCreateBitmap;
+    TUint bytes = iDecodedBitmap[bitmapIndex]->SizeInPixels().iWidth
+            * KMulFactorToCreateBitmap;
 
-    GLX_LOG_INFO2("CGlxHdmiSurfaceUpdater::SwapBuffers() - decodeSize width = %d and height %d",
-            iDecodedBitmap[bitmapIndex]->SizeInPixels().iWidth, 
-            iDecodedBitmap[bitmapIndex]->SizeInPixels().iHeight );
+    GLX_LOG_INFO2(
+            "CGlxHdmiSurfaceUpdater::SwapBuffers() - decodeSize width = %d and height %d",
+            iDecodedBitmap[bitmapIndex]->SizeInPixels().iWidth,
+            iDecodedBitmap[bitmapIndex]->SizeInPixels().iHeight);
 
     // Copy the bitmap on to the surface.
-    for (TInt y = iDecodedBitmap[bitmapIndex]->SizeInPixels().iHeight; y >0; y--)
+    for (TInt y = iDecodedBitmap[bitmapIndex]->SizeInPixels().iHeight; y > 0; y--)
         {
-        Mem::Copy(to, from, bytes);        
-        to += ts;        
-        from += fs;        
-        }            
+        Mem::Copy(to, from, bytes);
+        to += ts;
+        from += fs;
+        }
     iDecodedBitmap[bitmapIndex]->UnlockHeap();
     }
 
@@ -440,8 +543,9 @@
     {
     TRACER("CGlxHdmiSurfaceUpdater::CreateBitmapL()");
     TSize imageSize = iImageDecoder->FrameInfo().iOverallSizeInPixels;
-    GLX_LOG_INFO2("CGlxHdmiSurfaceUpdater::StartImageDecodeL() - bitmapsize=%d, %d",
-            imageSize.iWidth,imageSize.iHeight);
+    GLX_LOG_INFO2(
+            "CGlxHdmiSurfaceUpdater::StartImageDecodeL() - bitmapsize=%d, %d",
+            imageSize.iWidth, imageSize.iHeight);
     TReal32 scaleFactor = 0.0f;
     if (iTvScreenSize.iWidth * imageSize.iHeight > iTvScreenSize.iHeight
             * imageSize.iWidth)
@@ -454,17 +558,21 @@
         scaleFactor = (TReal32) iTvScreenSize.iWidth
                 / (TReal32) imageSize.iWidth;
         }
-    GLX_LOG_INFO1("CGlxHdmiSurfaceUpdater::StartImageDecodeL() - scaleFactor=%f",scaleFactor);
+    GLX_LOG_INFO1(
+            "CGlxHdmiSurfaceUpdater::StartImageDecodeL() - scaleFactor=%f",
+            scaleFactor);
     iTargetBitmapSize.iHeight = imageSize.iHeight * scaleFactor;
     iTargetBitmapSize.iWidth = imageSize.iWidth * scaleFactor;
-	GLX_LOG_INFO2("CGlxHdmiSurfaceUpdater::StartImageDecodeL() - targetBitmapSize=%d, %d",
-	        iTargetBitmapSize.iWidth,iTargetBitmapSize.iHeight);
+    GLX_LOG_INFO2(
+            "CGlxHdmiSurfaceUpdater::StartImageDecodeL() - targetBitmapSize=%d, %d",
+            iTargetBitmapSize.iWidth, iTargetBitmapSize.iHeight);
     //create the bitmap for the required size
     iDecodedBitmap[EJpgDecodedBitmapIndex] = new (ELeave) CFbsBitmap();
     // to check if the Mimetype is supported by the decoder to to arbitary scaling
     // if not then we recalculate the size
-    TInt err = iDecodedBitmap[EJpgDecodedBitmapIndex]->Create(ReCalculateSizeL(), EColor16MU);
-    User::LeaveIfNull(iDecodedBitmap[EJpgDecodedBitmapIndex]);
+    TInt err = iDecodedBitmap[EJpgDecodedBitmapIndex]->Create(
+            ReCalculateSizeL(), EColor16MU);
+    User::LeaveIfNull( iDecodedBitmap[EJpgDecodedBitmapIndex]);
     }
 
 // -----------------------------------------------------------------------------
@@ -477,22 +585,25 @@
     RApaLsSession session;
     TDataType mimeType;
     TUid uid;
-    
-    User::LeaveIfError( session.Connect() );
-    CleanupClosePushL( session );
-    User::LeaveIfError( session.AppForDocument( iImagePath->Des(), uid, mimeType ) );
+
+    User::LeaveIfError(session.Connect());
+    CleanupClosePushL(session);
+    User::LeaveIfError(session.AppForDocument(iImagePath->Des(), uid,
+            mimeType));
     CleanupStack::PopAndDestroy(&session);
-    
-    if (mimeType.Des().Compare(KMimeJpeg)==0 ||
-            mimeType.Des().Compare(KMimeJpg)==0)
+
+    if (mimeType.Des().Compare(KMimeJpeg) == 0 || mimeType.Des().Compare(
+            KMimeJpg) == 0)
         {
-        GLX_LOG_INFO("CGlxHdmiSurfaceUpdater::DoesMimeTypeNeedsRecalculateL - jpeg");
+        GLX_LOG_INFO(
+                "CGlxHdmiSurfaceUpdater::DoesMimeTypeNeedsRecalculateL - jpeg");
         return EFalse;
         }
     else
         {
-        GLX_LOG_INFO("CGlxHdmiSurfaceUpdater::DoesMimeTypeNeedsRecalculateL - non jpeg");
-        return ETrue; 
+        GLX_LOG_INFO(
+                "CGlxHdmiSurfaceUpdater::DoesMimeTypeNeedsRecalculateL - non jpeg");
+        return ETrue;
         }
     }
 
@@ -502,16 +613,20 @@
 TSize CGlxHdmiSurfaceUpdater::ReCalculateSizeL()
     {
     TRACER("CGlxHdmiSurfaceUpdater::ReCalculateSizeL()");
-    if(DoesMimeTypeNeedsRecalculateL())
+    if (DoesMimeTypeNeedsRecalculateL())
         {
         iIsNonJpeg = ETrue;
         TSize fullFrameSize = iImageDecoder->FrameInfo().iOverallSizeInPixels;
         // calculate the reduction factor on what size we need
-        TInt reductionFactor = iImageDecoder->ReductionFactor(fullFrameSize, iTargetBitmapSize);
+        TInt reductionFactor = iImageDecoder->ReductionFactor(fullFrameSize,
+                iTargetBitmapSize);
         // get the reduced size onto destination size
         TSize destSize;
-        User::LeaveIfError(iImageDecoder->ReducedSize(fullFrameSize, reductionFactor, destSize));
-        GLX_LOG_INFO2("CGlxHdmiSurfaceUpdater::ReCalculateSizeL() - destSize=%d, %d",destSize.iWidth,destSize.iHeight);
+        User::LeaveIfError(iImageDecoder->ReducedSize(fullFrameSize,
+                reductionFactor, destSize));
+        GLX_LOG_INFO2(
+                "CGlxHdmiSurfaceUpdater::ReCalculateSizeL() - destSize=%d, %d",
+                destSize.iWidth, destSize.iHeight);
         return destSize;
         }
     else
@@ -532,27 +647,44 @@
     GLX_LOG_INFO1("CGlxHdmiSurfaceUpdater::HandleRunL() ConvertImageL took"
             " <%d> us", (TInt)iStopTime.MicroSecondsFrom(iStartTime).Int64());
 #endif
-    if(aStatus.Int() !=KErrNone)
+    if (iDecodingNext)
         {
-        GLX_LOG_INFO("HandleRunL - Convert failed");
-        ShiftToCloningMode();
+        iDecodingNext = EFalse;
+        if (aStatus.Int() != KErrNone)
+            {
+            GLX_LOG_INFO("HandleRunL - Next Convert failed");
+            iDecodingNextFailed = ETrue;
+            }
+        //Inform the observer that image decoding is completed
+        GLX_LOG_INFO(
+                "CGlxHdmiSurfaceUpdater::HandleRunL-EHdmiDecodingCompleted");
+        iDecoderObserver.HandleHDMIDecodingEventL(EHdmiDecodingCompleted);
         }
-    else if(iSurfManager)
-        {        
-        iShwFsThumbnail = EFalse;
-        if (iIsNonJpeg)
+    else
+        {
+        iDecoderObserver.HandleHDMIDecodingEventL(EHdmiDecodingFirstCompleted);
+        if (aStatus.Int() != KErrNone)
+            {
+            GLX_LOG_INFO("HandleRunL - Convert failed");
+            ShiftToCloningMode();
+            }
+        else if (iSurfManager)
             {
-            // if this is non jpeg image, make sure we scale the bitmap
-            ScaleDecodedBitmapL(ENonJpgDecodedBitmapIndex);
+            iShwFsThumbnail = EFalse;
+            if (iIsNonJpeg)
+                {
+                // if this is non jpeg image, make sure we scale the bitmap
+                ScaleDecodedBitmapL( ENonJpgDecodedBitmapIndex);
+                }
+            ProcessTvImage();
+            iBitmapReady = ETrue;
             }
-        ProcessTvImage();
-		iBitmapReady = ETrue;
         }
-	//release imagedecoder after the conversion is over		
-    if(iImageDecoder)
+    //release imagedecoder after the conversion is over
+    if (iImageDecoder)
         {
         delete iImageDecoder;
-        iImageDecoder = NULL;    
+        iImageDecoder = NULL;
         }
     }
 
@@ -562,11 +694,12 @@
 void CGlxHdmiSurfaceUpdater::CreateImageDecoderL()
     {
     TRACER("CGlxHdmiController::CreateImageDecoderL()");
-     // Create a decoder for the image in the named file
-    TRAPD(error,iImageDecoder = CImageDecoder::FileNewL(iFsSession, 
+    // Create a decoder for the image in the named file
+    TRAPD(error, iImageDecoder = CImageDecoder::FileNewL(iFsSession,
             iImagePath->Des(), CImageDecoder::EOptionNone, KNullUid));
-    GLX_LOG_INFO1("CreateImageDecoderL CImageDecoder:FileNewL error %d",error);
-    User::LeaveIfError(error);
+    GLX_LOG_INFO1("CreateImageDecoderL CImageDecoder:FileNewL error %d",
+            error);
+    User::LeaveIfError( error);
     }
 
 // -----------------------------------------------------------------------------
@@ -577,17 +710,17 @@
     TRACER("CGlxHdmiSurfaceUpdater::ActivateZoom()");
     iZoom = ETrue;
     iAutoZoomOut = aAutoZoomOut;
-    if(iTimer->IsActive())
+    if (iTimer->IsActive())
         {
-		GLX_LOG_INFO("CGlxHdmiSurfaceUpdater::ActivateZoom() - Cancel Timer");
+        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 ));
-       }
+
+    if (!iTimer->IsActive() && iBitmapReady)
+        {
+        GLX_LOG_INFO("CGlxHdmiSurfaceUpdater::ActivateZoom() - Start Timer");
+        iTimer->Start(KZoomDelay, KZoomDelay, TCallBack(TimeOut, this));
+        }
     }
 
 // -----------------------------------------------------------------------------
@@ -596,18 +729,19 @@
 void CGlxHdmiSurfaceUpdater::DeactivateZoom()
     {
     TRACER("CGlxHdmiSurfaceUpdater::DeactivateZoom()");
-    
-    if(iTimer->IsActive())
+
+    if (iTimer->IsActive())
         {
-		GLX_LOG_INFO("CGlxHdmiSurfaceUpdater::DeactivateZoom() - Cancel Timer");
+        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 ));
-       }
+    if (!iTimer->IsActive() && iBitmapReady && iLeftCornerForZoom.iX)
+        {
+        GLX_LOG_INFO("CGlxHdmiSurfaceUpdater::DeactivateZoom() - Start Timer");
+        iZoom = EFalse;
+        iTimer->Start(KZoomDelay, KZoomDelay, TCallBack(TimeOut, this));
+        }
     }
 
 // ---------------------------------------------------------------------------
@@ -617,12 +751,13 @@
 TInt CGlxHdmiSurfaceUpdater::TimeOut(TAny* aSelf)
     {
     TRACER("CGlxHdmiSurfaceUpdater::TimeOut");
-    if(aSelf)
+    if (aSelf)
         {
-        CGlxHdmiSurfaceUpdater* self = static_cast <CGlxHdmiSurfaceUpdater*> (aSelf);
+        CGlxHdmiSurfaceUpdater* self =
+                static_cast<CGlxHdmiSurfaceUpdater*> (aSelf);
         if (self)
-            {            
-             self->Zoom(ETrue);
+            {
+            self->Zoom(ETrue);
             }
         }
     return KErrNone;
@@ -634,75 +769,93 @@
 void CGlxHdmiSurfaceUpdater::Zoom(TBool aZoom)
     {
     TRACER("CGlxHdmiSurfaceUpdater::Zoom()");
-	
-	if(!iBitmapReady)
-		{
-		return;
-		}
-		
-    if(iLeftCornerForZoom.iX == KMaxZoomLimit)
+
+    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)
+        if (!iAutoZoomOut)
             {
-            iTimer->Cancel();			
+            iTimer->Cancel();
             }
-        }    
-    if(aZoom && iZoom)
+        }
+    if (aZoom && iZoom)
         {
-        iTargetBitmapSize.iWidth = TInt(iTargetBitmapSize.iWidth-KSingleStepForZoom);
-        iTargetBitmapSize.iHeight = TInt(iTargetBitmapSize.iHeight-KSingleStepForZoom);
-        iLeftCornerForZoom.iX =iLeftCornerForZoom.iX+KSingleStepForZoom/2;
-        iLeftCornerForZoom.iY =iLeftCornerForZoom.iY+KSingleStepForZoom/2;           
-        GLX_LOG_INFO2("CGlxHdmiSurfaceUpdater::Zoom()--- 2,iTargetBitmapSize.iWidth = %d, iTargetBitmapSize.iHeight = %d", iTargetBitmapSize.iWidth,iTargetBitmapSize.iHeight);
-        iConfig.SetViewport(TRect(iLeftCornerForZoom.iX,iLeftCornerForZoom.iY,
-                iTargetBitmapSize.iWidth,iTargetBitmapSize.iHeight));
+        iTargetBitmapSize.iWidth = TInt(iTargetBitmapSize.iWidth
+                - KSingleStepForZoom);
+        iTargetBitmapSize.iHeight = TInt(iTargetBitmapSize.iHeight
+                - KSingleStepForZoom);
+        iLeftCornerForZoom.iX = iLeftCornerForZoom.iX + KSingleStepForZoom
+                / 2;
+        iLeftCornerForZoom.iY = iLeftCornerForZoom.iY + KSingleStepForZoom
+                / 2;
+        GLX_LOG_INFO2(
+                "CGlxHdmiSurfaceUpdater::Zoom()--- 2,iTargetBitmapSize.iWidth = %d, iTargetBitmapSize.iHeight = %d",
+                iTargetBitmapSize.iWidth, iTargetBitmapSize.iHeight);
+        iConfig.SetViewport(TRect(iLeftCornerForZoom.iX,
+                iLeftCornerForZoom.iY, iTargetBitmapSize.iWidth,
+                iTargetBitmapSize.iHeight));
         }
     else
         {
-        iTargetBitmapSize.iWidth = TInt(iTargetBitmapSize.iWidth+KSingleStepForZoom);
-        iTargetBitmapSize.iHeight = TInt(iTargetBitmapSize.iHeight+KSingleStepForZoom);
-        iLeftCornerForZoom.iX =iLeftCornerForZoom.iX-KSingleStepForZoom/2;
-        iLeftCornerForZoom.iY =iLeftCornerForZoom.iY-KSingleStepForZoom/2; 
-        if(iLeftCornerForZoom.iX == 0)
+        iTargetBitmapSize.iWidth = TInt(iTargetBitmapSize.iWidth
+                + KSingleStepForZoom);
+        iTargetBitmapSize.iHeight = TInt(iTargetBitmapSize.iHeight
+                + KSingleStepForZoom);
+        iLeftCornerForZoom.iX = iLeftCornerForZoom.iX - KSingleStepForZoom
+                / 2;
+        iLeftCornerForZoom.iY = iLeftCornerForZoom.iY - KSingleStepForZoom
+                / 2;
+        if (iLeftCornerForZoom.iX == 0)
             {
             iTimer->Cancel();
             iZoom = ETrue;
             }
-        GLX_LOG_INFO2("CGlxHdmiSurfaceUpdater::Zoom()--- 4,iTargetBitmapSize.iWidth = %d, iTargetBitmapSize.iHeight = %d", iTargetBitmapSize.iWidth,iTargetBitmapSize.iHeight);
-        iConfig.SetViewport(TRect(iLeftCornerForZoom.iX,iLeftCornerForZoom.iY,
-                iTargetBitmapSize.iWidth,iTargetBitmapSize.iHeight));
+        GLX_LOG_INFO2(
+                "CGlxHdmiSurfaceUpdater::Zoom()--- 4,iTargetBitmapSize.iWidth = %d, iTargetBitmapSize.iHeight = %d",
+                iTargetBitmapSize.iWidth, iTargetBitmapSize.iHeight);
+        iConfig.SetViewport(TRect(iLeftCornerForZoom.iX,
+                iLeftCornerForZoom.iY, iTargetBitmapSize.iWidth,
+                iTargetBitmapSize.iHeight));
         }
-    iWindow->SetBackgroundSurface(iConfig, ETrue);   
+    iWindow->SetBackgroundSurface(iConfig, ETrue);
     }
 
 // -----------------------------------------------------------------------------
 // ModifySurfacePostion 
 // -----------------------------------------------------------------------------
 void CGlxHdmiSurfaceUpdater::ModifySurfacePostion()
-	{
-	TRACER("CGlxHdmiSurfaceUpdater::ModifySurfacePostion()");
-	TPoint startPoint(0,0);
-	if (iTargetBitmapSize.iWidth <iTvScreenSize.iWidth)
-	    {
-	    startPoint.iX = (iTvScreenSize.iWidth - iTargetBitmapSize.iWidth)/2; 
-	    }
-	if (iTargetBitmapSize.iHeight <iTvScreenSize.iHeight)
-	    {
-	    startPoint.iY = (iTvScreenSize.iHeight - iTargetBitmapSize.iHeight)/2;
-	    }
-    GLX_LOG_INFO2("CGlxHdmiSurfaceUpdater::ModifySurfacePostion() - target iTargetBitmapSize=%d, %d",
-            iTargetBitmapSize.iWidth,iTargetBitmapSize.iHeight);
-    GLX_LOG_INFO2("CGlxHdmiSurfaceUpdater::ModifySurfacePostion() - startPoint =%d, %d",
-            startPoint.iX,startPoint.iY);
+    {
+    TRACER("CGlxHdmiSurfaceUpdater::ModifySurfacePostion()");
+    TPoint startPoint(0, 0);
+    if (iTargetBitmapSize.iWidth < iTvScreenSize.iWidth)
+        {
+        startPoint.iX = (iTvScreenSize.iWidth - iTargetBitmapSize.iWidth) / 2;
+        }
+    if (iTargetBitmapSize.iHeight < iTvScreenSize.iHeight)
+        {
+        startPoint.iY = (iTvScreenSize.iHeight - iTargetBitmapSize.iHeight)
+                / 2;
+        }
+    GLX_LOG_INFO2(
+            "CGlxHdmiSurfaceUpdater::ModifySurfacePostion() - target iTargetBitmapSize=%d, %d",
+            iTargetBitmapSize.iWidth, iTargetBitmapSize.iHeight);
+    GLX_LOG_INFO2(
+            "CGlxHdmiSurfaceUpdater::ModifySurfacePostion() - startPoint =%d, %d",
+            startPoint.iX, startPoint.iY);
 
     // target
-    iConfig.SetExtent(TRect(startPoint.iX,startPoint.iY,(iTvScreenSize.iWidth-startPoint.iX),
-            (iTvScreenSize.iHeight-startPoint.iY)));
+    iConfig.SetExtent(TRect(startPoint.iX, startPoint.iY,
+            (iTvScreenSize.iWidth - startPoint.iX), (iTvScreenSize.iHeight
+                    - startPoint.iY)));
     // source
-    iConfig.SetViewport(TRect(TPoint(0,0),TSize(iTargetBitmapSize.iWidth,
+    iConfig.SetViewport(TRect(TPoint(0, 0), TSize(iTargetBitmapSize.iWidth,
             iTargetBitmapSize.iHeight)));
 #ifdef _DEBUG
     TRect ex, vp;
@@ -719,32 +872,32 @@
 // ShiftToCloningMode 
 // -----------------------------------------------------------------------------
 void CGlxHdmiSurfaceUpdater::ShiftToCloningMode()
-	{
-	TRACER("CGlxHdmiSurfaceUpdater::ShiftToCloningMode()");
-	iWindow->RemoveBackgroundSurface(ETrue);
-	}
-	
+    {
+    TRACER("CGlxHdmiSurfaceUpdater::ShiftToCloningMode()");
+    iWindow->RemoveBackgroundSurface(ETrue);
+    }
+
 // -----------------------------------------------------------------------------
 // ShiftToPostingMode 
 // -----------------------------------------------------------------------------
 void CGlxHdmiSurfaceUpdater::ShiftToPostingMode()
-	{
-	TRACER("CGlxHdmiSurfaceUpdater::ShiftToPostingMode()");
-	if(iSurfManager)
-		{
+    {
+    TRACER("CGlxHdmiSurfaceUpdater::ShiftToPostingMode()");
+    if (iSurfManager)
+        {
 #ifdef _DEBUG
-		TRect ex, vp;
-		iConfig.GetExtent(ex);
-		iConfig.GetViewport(vp);
-		GLX_LOG_INFO2("CGlxHdmiSurfaceUpdater::ShiftToPostingMode() - vp - TL=%d, %d",vp.iTl.iX,vp.iTl.iY);
-		GLX_LOG_INFO2("CGlxHdmiSurfaceUpdater::ShiftToPostingMode() - vp - BR=%d, %d",vp.iBr.iX,vp.iBr.iY);
-		GLX_LOG_INFO2("CGlxHdmiSurfaceUpdater::ShiftToPostingMode() - ex - TL=%d, %d",ex.iTl.iX,ex.iTl.iY);
-		GLX_LOG_INFO2("CGlxHdmiSurfaceUpdater::ShiftToPostingMode() - ex - BR=%d, %d",ex.iBr.iX,ex.iBr.iY);
+        TRect ex, vp;
+        iConfig.GetExtent(ex);
+        iConfig.GetViewport(vp);
+        GLX_LOG_INFO2("CGlxHdmiSurfaceUpdater::ShiftToPostingMode() - vp - TL=%d, %d",vp.iTl.iX,vp.iTl.iY);
+        GLX_LOG_INFO2("CGlxHdmiSurfaceUpdater::ShiftToPostingMode() - vp - BR=%d, %d",vp.iBr.iX,vp.iBr.iY);
+        GLX_LOG_INFO2("CGlxHdmiSurfaceUpdater::ShiftToPostingMode() - ex - TL=%d, %d",ex.iTl.iX,ex.iTl.iY);
+        GLX_LOG_INFO2("CGlxHdmiSurfaceUpdater::ShiftToPostingMode() - ex - BR=%d, %d",ex.iBr.iX,ex.iBr.iY);
 #endif
-		iWindow->SetBackgroundSurface(iConfig, ETrue);
-		iShiftToCloning = EFalse;
-		}
-	}
+        iWindow->SetBackgroundSurface(iConfig, ETrue);
+        iShiftToCloning = EFalse;
+        }
+    }
 
 // -----------------------------------------------------------------------------
 // ShowFsThumbnailL 
@@ -753,16 +906,17 @@
     {
     TRACER("CGlxHdmiSurfaceUpdater::ShowFsThumbnailL()");
     iShwFsThumbnail = ETrue;
-    GLX_LOG_INFO2("CGlxHdmiSurfaceUpdater::ShowFsThumbnailL() iTargetBitmapSize Width=%d, Height=%d",
-            iTargetBitmapSize.iWidth,iTargetBitmapSize.iHeight);
+    GLX_LOG_INFO2(
+            "CGlxHdmiSurfaceUpdater::ShowFsThumbnailL() iTargetBitmapSize Width=%d, Height=%d",
+            iTargetBitmapSize.iWidth, iTargetBitmapSize.iHeight);
     // Modify the surface position with respect to the buffer size 
     ModifySurfacePostion();
     // this is for FS thumbnail stored in array pointer 0
-    ScaleDecodedBitmapL(EFSBitmapIndex);
+    ScaleDecodedBitmapL( EFSBitmapIndex);
     // Process the Image to TV
     ProcessTvImage();
     // set the surface onto background
-    iWindow->SetBackgroundSurface(iConfig, ETrue); 
+    iWindow->SetBackgroundSurface(iConfig, ETrue);
     }
 
 // -----------------------------------------------------------------------------
@@ -771,8 +925,9 @@
 void CGlxHdmiSurfaceUpdater::ScaleDecodedBitmapL(TInt aBitmapIndex)
     {
     TRACER("CGlxHdmiSurfaceUpdater::ScaleDecodedBitmapL()");
-    GLX_LOG_INFO2("CGlxHdmiSurfaceUpdater::ScaleDecodedBitmapL() iTargetBitmapSize Width=%d, Height=%d",
-            iTargetBitmapSize.iWidth,iTargetBitmapSize.iHeight);
+    GLX_LOG_INFO2(
+            "CGlxHdmiSurfaceUpdater::ScaleDecodedBitmapL() iTargetBitmapSize Width=%d, Height=%d",
+            iTargetBitmapSize.iWidth, iTargetBitmapSize.iHeight);
 
     if (iDecodedBitmap[aBitmapIndex])
         {
@@ -781,18 +936,22 @@
         }
     iDecodedBitmap[aBitmapIndex] = new (ELeave) CFbsBitmap();
     // create destination with size
-    TInt err = iDecodedBitmap[aBitmapIndex]->Create(iTargetBitmapSize, EColor16MU);
-    GLX_LOG_INFO1("CGlxHdmiSurfaceUpdater::ScaleDecodedBitmapL() creating bitmap error, err=%d",err);
-    User::LeaveIfNull(iDecodedBitmap[aBitmapIndex]);
+    TInt err = iDecodedBitmap[aBitmapIndex]->Create(iTargetBitmapSize,
+            EColor16MU);
+    GLX_LOG_INFO1(
+            "CGlxHdmiSurfaceUpdater::ScaleDecodedBitmapL() creating bitmap error, err=%d",
+            err);
+    User::LeaveIfNull( iDecodedBitmap[aBitmapIndex]);
 
     // Create bitmap device for destination bitmap
-    CFbsBitmapDevice* bitmapDevice = CFbsBitmapDevice::NewL(iDecodedBitmap[aBitmapIndex]);
+    CFbsBitmapDevice* bitmapDevice = CFbsBitmapDevice::NewL(
+            iDecodedBitmap[aBitmapIndex]);
     CleanupStack::PushL(bitmapDevice);
-    
+
     CFbsBitGc* bitmapGc = CFbsBitGc::NewL();
     CleanupStack::PushL(bitmapGc);
     bitmapGc->Activate(bitmapDevice);
-    if (aBitmapIndex==EFSBitmapIndex)
+    if (aBitmapIndex == EFSBitmapIndex)
         {
         // scale the source bitmap which is a FS bitmap
         bitmapGc->DrawBitmap(TRect(iTargetBitmapSize), iFsBitmap);
@@ -800,9 +959,10 @@
     else
         {
         // scale the source bitmap which is a decoded bitmap
-        bitmapGc->DrawBitmap(TRect(iTargetBitmapSize), iDecodedBitmap[EJpgDecodedBitmapIndex]);
+        bitmapGc->DrawBitmap(TRect(iTargetBitmapSize),
+                iDecodedBitmap[EJpgDecodedBitmapIndex]);
         }
-    
+
     CleanupStack::PopAndDestroy(bitmapGc);
     CleanupStack::PopAndDestroy(bitmapDevice);
 
@@ -822,9 +982,66 @@
         iSurfBufferAO->SetActive();
         iSurfUpdateSession.NotifyWhenAvailable(iSurfBufferAO->iStatus);
         TInt err = iSurfUpdateSession.SubmitUpdate(1, iSurfId, 0, NULL);
-        GLX_LOG_INFO1("CGlxHdmiSurfaceUpdater::ProcessTvImage() Surfaceupdatesession error %d",err);
+        GLX_LOG_INFO1(
+                "CGlxHdmiSurfaceUpdater::ProcessTvImage() Surfaceupdatesession error %d",
+                err);
         }
     }
 
+// -----------------------------------------------------------------------------
+// DecodeNextImageL 
+// -----------------------------------------------------------------------------
+void CGlxHdmiSurfaceUpdater::DecodeNextImageL()
+    {
+    TRACER("CGlxHdmiSurfaceUpdater::DecodeNextImageL()");
+    ReleaseContent();
+    iImagePath = iNextImagePath->Alloc();
+    if (iNextImagePath)
+        {
+        delete iNextImagePath;
+        iNextImagePath = NULL;
+        }
+    iIsNonJpeg = EFalse;
+    GLX_LOG_INFO("Before - iWindow->Size()");
+    iTvScreenSize = iWindow->Size();
+    GLX_LOG_INFO("After - iWindow->Size()");
+    iBitmapReady = EFalse;
+    iLeftCornerForZoom.iX = 0;
+    iLeftCornerForZoom.iY = 0;
+    iZoom = ETrue;
+    //Cancel the zoom timers if any
+    if (iTimer && iTimer->IsActive())
+        {
+        GLX_LOG_INFO(
+                "CGlxHdmiSurfaceUpdater::UpdateNewImageL() - Cancel Timer");
+        iTimer->Cancel();
+        }
+    // Create the HDMI Decoder
+    CreateImageDecoderL();
+    // Create the Bitmap
+    CreateBitmapL();
+    if (iSurfManager)
+        {
+        // Create the surface and AO for updating the surface
+        CreateHdmiL( EFalse);
+        }
+    else
+        {
+        TRAP_IGNORE( CreateHdmiL(ETrue));
+        }
 
+#ifdef _DEBUG
+    iStartTime.HomeTime();
+#endif
+    if (iSurfManager)
+        {
+        //start decoding the image
+        iGlxDecoderAO->ConvertImageL(*iDecodedBitmap[EJpgDecodedBitmapIndex],
+                iImageDecoder);
+        iDecodingNext = ETrue;
+        iDecodingNextFailed = EFalse;
+        //Inform the Observer that decoding has started
+        iDecoderObserver.HandleHDMIDecodingEventL(EHdmiDecodingStarted);
+        }
+    }
 
--- a/photosgallery/viewframework/uiutilities/bwins/glxuiutilitiesu.def	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/uiutilities/bwins/glxuiutilitiesu.def	Wed Jun 09 09:41:51 2010 +0300
@@ -1,70 +1,71 @@
 EXPORTS
-	?VisibleItemsInPageGranularityL@CGlxUiUtility@@QAEHXZ @ 1 NONAME ; int CGlxUiUtility::VisibleItemsInPageGranularityL(void)
-	?ViewNavigationDirection@CGlxUiUtility@@QAE?AW4TGlxNavigationDirection@@XZ @ 2 NONAME ; enum TGlxNavigationDirection CGlxUiUtility::ViewNavigationDirection(void)
-	?SetRotatedImageSize@CGlxUiUtility@@QAEXVTSize@@@Z @ 3 NONAME ; void CGlxUiUtility::SetRotatedImageSize(class TSize)
-	?NewL@CGlxMMCNotifier@@SAPAV1@AAVMStorageNotifierObserver@@@Z @ 4 NONAME ; class CGlxMMCNotifier * CGlxMMCNotifier::NewL(class MStorageNotifierObserver &)
-	?NewL@CGlxScreenFurniture@@SAPAV1@AAVCGlxUiUtility@@@Z @ 5 NONAME ; class CGlxScreenFurniture * CGlxScreenFurniture::NewL(class CGlxUiUtility &)
-	?SetExitingState@CGlxUiUtility@@QAEXH@Z @ 6 NONAME ; void CGlxUiUtility::SetExitingState(int)
-	?GlxTextureManager@CGlxUiUtility@@QAEAAVCGlxTextureManager@@XZ @ 7 NONAME ; class CGlxTextureManager & CGlxUiUtility::GlxTextureManager(void)
-	?ExecuteLD@CGlxTextEntryPopup@@QAEHXZ @ 8 NONAME ; int CGlxTextEntryPopup::ExecuteLD(void)
-	?ShowErrorNoteL@GlxGeneralUiUtilities@@SAXH@Z @ 9 NONAME ; void GlxGeneralUiUtilities::ShowErrorNoteL(int)
-	?RegisterActiveMediaList@CGlxActiveMediaListRegistry@@QAEXPAVMGlxMediaList@@@Z @ 10 NONAME ; void CGlxActiveMediaListRegistry::RegisterActiveMediaList(class MGlxMediaList *)
-	?FormatString@GlxGeneralUiUtilities@@SAXAAVTDes16@@ABVTDesC16@@HHH@Z @ 11 NONAME ; void GlxGeneralUiUtilities::FormatString(class TDes16 &, class TDesC16 const &, int, int, int)
-	?AppOrientation@CGlxUiUtility@@QBE?AW4TGlxOrientation@@XZ @ 12 NONAME ; enum TGlxOrientation CGlxUiUtility::AppOrientation(void) const
-	?DismissProgressDialog@CGlxProgressIndicator@@QAEXXZ @ 13 NONAME ; void CGlxProgressIndicator::DismissProgressDialog(void)
-	?StopTNMDaemon@CGlxUiUtility@@QAEHXZ @ 14 NONAME ; int CGlxUiUtility::StopTNMDaemon(void)
-	?NewLC@CGlxScreenFurniture@@SAPAV1@AAVCGlxUiUtility@@@Z @ 15 NONAME ; class CGlxScreenFurniture * CGlxScreenFurniture::NewLC(class CGlxUiUtility &)
-	?ShowAlfDisplayL@CGlxUiUtility@@SAXXZ @ 16 NONAME ; void CGlxUiUtility::ShowAlfDisplayL(void)
-	?LayoutIsMirrored@GlxGeneralUiUtilities@@SAHXZ @ 17 NONAME ; int GlxGeneralUiUtilities::LayoutIsMirrored(void)
-	?IsLandscape@GlxGeneralUiUtilities@@SAHXZ @ 18 NONAME ; int GlxGeneralUiUtilities::IsLandscape(void)
-	?SetToolbarPosition@CGlxScreenFurniture@@QAEXXZ @ 19 NONAME ; void CGlxScreenFurniture::SetToolbarPosition(void)
-	?HandleTvStatusChangedL@CGlxUiUtility@@UAEXW4TTvChangeType@@@Z @ 20 NONAME ; void CGlxUiUtility::HandleTvStatusChangedL(enum TTvChangeType)
-	?ModifySoftkeyIdL@CGlxScreenFurniture@@QAEXW4TCommandPosition@CEikButtonGroupContainer@@HHABVTDesC16@@@Z @ 21 NONAME ; void CGlxScreenFurniture::ModifySoftkeyIdL(enum CEikButtonGroupContainer::TCommandPosition, int, int, class TDesC16 const &)
-	?Close@CGlxUiUtility@@QAEXXZ @ 22 NONAME ; void CGlxUiUtility::Close(void)
-	?ViewDeactivated@CGlxScreenFurniture@@QAEXH@Z @ 23 NONAME ; void CGlxScreenFurniture::ViewDeactivated(int)
-	?GetItemsLeftCount@CGlxUiUtility@@QAEHXZ @ 24 NONAME ; int CGlxUiUtility::GetItemsLeftCount(void)
-	?CreateViewAnimationL@GlxAnimationFactory@@SAPAVMGlxAnimation@@W4TGlxViewswitchAnimation@@W4TGlxNavigationDirection@@AAV?$RPointerArray@VCAlfControlGroup@@@@@Z @ 25 NONAME ; class MGlxAnimation * GlxAnimationFactory::CreateViewAnimationL(enum TGlxViewswitchAnimation, enum TGlxNavigationDirection, class RPointerArray<class CAlfControlGroup> &)
-	?ShowProgressbarL@CGlxProgressIndicator@@QAEXXZ @ 26 NONAME ; void CGlxProgressIndicator::ShowProgressbarL(void)
-	?SetGridToolBar@CGlxUiUtility@@QAEXPAVCAknToolbar@@@Z @ 27 NONAME ; void CGlxUiUtility::SetGridToolBar(class CAknToolbar *)
-	?AppState@GlxSetAppState@@SA?AW4TGlxAppState@@XZ @ 28 NONAME ; enum TGlxAppState GlxSetAppState::AppState(void)
-	?ShowInfoNoteL@GlxGeneralUiUtilities@@SAXABVTDesC16@@H@Z @ 29 NONAME ; void GlxGeneralUiUtilities::ShowInfoNoteL(class TDesC16 const &, int)
-	?RemoveSkinChangeObserver@CGlxUiUtility@@QAEXAAVMGlxSkinChangeObserver@@@Z @ 30 NONAME ; void CGlxUiUtility::RemoveSkinChangeObserver(class MGlxSkinChangeObserver &)
-	?UtilityL@CGlxUiUtility@@SAPAV1@XZ @ 31 NONAME ; class CGlxUiUtility * CGlxUiUtility::UtilityL(void)
-	?StartTNMDaemon@CGlxUiUtility@@QAEHXZ @ 32 NONAME ; int CGlxUiUtility::StartTNMDaemon(void)
-	?HideAlfDisplayL@CGlxUiUtility@@SAXXZ @ 33 NONAME ; void CGlxUiUtility::HideAlfDisplayL(void)
-	?DisplaySize@CGlxUiUtility@@QBE?AVTSize@@XZ @ 34 NONAME ; class TSize CGlxUiUtility::DisplaySize(void) const
-	?ShowErrorNoteL@GlxGeneralUiUtilities@@SAXABVTDesC16@@H@Z @ 35 NONAME ; void GlxGeneralUiUtilities::ShowErrorNoteL(class TDesC16 const &, int)
-	?SetActiveView@CGlxScreenFurniture@@QAEXH@Z @ 36 NONAME ; void CGlxScreenFurniture::SetActiveView(int)
-	?SetState@GlxSetAppState@@SAXW4TGlxAppState@@@Z @ 37 NONAME ; void GlxSetAppState::SetState(enum TGlxAppState)
-	?SetLeftSoftKeyL@CGlxTextEntryPopup@@QAEXH@Z @ 38 NONAME ; void CGlxTextEntryPopup::SetLeftSoftKeyL(int)
-	?GetGridToolBar@CGlxUiUtility@@QAEPAVCAknToolbar@@XZ @ 39 NONAME ; class CAknToolbar * CGlxUiUtility::GetGridToolBar(void)
-	?SetToolbarItemVisibility@CGlxScreenFurniture@@QAEXHH@Z @ 40 NONAME ; void CGlxScreenFurniture::SetToolbarItemVisibility(int, int)
-	?AddSkinChangeObserverL@CGlxUiUtility@@QAEXAAVMGlxSkinChangeObserver@@@Z @ 41 NONAME ; void CGlxUiUtility::AddSkinChangeObserverL(class MGlxSkinChangeObserver &)
-	?SetTooltipL@CGlxScreenFurniture@@QAEXHW4TTooltipPosition@CAknButton@@ABVTDesC16@@@Z @ 42 NONAME ; void CGlxScreenFurniture::SetTooltipL(int, enum CAknButton::TTooltipPosition, class TDesC16 const &)
-	?GetRotatedImageSize@CGlxUiUtility@@QAE?AVTSize@@XZ @ 43 NONAME ; class TSize CGlxUiUtility::GetRotatedImageSize(void)
-	?SetToolbarVisibility@CGlxScreenFurniture@@QAEXH@Z @ 44 NONAME ; void CGlxScreenFurniture::SetToolbarVisibility(int)
-	?IsPenSupported@CGlxUiUtility@@QAEHXZ @ 45 NONAME ; int CGlxUiUtility::IsPenSupported(void)
-	?IsExitingState@CGlxUiUtility@@QAEHXZ @ 46 NONAME ; int CGlxUiUtility::IsExitingState(void)
-	?Env@CGlxUiUtility@@QAEPAVCAlfEnv@@XZ @ 47 NONAME ; class CAlfEnv * CGlxUiUtility::Env(void)
-	?RetrieveL@GlxAttributeRetriever@@SAHABVMGlxFetchContext@@AAVMGlxMediaList@@H@Z @ 48 NONAME ; int GlxAttributeRetriever::RetrieveL(class MGlxFetchContext const &, class MGlxMediaList &, int)
-	?TextStyleIdL@CGlxUiUtility@@QAEHHH@Z @ 49 NONAME ; int CGlxUiUtility::TextStyleIdL(int, int)
-	?InstanceL@CGlxActiveMediaListRegistry@@SAPAV1@PAVMGlxActiveMediaListChangeObserver@@@Z @ 50 NONAME ; class CGlxActiveMediaListRegistry * CGlxActiveMediaListRegistry::InstanceL(class MGlxActiveMediaListChangeObserver *)
-	?DeregisterActiveMediaList@CGlxActiveMediaListRegistry@@QAEXPAVMGlxMediaList@@@Z @ 51 NONAME ; void CGlxActiveMediaListRegistry::DeregisterActiveMediaList(class MGlxMediaList *)
-	?CreateImageLoadingAnimationL@GlxAnimationFactory@@SAPAVMGlxAnimation@@AAVCAlfVisual@@AAVCAlfTexture@@@Z @ 52 NONAME ; class MGlxAnimation * GlxAnimationFactory::CreateImageLoadingAnimationL(class CAlfVisual &, class CAlfTexture &)
-	?SetAppOrientationL@CGlxUiUtility@@QAEXW4TGlxOrientation@@@Z @ 53 NONAME ; void CGlxUiUtility::SetAppOrientationL(enum TGlxOrientation)
-	?ConfirmQueryL@GlxGeneralUiUtilities@@SAHABVTDesC16@@@Z @ 54 NONAME ; int GlxGeneralUiUtilities::ConfirmQueryL(class TDesC16 const &)
-	?SetToolbarItemDimmed@CGlxScreenFurniture@@QAEXHH@Z @ 55 NONAME ; void CGlxScreenFurniture::SetToolbarItemDimmed(int, int)
-	?NewL@CGlxTextEntryPopup@@SAPAV1@ABVTDesC16@@AAVTDes16@@@Z @ 56 NONAME ; class CGlxTextEntryPopup * CGlxTextEntryPopup::NewL(class TDesC16 const &, class TDes16 &)
-	?Display@CGlxUiUtility@@QBEPAVCAlfDisplay@@XZ @ 57 NONAME ; class CAlfDisplay * CGlxUiUtility::Display(void) const
-	?CreateViewAnimationL@GlxAnimationFactory@@SAPAVMGlxAnimation@@W4TGlxViewswitchAnimation@@W4TGlxNavigationDirection@@PAVCAlfControlGroup@@@Z @ 58 NONAME ; class MGlxAnimation * GlxAnimationFactory::CreateViewAnimationL(enum TGlxViewswitchAnimation, enum TGlxNavigationDirection, class CAlfControlGroup *)
-	?NewL@CGlxProgressIndicator@@SAPAV1@AAVMDialogDismisedObserver@@@Z @ 59 NONAME ; class CGlxProgressIndicator * CGlxProgressIndicator::NewL(class MDialogDismisedObserver &)
-	?SetViewNavigationDirection@CGlxUiUtility@@QAEXW4TGlxNavigationDirection@@@Z @ 60 NONAME ; void CGlxUiUtility::SetViewNavigationDirection(enum TGlxNavigationDirection)
-	?ShowConfirmationNoteL@GlxGeneralUiUtilities@@SAXABVTDesC16@@H@Z @ 61 NONAME ; void GlxGeneralUiUtilities::ShowConfirmationNoteL(class TDesC16 const &, int)
-	?ScreenFurniture@CGlxUiUtility@@QAEPAVCGlxScreenFurniture@@XZ @ 62 NONAME ; class CGlxScreenFurniture * CGlxUiUtility::ScreenFurniture(void)
-	?ConfirmQueryL@GlxGeneralUiUtilities@@SAHHABVTDesC16@@@Z @ 63 NONAME ; int GlxGeneralUiUtilities::ConfirmQueryL(int, class TDesC16 const &)
-	?SetFocusL@CGlxScreenFurniture@@QAEXH@Z @ 64 NONAME ; void CGlxScreenFurniture::SetFocusL(int)
-	?GetGridIconSize@CGlxUiUtility@@QAE?AVTSize@@XZ @ 65 NONAME ; class TSize CGlxUiUtility::GetGridIconSize(void)
-	?InstanceL@MGlxActiveMediaListResolver@@SAPAV1@PAVMGlxActiveMediaListChangeObserver@@@Z @ 66 NONAME ; class MGlxActiveMediaListResolver * MGlxActiveMediaListResolver::InstanceL(class MGlxActiveMediaListChangeObserver *)
-	?DisplayScreenClearerL@CGlxUiUtility@@QAEXXZ @ 67 NONAME ; void CGlxUiUtility::DisplayScreenClearerL(void)
-	?DestroyScreenClearer@CGlxUiUtility@@QAEXXZ @ 68 NONAME ; void CGlxUiUtility::DestroyScreenClearer(void)
+	?ViewNavigationDirection@CGlxUiUtility@@QAE?AW4TGlxNavigationDirection@@XZ @ 1 NONAME ; enum TGlxNavigationDirection CGlxUiUtility::ViewNavigationDirection(void)
+	?SetRotatedImageSize@CGlxUiUtility@@QAEXVTSize@@@Z @ 2 NONAME ; void CGlxUiUtility::SetRotatedImageSize(class TSize)
+	?NewL@CGlxMMCNotifier@@SAPAV1@AAVMStorageNotifierObserver@@@Z @ 3 NONAME ; class CGlxMMCNotifier * CGlxMMCNotifier::NewL(class MStorageNotifierObserver &)
+	?NewL@CGlxScreenFurniture@@SAPAV1@AAVCGlxUiUtility@@@Z @ 4 NONAME ; class CGlxScreenFurniture * CGlxScreenFurniture::NewL(class CGlxUiUtility &)
+	?SetExitingState@CGlxUiUtility@@QAEXH@Z @ 5 NONAME ; void CGlxUiUtility::SetExitingState(int)
+	?ExecuteLD@CGlxTextEntryPopup@@QAEHXZ @ 6 NONAME ; int CGlxTextEntryPopup::ExecuteLD(void)
+	?StopTNMDaemon@CGlxUiUtility@@QAEHXZ @ 7 NONAME ; int CGlxUiUtility::StopTNMDaemon(void)
+	?ShowAlfDisplayL@CGlxUiUtility@@SAXXZ @ 8 NONAME ; void CGlxUiUtility::ShowAlfDisplayL(void)
+	?IsLandscape@GlxGeneralUiUtilities@@SAHXZ @ 9 NONAME ; int GlxGeneralUiUtilities::IsLandscape(void)
+	?SetToolbarPosition@CGlxScreenFurniture@@QAEXXZ @ 10 NONAME ; void CGlxScreenFurniture::SetToolbarPosition(void)
+	?ViewDeactivated@CGlxScreenFurniture@@QAEXH@Z @ 11 NONAME ; void CGlxScreenFurniture::ViewDeactivated(int)
+	?SetGridToolBar@CGlxUiUtility@@QAEXPAVCAknToolbar@@@Z @ 12 NONAME ; void CGlxUiUtility::SetGridToolBar(class CAknToolbar *)
+	?AppState@GlxSetAppState@@SA?AW4TGlxAppState@@XZ @ 13 NONAME ; enum TGlxAppState GlxSetAppState::AppState(void)
+	?ShowInfoNoteL@GlxGeneralUiUtilities@@SAXABVTDesC16@@H@Z @ 14 NONAME ; void GlxGeneralUiUtilities::ShowInfoNoteL(class TDesC16 const &, int)
+	?RemoveSkinChangeObserver@CGlxUiUtility@@QAEXAAVMGlxSkinChangeObserver@@@Z @ 15 NONAME ; void CGlxUiUtility::RemoveSkinChangeObserver(class MGlxSkinChangeObserver &)
+	?UtilityL@CGlxUiUtility@@SAPAV1@XZ @ 16 NONAME ; class CGlxUiUtility * CGlxUiUtility::UtilityL(void)
+	?StartTNMDaemon@CGlxUiUtility@@QAEHXZ @ 17 NONAME ; int CGlxUiUtility::StartTNMDaemon(void)
+	?HideAlfDisplayL@CGlxUiUtility@@SAXXZ @ 18 NONAME ; void CGlxUiUtility::HideAlfDisplayL(void)
+	?SetState@GlxSetAppState@@SAXW4TGlxAppState@@@Z @ 19 NONAME ; void GlxSetAppState::SetState(enum TGlxAppState)
+	?AddSkinChangeObserverL@CGlxUiUtility@@QAEXAAVMGlxSkinChangeObserver@@@Z @ 20 NONAME ; void CGlxUiUtility::AddSkinChangeObserverL(class MGlxSkinChangeObserver &)
+	?SetTooltipL@CGlxScreenFurniture@@QAEXHW4TTooltipPosition@CAknButton@@ABVTDesC16@@@Z @ 21 NONAME ; void CGlxScreenFurniture::SetTooltipL(int, enum CAknButton::TTooltipPosition, class TDesC16 const &)
+	?GetRotatedImageSize@CGlxUiUtility@@QAE?AVTSize@@XZ @ 22 NONAME ; class TSize CGlxUiUtility::GetRotatedImageSize(void)
+	?SetToolbarVisibility@CGlxScreenFurniture@@QAEXH@Z @ 23 NONAME ; void CGlxScreenFurniture::SetToolbarVisibility(int)
+	?IsPenSupported@CGlxUiUtility@@QAEHXZ @ 24 NONAME ; int CGlxUiUtility::IsPenSupported(void)
+	?IsExitingState@CGlxUiUtility@@QAEHXZ @ 25 NONAME ; int CGlxUiUtility::IsExitingState(void)
+	?DisplayScreenClearerL@CGlxUiUtility@@QAEXXZ @ 26 NONAME ; void CGlxUiUtility::DisplayScreenClearerL(void)
+	?SetToolbarItemDimmed@CGlxScreenFurniture@@QAEXHH@Z @ 27 NONAME ; void CGlxScreenFurniture::SetToolbarItemDimmed(int, int)
+	?Display@CGlxUiUtility@@QBEPAVCAlfDisplay@@XZ @ 28 NONAME ; class CAlfDisplay * CGlxUiUtility::Display(void) const
+	?NewL@CGlxProgressIndicator@@SAPAV1@AAVMDialogDismisedObserver@@@Z @ 29 NONAME ; class CGlxProgressIndicator * CGlxProgressIndicator::NewL(class MDialogDismisedObserver &)
+	?SetViewNavigationDirection@CGlxUiUtility@@QAEXW4TGlxNavigationDirection@@@Z @ 30 NONAME ; void CGlxUiUtility::SetViewNavigationDirection(enum TGlxNavigationDirection)
+	?ConfirmQueryL@GlxGeneralUiUtilities@@SAHHABVTDesC16@@@Z @ 31 NONAME ; int GlxGeneralUiUtilities::ConfirmQueryL(int, class TDesC16 const &)
+	?SetFocusL@CGlxScreenFurniture@@QAEXH@Z @ 32 NONAME ; void CGlxScreenFurniture::SetFocusL(int)
+	?GetGridIconSize@CGlxUiUtility@@QAE?AVTSize@@XZ @ 33 NONAME ; class TSize CGlxUiUtility::GetGridIconSize(void)
+	?VisibleItemsInPageGranularityL@CGlxUiUtility@@QAEHXZ @ 34 NONAME ; int CGlxUiUtility::VisibleItemsInPageGranularityL(void)
+	?GlxTextureManager@CGlxUiUtility@@QAEAAVCGlxTextureManager@@XZ @ 35 NONAME ; class CGlxTextureManager & CGlxUiUtility::GlxTextureManager(void)
+	?RegisterActiveMediaList@CGlxActiveMediaListRegistry@@QAEXPAVMGlxMediaList@@@Z @ 36 NONAME ; void CGlxActiveMediaListRegistry::RegisterActiveMediaList(class MGlxMediaList *)
+	?ShowErrorNoteL@GlxGeneralUiUtilities@@SAXH@Z @ 37 NONAME ; void GlxGeneralUiUtilities::ShowErrorNoteL(int)
+	?AppOrientation@CGlxUiUtility@@QBE?AW4TGlxOrientation@@XZ @ 38 NONAME ; enum TGlxOrientation CGlxUiUtility::AppOrientation(void) const
+	?FormatString@GlxGeneralUiUtilities@@SAXAAVTDes16@@ABVTDesC16@@HHH@Z @ 39 NONAME ; void GlxGeneralUiUtilities::FormatString(class TDes16 &, class TDesC16 const &, int, int, int)
+	?DismissProgressDialog@CGlxProgressIndicator@@QAEXXZ @ 40 NONAME ; void CGlxProgressIndicator::DismissProgressDialog(void)
+	?NewLC@CGlxScreenFurniture@@SAPAV1@AAVCGlxUiUtility@@@Z @ 41 NONAME ; class CGlxScreenFurniture * CGlxScreenFurniture::NewLC(class CGlxUiUtility &)
+	?LayoutIsMirrored@GlxGeneralUiUtilities@@SAHXZ @ 42 NONAME ; int GlxGeneralUiUtilities::LayoutIsMirrored(void)
+	?HandleTvStatusChangedL@CGlxUiUtility@@UAEXW4TTvChangeType@@@Z @ 43 NONAME ; void CGlxUiUtility::HandleTvStatusChangedL(enum TTvChangeType)
+	?Close@CGlxUiUtility@@QAEXXZ @ 44 NONAME ; void CGlxUiUtility::Close(void)
+	?ModifySoftkeyIdL@CGlxScreenFurniture@@QAEXW4TCommandPosition@CEikButtonGroupContainer@@HHABVTDesC16@@@Z @ 45 NONAME ; void CGlxScreenFurniture::ModifySoftkeyIdL(enum CEikButtonGroupContainer::TCommandPosition, int, int, class TDesC16 const &)
+	?CreateViewAnimationL@GlxAnimationFactory@@SAPAVMGlxAnimation@@W4TGlxViewswitchAnimation@@W4TGlxNavigationDirection@@AAV?$RPointerArray@VCAlfControlGroup@@@@@Z @ 46 NONAME ; class MGlxAnimation * GlxAnimationFactory::CreateViewAnimationL(enum TGlxViewswitchAnimation, enum TGlxNavigationDirection, class RPointerArray<class CAlfControlGroup> &)
+	?ControlTNDaemon@CGlxProgressIndicator@@QAEXH@Z @ 47 NONAME ; void CGlxProgressIndicator::ControlTNDaemon(int)
+	?GetItemsLeftCount@CGlxUiUtility@@QAEHXZ @ 48 NONAME ; int CGlxUiUtility::GetItemsLeftCount(void)
+	?ShowProgressbarL@CGlxProgressIndicator@@QAEXXZ @ 49 NONAME ; void CGlxProgressIndicator::ShowProgressbarL(void)
+	?DisplaySize@CGlxUiUtility@@QBE?AVTSize@@XZ @ 50 NONAME ; class TSize CGlxUiUtility::DisplaySize(void) const
+	?SetActiveView@CGlxScreenFurniture@@QAEXH@Z @ 51 NONAME ; void CGlxScreenFurniture::SetActiveView(int)
+	?ShowErrorNoteL@GlxGeneralUiUtilities@@SAXABVTDesC16@@H@Z @ 52 NONAME ; void GlxGeneralUiUtilities::ShowErrorNoteL(class TDesC16 const &, int)
+	?GetGridToolBar@CGlxUiUtility@@QAEPAVCAknToolbar@@XZ @ 53 NONAME ; class CAknToolbar * CGlxUiUtility::GetGridToolBar(void)
+	?SetLeftSoftKeyL@CGlxTextEntryPopup@@QAEXH@Z @ 54 NONAME ; void CGlxTextEntryPopup::SetLeftSoftKeyL(int)
+	?DestroyScreenClearer@CGlxUiUtility@@QAEXXZ @ 55 NONAME ; void CGlxUiUtility::DestroyScreenClearer(void)
+	?SetToolbarItemVisibility@CGlxScreenFurniture@@QAEXHH@Z @ 56 NONAME ; void CGlxScreenFurniture::SetToolbarItemVisibility(int, int)
+	?Env@CGlxUiUtility@@QAEPAVCAlfEnv@@XZ @ 57 NONAME ; class CAlfEnv * CGlxUiUtility::Env(void)
+	?RetrieveL@GlxAttributeRetriever@@SAHABVMGlxFetchContext@@AAVMGlxMediaList@@H@Z @ 58 NONAME ; int GlxAttributeRetriever::RetrieveL(class MGlxFetchContext const &, class MGlxMediaList &, int)
+	?TextStyleIdL@CGlxUiUtility@@QAEHHH@Z @ 59 NONAME ; int CGlxUiUtility::TextStyleIdL(int, int)
+	?InstanceL@CGlxActiveMediaListRegistry@@SAPAV1@PAVMGlxActiveMediaListChangeObserver@@@Z @ 60 NONAME ; class CGlxActiveMediaListRegistry * CGlxActiveMediaListRegistry::InstanceL(class MGlxActiveMediaListChangeObserver *)
+	?CreateImageLoadingAnimationL@GlxAnimationFactory@@SAPAVMGlxAnimation@@AAVCAlfVisual@@AAVCAlfTexture@@@Z @ 61 NONAME ; class MGlxAnimation * GlxAnimationFactory::CreateImageLoadingAnimationL(class CAlfVisual &, class CAlfTexture &)
+	?DeregisterActiveMediaList@CGlxActiveMediaListRegistry@@QAEXPAVMGlxMediaList@@@Z @ 62 NONAME ; void CGlxActiveMediaListRegistry::DeregisterActiveMediaList(class MGlxMediaList *)
+	?SetAppOrientationL@CGlxUiUtility@@QAEXW4TGlxOrientation@@@Z @ 63 NONAME ; void CGlxUiUtility::SetAppOrientationL(enum TGlxOrientation)
+	?ConfirmQueryL@GlxGeneralUiUtilities@@SAHABVTDesC16@@@Z @ 64 NONAME ; int GlxGeneralUiUtilities::ConfirmQueryL(class TDesC16 const &)
+	?NewL@CGlxTextEntryPopup@@SAPAV1@ABVTDesC16@@AAVTDes16@@@Z @ 65 NONAME ; class CGlxTextEntryPopup * CGlxTextEntryPopup::NewL(class TDesC16 const &, class TDes16 &)
+	?CreateViewAnimationL@GlxAnimationFactory@@SAPAVMGlxAnimation@@W4TGlxViewswitchAnimation@@W4TGlxNavigationDirection@@PAVCAlfControlGroup@@@Z @ 66 NONAME ; class MGlxAnimation * GlxAnimationFactory::CreateViewAnimationL(enum TGlxViewswitchAnimation, enum TGlxNavigationDirection, class CAlfControlGroup *)
+	?ShowConfirmationNoteL@GlxGeneralUiUtilities@@SAXABVTDesC16@@H@Z @ 67 NONAME ; void GlxGeneralUiUtilities::ShowConfirmationNoteL(class TDesC16 const &, int)
+	?ScreenFurniture@CGlxUiUtility@@QAEPAVCGlxScreenFurniture@@XZ @ 68 NONAME ; class CGlxScreenFurniture * CGlxUiUtility::ScreenFurniture(void)
+	?InstanceL@MGlxActiveMediaListResolver@@SAPAV1@PAVMGlxActiveMediaListChangeObserver@@@Z @ 69 NONAME ; class MGlxActiveMediaListResolver * MGlxActiveMediaListResolver::InstanceL(class MGlxActiveMediaListChangeObserver *)
 
--- a/photosgallery/viewframework/uiutilities/data/glxuiutilities.rss	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/uiutilities/data/glxuiutilities.rss	Wed Jun 09 09:41:51 2010 +0300
@@ -504,26 +504,6 @@
 
 // -----------------------------------------------------------------------------
 //
-// r_glx_aiw_single_click_edit_interest
-// AIW interest structure for edit
-//
-// -----------------------------------------------------------------------------
-RESOURCE AIW_INTEREST r_glx_aiw_single_click_edit_interest
-    {
-    items=
-        {
-        AIW_CRITERIA_ITEM
-            {
-            id = EGlxCmdAiwSingleClickEdit;
-            serviceCmd = KAiwCmdEdit;
-            contentType = "*";
-            serviceClass = KAiwClassMenu;
-            }
-        };
-    }
-
-// -----------------------------------------------------------------------------
-//
 // r_glx_aiw_print_interest
 // AIW interest structure for print preview
 //
--- a/photosgallery/viewframework/uiutilities/eabi/glxuiutilitiesu.def	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/uiutilities/eabi/glxuiutilitiesu.def	Wed Jun 09 09:41:51 2010 +0300
@@ -16,76 +16,77 @@
 	_ZN13CGlxUiUtility18SetAppOrientationLE15TGlxOrientation @ 15 NONAME
 	_ZN13CGlxUiUtility19GetRotatedImageSizeEv @ 16 NONAME
 	_ZN13CGlxUiUtility19SetRotatedImageSizeE5TSize @ 17 NONAME
-	_ZN13CGlxUiUtility22AddSkinChangeObserverLER22MGlxSkinChangeObserver @ 18 NONAME
-	_ZN13CGlxUiUtility22HandleTvStatusChangedLE13TTvChangeType @ 19 NONAME
-	_ZN13CGlxUiUtility23ViewNavigationDirectionEv @ 20 NONAME
-	_ZN13CGlxUiUtility24RemoveSkinChangeObserverER22MGlxSkinChangeObserver @ 21 NONAME
-	_ZN13CGlxUiUtility26SetViewNavigationDirectionE23TGlxNavigationDirection @ 22 NONAME
-	_ZN13CGlxUiUtility30VisibleItemsInPageGranularityLEv @ 23 NONAME
-	_ZN13CGlxUiUtility3EnvEv @ 24 NONAME
-	_ZN13CGlxUiUtility5CloseEv @ 25 NONAME
-	_ZN13CGlxUiUtility8UtilityLEv @ 26 NONAME
-	_ZN14GlxSetAppState8AppStateEv @ 27 NONAME
-	_ZN14GlxSetAppState8SetStateE12TGlxAppState @ 28 NONAME
-	_ZN15CGlxMMCNotifier4NewLER24MStorageNotifierObserver @ 29 NONAME
-	_ZN18CGlxTextEntryPopup15SetLeftSoftKeyLEi @ 30 NONAME
-	_ZN18CGlxTextEntryPopup4NewLERK7TDesC16R6TDes16 @ 31 NONAME
-	_ZN18CGlxTextEntryPopup9ExecuteLDEv @ 32 NONAME
-	_ZN19CGlxScreenFurniture11SetTooltipLEiN10CAknButton16TTooltipPositionERK7TDesC16 @ 33 NONAME
-	_ZN19CGlxScreenFurniture13SetActiveViewEi @ 34 NONAME
-	_ZN19CGlxScreenFurniture15ViewDeactivatedEi @ 35 NONAME
-	_ZN19CGlxScreenFurniture16ModifySoftkeyIdLEN24CEikButtonGroupContainer16TCommandPositionEiiRK7TDesC16 @ 36 NONAME
-	_ZN19CGlxScreenFurniture18SetToolbarPositionEv @ 37 NONAME
-	_ZN19CGlxScreenFurniture20SetToolbarItemDimmedEii @ 38 NONAME
-	_ZN19CGlxScreenFurniture20SetToolbarVisibilityEi @ 39 NONAME
-	_ZN19CGlxScreenFurniture24SetToolbarItemVisibilityEii @ 40 NONAME
-	_ZN19CGlxScreenFurniture4NewLER13CGlxUiUtility @ 41 NONAME
-	_ZN19CGlxScreenFurniture5NewLCER13CGlxUiUtility @ 42 NONAME
-	_ZN19CGlxScreenFurniture9SetFocusLEi @ 43 NONAME
-	_ZN19GlxAnimationFactory20CreateViewAnimationLE23TGlxViewswitchAnimation23TGlxNavigationDirectionP16CAlfControlGroup @ 44 NONAME
-	_ZN19GlxAnimationFactory20CreateViewAnimationLE23TGlxViewswitchAnimation23TGlxNavigationDirectionR13RPointerArrayI16CAlfControlGroupE @ 45 NONAME
-	_ZN19GlxAnimationFactory28CreateImageLoadingAnimationLER10CAlfVisualR11CAlfTexture @ 46 NONAME
-	_ZN21CGlxProgressIndicator16ShowProgressbarLEv @ 47 NONAME
-	_ZN21CGlxProgressIndicator21DismissProgressDialogEv @ 48 NONAME
-	_ZN21CGlxProgressIndicator4NewLER23MDialogDismisedObserver @ 49 NONAME
-	_ZN21GlxAttributeRetriever9RetrieveLERK16MGlxFetchContextR13MGlxMediaListi @ 50 NONAME
-	_ZN21GlxGeneralUiUtilities11IsLandscapeEv @ 51 NONAME
-	_ZN21GlxGeneralUiUtilities12FormatStringER6TDes16RK7TDesC16iii @ 52 NONAME
-	_ZN21GlxGeneralUiUtilities13ConfirmQueryLERK7TDesC16 @ 53 NONAME
-	_ZN21GlxGeneralUiUtilities13ConfirmQueryLEiRK7TDesC16 @ 54 NONAME
-	_ZN21GlxGeneralUiUtilities13ShowInfoNoteLERK7TDesC16i @ 55 NONAME
-	_ZN21GlxGeneralUiUtilities14ShowErrorNoteLERK7TDesC16i @ 56 NONAME
-	_ZN21GlxGeneralUiUtilities14ShowErrorNoteLEi @ 57 NONAME
-	_ZN21GlxGeneralUiUtilities16LayoutIsMirroredEv @ 58 NONAME
-	_ZN21GlxGeneralUiUtilities21ShowConfirmationNoteLERK7TDesC16i @ 59 NONAME
-	_ZN27CGlxActiveMediaListRegistry23RegisterActiveMediaListEP13MGlxMediaList @ 60 NONAME
-	_ZN27CGlxActiveMediaListRegistry25DeregisterActiveMediaListEP13MGlxMediaList @ 61 NONAME
-	_ZN27CGlxActiveMediaListRegistry9InstanceLEP33MGlxActiveMediaListChangeObserver @ 62 NONAME
-	_ZN27MGlxActiveMediaListResolver9InstanceLEP33MGlxActiveMediaListChangeObserver @ 63 NONAME
-	_ZNK13CGlxUiUtility11DisplaySizeEv @ 64 NONAME
-	_ZNK13CGlxUiUtility14AppOrientationEv @ 65 NONAME
-	_ZNK13CGlxUiUtility7DisplayEv @ 66 NONAME
-	_ZTI13CGlxUiUtility @ 67 NONAME
-	_ZTI15CGlxMMCNotifier @ 68 NONAME
-	_ZTI17CGlxAnimationView @ 69 NONAME
-	_ZTI18CGlxAnimationTimed @ 70 NONAME
-	_ZTI18CGlxTextEntryPopup @ 71 NONAME
-	_ZTI21CGlxProgressIndicator @ 72 NONAME
-	_ZTI21CGlxSkinChangeMonitor @ 73 NONAME
-	_ZTI25CGlxAnimationImageLoading @ 74 NONAME
-	_ZTI32CGlxWaitDialogAttributeRetriever @ 75 NONAME
-	_ZTI33CGlxSynchronousAttributeRetriever @ 76 NONAME
-	_ZTV13CGlxUiUtility @ 77 NONAME
-	_ZTV15CGlxMMCNotifier @ 78 NONAME
-	_ZTV17CGlxAnimationView @ 79 NONAME
-	_ZTV18CGlxAnimationTimed @ 80 NONAME
-	_ZTV18CGlxTextEntryPopup @ 81 NONAME
-	_ZTV21CGlxProgressIndicator @ 82 NONAME
-	_ZTV21CGlxSkinChangeMonitor @ 83 NONAME
-	_ZTV25CGlxAnimationImageLoading @ 84 NONAME
-	_ZTV32CGlxWaitDialogAttributeRetriever @ 85 NONAME
-	_ZTV33CGlxSynchronousAttributeRetriever @ 86 NONAME
-	_ZThn4_N13CGlxUiUtility22HandleTvStatusChangedLE13TTvChangeType @ 87 NONAME
-	_ZN13CGlxUiUtility20DestroyScreenClearerEv @ 88 NONAME
-	_ZN13CGlxUiUtility21DisplayScreenClearerLEv @ 89 NONAME
+	_ZN13CGlxUiUtility20DestroyScreenClearerEv @ 18 NONAME
+	_ZN13CGlxUiUtility21DisplayScreenClearerLEv @ 19 NONAME
+	_ZN13CGlxUiUtility22AddSkinChangeObserverLER22MGlxSkinChangeObserver @ 20 NONAME
+	_ZN13CGlxUiUtility22HandleTvStatusChangedLE13TTvChangeType @ 21 NONAME
+	_ZN13CGlxUiUtility23ViewNavigationDirectionEv @ 22 NONAME
+	_ZN13CGlxUiUtility24RemoveSkinChangeObserverER22MGlxSkinChangeObserver @ 23 NONAME
+	_ZN13CGlxUiUtility26SetViewNavigationDirectionE23TGlxNavigationDirection @ 24 NONAME
+	_ZN13CGlxUiUtility30VisibleItemsInPageGranularityLEv @ 25 NONAME
+	_ZN13CGlxUiUtility3EnvEv @ 26 NONAME
+	_ZN13CGlxUiUtility5CloseEv @ 27 NONAME
+	_ZN13CGlxUiUtility8UtilityLEv @ 28 NONAME
+	_ZN14GlxSetAppState8AppStateEv @ 29 NONAME
+	_ZN14GlxSetAppState8SetStateE12TGlxAppState @ 30 NONAME
+	_ZN15CGlxMMCNotifier4NewLER24MStorageNotifierObserver @ 31 NONAME
+	_ZN18CGlxTextEntryPopup15SetLeftSoftKeyLEi @ 32 NONAME
+	_ZN18CGlxTextEntryPopup4NewLERK7TDesC16R6TDes16 @ 33 NONAME
+	_ZN18CGlxTextEntryPopup9ExecuteLDEv @ 34 NONAME
+	_ZN19CGlxScreenFurniture11SetTooltipLEiN10CAknButton16TTooltipPositionERK7TDesC16 @ 35 NONAME
+	_ZN19CGlxScreenFurniture13SetActiveViewEi @ 36 NONAME
+	_ZN19CGlxScreenFurniture15ViewDeactivatedEi @ 37 NONAME
+	_ZN19CGlxScreenFurniture16ModifySoftkeyIdLEN24CEikButtonGroupContainer16TCommandPositionEiiRK7TDesC16 @ 38 NONAME
+	_ZN19CGlxScreenFurniture18SetToolbarPositionEv @ 39 NONAME
+	_ZN19CGlxScreenFurniture20SetToolbarItemDimmedEii @ 40 NONAME
+	_ZN19CGlxScreenFurniture20SetToolbarVisibilityEi @ 41 NONAME
+	_ZN19CGlxScreenFurniture24SetToolbarItemVisibilityEii @ 42 NONAME
+	_ZN19CGlxScreenFurniture4NewLER13CGlxUiUtility @ 43 NONAME
+	_ZN19CGlxScreenFurniture5NewLCER13CGlxUiUtility @ 44 NONAME
+	_ZN19CGlxScreenFurniture9SetFocusLEi @ 45 NONAME
+	_ZN19GlxAnimationFactory20CreateViewAnimationLE23TGlxViewswitchAnimation23TGlxNavigationDirectionP16CAlfControlGroup @ 46 NONAME
+	_ZN19GlxAnimationFactory20CreateViewAnimationLE23TGlxViewswitchAnimation23TGlxNavigationDirectionR13RPointerArrayI16CAlfControlGroupE @ 47 NONAME
+	_ZN19GlxAnimationFactory28CreateImageLoadingAnimationLER10CAlfVisualR11CAlfTexture @ 48 NONAME
+	_ZN21CGlxProgressIndicator15ControlTNDaemonEi @ 49 NONAME
+	_ZN21CGlxProgressIndicator16ShowProgressbarLEv @ 50 NONAME
+	_ZN21CGlxProgressIndicator21DismissProgressDialogEv @ 51 NONAME
+	_ZN21CGlxProgressIndicator4NewLER23MDialogDismisedObserver @ 52 NONAME
+	_ZN21GlxAttributeRetriever9RetrieveLERK16MGlxFetchContextR13MGlxMediaListi @ 53 NONAME
+	_ZN21GlxGeneralUiUtilities11IsLandscapeEv @ 54 NONAME
+	_ZN21GlxGeneralUiUtilities12FormatStringER6TDes16RK7TDesC16iii @ 55 NONAME
+	_ZN21GlxGeneralUiUtilities13ConfirmQueryLERK7TDesC16 @ 56 NONAME
+	_ZN21GlxGeneralUiUtilities13ConfirmQueryLEiRK7TDesC16 @ 57 NONAME
+	_ZN21GlxGeneralUiUtilities13ShowInfoNoteLERK7TDesC16i @ 58 NONAME
+	_ZN21GlxGeneralUiUtilities14ShowErrorNoteLERK7TDesC16i @ 59 NONAME
+	_ZN21GlxGeneralUiUtilities14ShowErrorNoteLEi @ 60 NONAME
+	_ZN21GlxGeneralUiUtilities16LayoutIsMirroredEv @ 61 NONAME
+	_ZN21GlxGeneralUiUtilities21ShowConfirmationNoteLERK7TDesC16i @ 62 NONAME
+	_ZN27CGlxActiveMediaListRegistry23RegisterActiveMediaListEP13MGlxMediaList @ 63 NONAME
+	_ZN27CGlxActiveMediaListRegistry25DeregisterActiveMediaListEP13MGlxMediaList @ 64 NONAME
+	_ZN27CGlxActiveMediaListRegistry9InstanceLEP33MGlxActiveMediaListChangeObserver @ 65 NONAME
+	_ZN27MGlxActiveMediaListResolver9InstanceLEP33MGlxActiveMediaListChangeObserver @ 66 NONAME
+	_ZNK13CGlxUiUtility11DisplaySizeEv @ 67 NONAME
+	_ZNK13CGlxUiUtility14AppOrientationEv @ 68 NONAME
+	_ZNK13CGlxUiUtility7DisplayEv @ 69 NONAME
+	_ZTI13CGlxUiUtility @ 70 NONAME
+	_ZTI15CGlxMMCNotifier @ 71 NONAME
+	_ZTI17CGlxAnimationView @ 72 NONAME
+	_ZTI18CGlxAnimationTimed @ 73 NONAME
+	_ZTI18CGlxTextEntryPopup @ 74 NONAME
+	_ZTI21CGlxProgressIndicator @ 75 NONAME
+	_ZTI21CGlxSkinChangeMonitor @ 76 NONAME
+	_ZTI25CGlxAnimationImageLoading @ 77 NONAME
+	_ZTI32CGlxWaitDialogAttributeRetriever @ 78 NONAME
+	_ZTI33CGlxSynchronousAttributeRetriever @ 79 NONAME
+	_ZTV13CGlxUiUtility @ 80 NONAME
+	_ZTV15CGlxMMCNotifier @ 81 NONAME
+	_ZTV17CGlxAnimationView @ 82 NONAME
+	_ZTV18CGlxAnimationTimed @ 83 NONAME
+	_ZTV18CGlxTextEntryPopup @ 84 NONAME
+	_ZTV21CGlxProgressIndicator @ 85 NONAME
+	_ZTV21CGlxSkinChangeMonitor @ 86 NONAME
+	_ZTV25CGlxAnimationImageLoading @ 87 NONAME
+	_ZTV32CGlxWaitDialogAttributeRetriever @ 88 NONAME
+	_ZTV33CGlxSynchronousAttributeRetriever @ 89 NONAME
+	_ZThn4_N13CGlxUiUtility22HandleTvStatusChangedLE13TTvChangeType @ 90 NONAME
 
--- a/photosgallery/viewframework/uiutilities/inc/glxprogressindicator.h	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/uiutilities/inc/glxprogressindicator.h	Wed Jun 09 09:41:51 2010 +0300
@@ -28,22 +28,51 @@
 class MDialogDismisedObserver
     {
 public:
-    virtual void HandleDialogDismissedL()=0;
+    virtual void HandleDialogDismissedL() = 0;
     };
 
-class CGlxProgressIndicator : public CBase,
-                                 public MProgressDialogCallback
+class CGlxProgressIndicator : public CBase, public MProgressDialogCallback
     {
 public:
-    IMPORT_C static CGlxProgressIndicator* NewL(MDialogDismisedObserver&  aGlxGridViewNotifyObserver);
+    IMPORT_C static CGlxProgressIndicator* NewL(
+            MDialogDismisedObserver& aGlxGridViewNotifyObserver);
+    
     ~CGlxProgressIndicator();
-    static CGlxProgressIndicator* NewLC(MDialogDismisedObserver&  aGlxGridViewNotifyObserver);
+
     /**
      * dismiss progress dialog when it is needed
      */
     IMPORT_C void DismissProgressDialog();
+
+    /**
+     * Show progressbar dialog
+     */
+    IMPORT_C void ShowProgressbarL();
+    
+    /**
+     * Start or stop the TN daemon
+     * @param aStatus The foreground status
+     */
+    IMPORT_C void ControlTNDaemon(TBool aStatus);
+    
+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:
-    CGlxProgressIndicator(MDialogDismisedObserver&  aGlxGridViewNotifyObserver);
+    static CGlxProgressIndicator* NewLC(
+            MDialogDismisedObserver& aGlxGridViewNotifyObserver);
+    
+    CGlxProgressIndicator(
+                    MDialogDismisedObserver& aGlxGridViewNotifyObserver);
+    
     void ConstructL();
     
     /**
@@ -51,7 +80,8 @@
      * @param aFinalValue Sets the final value of the bar
      * @param aShow hide/display the progress bar 
      */
-    void StartProgressNoteL(TInt aFinalValue ,TBool aShow);
+    void StartProgressNoteL(TInt aFinalValue, TBool aShow);
+    
     /**
      * displays the increment of progress bar
      */
@@ -62,19 +92,7 @@
      * @return increment value
      */
     TInt CalculateDisplayBarIncrement();
-public:
-    // Callback for periodic timer, static, 
-    static TInt PeriodicCallbackL( TAny* aPtr );
-    
-    //nonstatic func called from periodic timer
-    void DisplayProgressBarL();
-    
-    //show progress bar
-    IMPORT_C void ShowProgressbarL();
-    
-protected://MProgressDialogCallback
-    void DialogDismissedL (TInt aButtonId);
-    
+        
 private:
     //Progress bar updation ticker
     CPeriodic* iProgressbarTicker;
@@ -87,8 +105,10 @@
     
     //final count to set in progress bar
     TInt iFinalCount;
-    MDialogDismisedObserver&  iGlxGridViewNotifyObserver;
-    CGlxUiUtility* iUiUtility;
 
+    MDialogDismisedObserver& iGlxGridViewNotifyObserver;
+    
+    CGlxUiUtility* iUiUtility;
     };
+
 #endif /* GLXPROGRESSINDICATOR_H_ */
--- a/photosgallery/viewframework/uiutilities/src/glxprogressindicator.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/uiutilities/src/glxprogressindicator.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -30,12 +30,12 @@
 // CGlxProgressIndicator::NewL
 // ---------------------------------------------------------
 //  
-EXPORT_C CGlxProgressIndicator* CGlxProgressIndicator::NewL
-                    (MDialogDismisedObserver& aGlxGridViewNotifyObserver)
+EXPORT_C CGlxProgressIndicator* CGlxProgressIndicator::NewL(
+        MDialogDismisedObserver& aGlxGridViewNotifyObserver)
     {
     TRACER("CGlxProgressIndicator::NewL()");
-    CGlxProgressIndicator* self = CGlxProgressIndicator::NewLC
-                                                (aGlxGridViewNotifyObserver);
+    CGlxProgressIndicator* self = CGlxProgressIndicator::NewLC(
+            aGlxGridViewNotifyObserver);
     CleanupStack::Pop(self);
     return self;
     }
@@ -44,12 +44,12 @@
 // CGlxProgressIndicator::NewLC
 // ---------------------------------------------------------
 //  
-CGlxProgressIndicator* CGlxProgressIndicator::NewLC
-                    (MDialogDismisedObserver& aGlxGridViewNotifyObserver)
+CGlxProgressIndicator* CGlxProgressIndicator::NewLC(
+        MDialogDismisedObserver& aGlxGridViewNotifyObserver)
     {
     TRACER("CGlxProgressIndicator::NewLC()");
-    CGlxProgressIndicator* self = new(ELeave)
-                    CGlxProgressIndicator(aGlxGridViewNotifyObserver);
+    CGlxProgressIndicator* self = new (ELeave) CGlxProgressIndicator(
+            aGlxGridViewNotifyObserver);
     CleanupStack::PushL(self);
     self->ConstructL();
     return self;
@@ -59,9 +59,9 @@
 // CGlxProgressIndicator::CGlxProgressIndicator
 // ---------------------------------------------------------
 // 
-CGlxProgressIndicator::CGlxProgressIndicator
-          (MDialogDismisedObserver& aGlxGridViewNotifyObserver)
-                    :iGlxGridViewNotifyObserver(aGlxGridViewNotifyObserver)
+CGlxProgressIndicator::CGlxProgressIndicator(
+        MDialogDismisedObserver& aGlxGridViewNotifyObserver) :
+    iGlxGridViewNotifyObserver(aGlxGridViewNotifyObserver)
     {
     }
 
@@ -94,6 +94,9 @@
 void CGlxProgressIndicator::ConstructL()
     {
     TRACER("CGlxProgressIndicator::ConstructL()");
+    
+    iUiUtility = CGlxUiUtility::UtilityL();
+    
     iUiUtility->StartTNMDaemon();
 
     if (!iProgressbarTicker)
@@ -141,7 +144,7 @@
 // StartProgressNoteL
 // -----------------------------------------------------------------------------
 //
-void CGlxProgressIndicator::StartProgressNoteL(TInt aFinalValue,TBool aShow)
+void CGlxProgressIndicator::StartProgressNoteL(TInt aFinalValue, TBool aShow)
     {
     TRACER("CGlxProgressIndicator::StartProgressNoteL()");
     TInt itemsLeft = iUiUtility->GetItemsLeftCount();
@@ -243,11 +246,10 @@
 void EXPORT_C CGlxProgressIndicator::ShowProgressbarL()
     {
     TRACER("CGlxProgressIndicator::ShowProgressbarL");
-    iUiUtility->StartTNMDaemon();
     TInt itemsLeft = iUiUtility->GetItemsLeftCount();
+    GLX_DEBUG3("ShowProgressbarL itemsLeft(%d), iFinalCount(%d)", itemsLeft, 
+            iFinalCount);
 
-    GLX_LOG_INFO1("ShowProgressbar itemsLeft = %d ",itemsLeft);
-    GLX_LOG_INFO1("ShowProgressbar iFinalCount = %d ",iFinalCount);
     if (iFinalCount < itemsLeft)
         {
         /*
@@ -290,3 +292,20 @@
         }
     }
 
+// -----------------------------------------------------------------------------
+// ControlTNDaemon
+// -----------------------------------------------------------------------------
+//
+EXPORT_C void CGlxProgressIndicator::ControlTNDaemon(TBool aStatus)
+    {
+    TRACER("CGlxProgressIndicator::ControlTNDaemon");
+    GLX_DEBUG2("CGlxProgressIndicator::ControlTNDaemon(%d)", aStatus);
+    if (aStatus)
+        {
+        iUiUtility->StartTNMDaemon();
+        }
+    else
+        {
+        iUiUtility->StopTNMDaemon();
+        }
+    }
--- a/photosgallery/viewframework/uiutilities/src/glxuiutility.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/uiutilities/src/glxuiutility.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -70,7 +70,7 @@
  * Start Delay for the periodic timer, in microseconds
  */
 const TInt KPeriodicStartDelay = 1000000; 
-
+const TInt KIgnoreItemsLeftCount = 5;
 //Hg 
 //#include <hg/hgcontextutility.h>
 
@@ -826,15 +826,28 @@
 EXPORT_C TInt CGlxUiUtility::GetItemsLeftCount()
     {
     TRACER("CGlxUiUtility::GetItemsLeftCount");
-    TInt leftVariable = 0;
-    TInt err = RProperty::Get(KTAGDPSNotification, KItemsleft, leftVariable);
-    GLX_LOG_INFO1("GetItemsLeftCount: GetItemsLeftCount %d", leftVariable);
+    TInt itemsLeftCount = 0;
+    TInt err = RProperty::Get(KTAGDPSNotification, KItemsleft, itemsLeftCount);
+    GLX_LOG_INFO1("GetItemsLeftCount: GetItemsLeftCount %d", itemsLeftCount);
+
+    // In case of error, enter in the next view. Don't block photos permanently.
+    // [Though this use case is very unlikely]
     if (err != KErrNone)
         {
         GLX_LOG_INFO1("GetItemsLeftCount: RProperty::Get errorcode %d", err);
-        leftVariable = 0;
+        itemsLeftCount = 0;
         }
-    return leftVariable;
+
+    // This case is added as per UI-Improvements.
+    // Use case: Take a pic. open photos from Menu (not "Goto photos")
+    // Progress bar SHOULD NOT be displayed.
+    if (itemsLeftCount <= KIgnoreItemsLeftCount)
+        {
+        GLX_LOG_INFO("GetItemsLeftCount( < KIgnoreItemsLeftCount )");
+        itemsLeftCount = 0;
+        }
+
+    return itemsLeftCount;
     }
 
 // -----------------------------------------------------------------------------
--- a/photosgallery/viewframework/views/fullscreenview/inc/glxfullscreenviewimp.h	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/views/fullscreenview/inc/glxfullscreenviewimp.h	Wed Jun 09 09:41:51 2010 +0300
@@ -30,6 +30,7 @@
 #include "glxfullscreenview.hrh"
 #include "glxmmcnotifier.h"
 #include "glxtv.h"
+#include "mglxhdmidecoderobserver.h" //for MGlxHDMIDecoderObserver
 
 //Gesture Helper namespace 
 namespace GestureHelper
@@ -72,7 +73,8 @@
  											public MGlxUiCommandHandler,
 			                                public MStorageNotifierObserver,
 			                                public CAlfEffectObserver::MAlfEffectObserver,
-											public MGlxTvObserver
+											public MGlxTvObserver,
+											public MGlxHDMIDecoderObserver
     {
 public:    
     /**
@@ -141,6 +143,14 @@
 	
 	//From MAlfEffectObserver
     void HandleEffectCallback(TInt aType, TInt aHandle, TInt aStatus);
+
+public:
+    //From MGlxHDMIDecoderObserver
+    /*
+     * Handle completion notification of HDMI Image Decoder.
+     */
+    void HandleHDMIDecodingEventL(THdmiDecodingStatus aStatus);
+
 private:
     /*
      * Constructor 
--- a/photosgallery/viewframework/views/fullscreenview/src/glxfullscreenviewimp.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/views/fullscreenview/src/glxfullscreenviewimp.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -11,7 +11,7 @@
 *
 * Contributors:
 *
-* Description:    Implementation of fULL-SCREEN view
+* Description:    Implementation of FULL-SCREEN view
 *
 */
 
@@ -356,7 +356,7 @@
     //From filemanager show only clone mode.
     if( !iImgViewerMode )    
         {
-        iHdmiController = CGlxHdmiController::NewL();    
+        iHdmiController = CGlxHdmiController::NewL(*this);    
         SetItemToHDMIL();
         }
     iScreenFurniture->SetActiveView(iViewUid);
@@ -757,6 +757,14 @@
                                         item, apZoomFocus,iImgViewerMode);
                 }
             // Now to remove all textures other than the one we are focussing on.  
+            TInt frameCount = KErrNone;
+            item.GetFrameCount(frameCount);
+            // If .gif file, then only call stopanimation
+			if (frameCount > 1)
+                {
+                iUiUtility->GlxTextureManager().AnimateMediaItem(
+                        item.Id(), EFalse);
+                }
             TInt count = iMediaList->Count();
             while (count > 0)
                 {
@@ -794,7 +802,18 @@
         {        
         iZoomControl->Deactivate();
         }
-    
+    if (iMediaList->FocusIndex() != KErrNotFound)
+        {
+        TGlxMedia item = iMediaList->Item(iMediaList->FocusIndex());
+        TInt frameCount = KErrNone;
+        item.GetFrameCount(frameCount);
+		// If .gif file, then only call start animation
+        if (frameCount > 1)
+            {
+            iUiUtility->GlxTextureManager().AnimateMediaItem(
+                    item.Id(), ETrue);
+            }
+        }
     //check if the slider is already visible in zoom view.
     //if yes then do not disable the slider.
     TBool sliderInvisible = ETrue;
@@ -913,18 +932,31 @@
 			{   
             iHdmiController->ShiftToCloningMode();
 			}
-        iUiUtility->GlxTextureManager().FlushTextures();
-        }
-    else
-        {
-        if (iMediaList && iMediaList->Count() && iMediaListMulModelProvider)
-            {
-            TInt focusIndex = iMediaList->FocusIndex();
-            iMediaListMulModelProvider->UpdateItems(focusIndex, 1);
-            
-            if(iHdmiController)
-				{    
-                iHdmiController->ShiftToPostingMode();
+		iUiUtility->GlxTextureManager().FlushTextures();
+		}
+	else
+		{
+		if (iMediaList)
+			{
+			/** if there is no image to show go back to the previous view */
+			if (!iMediaList->Count())
+				{
+				iUiUtility->SetViewNavigationDirection(EGlxNavigationBackwards);
+				CGlxNavigationalState* navigationalState =
+						CGlxNavigationalState::InstanceL();
+				CleanupClosePushL(*navigationalState);
+				navigationalState ->ActivatePreviousViewL();
+				CleanupStack::PopAndDestroy(navigationalState);
+				}
+			else if (iMediaListMulModelProvider)
+				{
+				TInt focusIndex = iMediaList->FocusIndex();
+				iMediaListMulModelProvider->UpdateItems(focusIndex, 1);
+
+				if (iHdmiController)
+					{
+					iHdmiController->ShiftToPostingMode();
+					}
 				}
             }
         }
@@ -1112,6 +1144,17 @@
                         iSliderWidget->ShowWidget(CheckIfSliderToBeShownL());
                         }
                     }
+                /** if this is the last image deleted when Photo is in foreground, go back to the previous view*/
+				if (!iMediaList->Count() && IsForeground())
+					{
+					iUiUtility->SetViewNavigationDirection(
+							EGlxNavigationBackwards);
+					CGlxNavigationalState* navigationalState =
+							CGlxNavigationalState::InstanceL();
+					CleanupClosePushL(*navigationalState);
+					navigationalState ->ActivatePreviousViewL();
+					CleanupStack::PopAndDestroy(navigationalState);
+					}
                 return EEventConsumed;
                 }
             case ETypeHighlight:
@@ -1676,7 +1719,7 @@
             
             GLX_LOG_INFO2("CGlxFullScreenViewImp::SetImageToHDMIL - CGlxHdmi - FS Bitmap Size width=%d, height=%d", 
                     fsBitmap->SizeInPixels().iWidth, fsBitmap->SizeInPixels().iHeight);
-            iHdmiController->SetImageL(item.Uri(),fsBitmap);
+            iHdmiController->SetImageL(item.Uri(), KNullDesC, fsBitmap);
             CleanupStack::PopAndDestroy(fsBitmap);
             }
         else
@@ -1697,7 +1740,7 @@
                 
                 GLX_LOG_INFO2("CGlxFullScreenViewImp::SetImageToHDMIL - CGlxHdmi - gridBitmap Size width=%d, height=%d", 
                         gridBitmap->SizeInPixels().iWidth, gridBitmap->SizeInPixels().iHeight);
-                iHdmiController->SetImageL(item.Uri(),gridBitmap);
+                iHdmiController->SetImageL(item.Uri(), KNullDesC, gridBitmap);
                 CleanupStack::PopAndDestroy(gridBitmap);
                 }
             else
@@ -1714,7 +1757,7 @@
 
                 GLX_LOG_INFO2("CGlxFullScreenViewImp::SetImageToHDMIL - CGlxHdmi - Default Size width=%d, height=%d", 
                         defaultBitmap->SizeInPixels().iWidth, defaultBitmap->SizeInPixels().iHeight);
-                iHdmiController->SetImageL(item.Uri(),defaultBitmap);
+                iHdmiController->SetImageL(item.Uri(), KNullDesC, defaultBitmap);
                 CleanupStack::PopAndDestroy(defaultBitmap); 
                 }
             }
@@ -1807,11 +1850,12 @@
                                                  TInt /*aStatus*/)
     {
     TRACER("CGlxFullScreenViewImp::HandleEffectCallback()");
-    if (aHandle == iEffectHandle && aType == EAlfEffectComplete)
+    if (aHandle == iEffectHandle && aType == EAlfEffectComplete
+            && iCoverFlowWidget)
         {
         TRAP_IGNORE(const_cast<CAlfLayout&>
                 (iCoverFlowWidget->ContainerLayout()).SetEffectL(
-                                                     KTfxResourceNoEffect));
+                        KTfxResourceNoEffect));
         }
     }
 
@@ -1895,3 +1939,12 @@
         }
     return EFalse;
     }
+
+//---------------------------------------------------------------------------
+// HandleHDMIDecodingEventL
+//---------------------------------------------------------------------------   
+void CGlxFullScreenViewImp::HandleHDMIDecodingEventL(
+        THdmiDecodingStatus /*aStatus*/)
+    {
+    TRACER("CGlxFullScreenViewImp::HandleHDMIDecodingEventL()");
+    }
--- a/photosgallery/viewframework/views/gridview/inc/glxgridviewcontainer.h	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/views/gridview/inc/glxgridviewcontainer.h	Wed Jun 09 09:41:51 2010 +0300
@@ -161,6 +161,14 @@
 	 */
 	void HandleMMCRemovalL();
 
+    /**
+     * SetIconL - Sets the grid cell icon with the given parameters
+     * @param aItemIndex -  The grid cell index
+     * @param aBitmapId - The bitmap id
+     * @param aMaskId - The mask id
+     */
+    void SetIconL(TInt aItemIndex, TInt aBitmapId, TInt aMaskId);
+
 private:
 	//medialist
 	MGlxMediaList* iMediaList;				    // MGlxMedialist , to Create MediaList
--- a/photosgallery/viewframework/views/gridview/inc/glxgridviewmlobserver.h	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/views/gridview/inc/glxgridviewmlobserver.h	Wed Jun 09 09:41:51 2010 +0300
@@ -94,10 +94,10 @@
     TBool HasRelevantThumbnail(TInt aIndex);
     
     /**
-     * RefreshScreen - Refreshes the Hg Grid based on the attributes available index 
+     * RefreshScreenL - Refreshes the Hg Grid based on the attributes available index 
      * 
      */
-    void RefreshScreen(TInt aItemIndex,const RArray<TMPXAttribute>& aAttributes);
+    void RefreshScreenL(TInt aItemIndex,const RArray<TMPXAttribute>& aAttributes);
     
     /**
      * UpdateItemsL - Update the items with the DRM/video icon and  date/time
@@ -117,6 +117,15 @@
      */
     void SetDefaultIconL(TBool aTransparent);
     
+    /**
+     * SetIconL - Sets the grid cell icon with the given parameters
+     * @param aItemIndex -  The grid cell index
+     * @param aBitmapId - The bitmap id
+     * @param aMaskId - The mask id
+     * @param aFlags - The indicator flags	 
+     */
+    void SetIconL(TInt aItemIndex, TInt aBitmapId, TInt aMaskId, TInt aFlags);
+    
 private:
 
     MGlxMediaList& iMediaList;
--- a/photosgallery/viewframework/views/gridview/src/glxgridviewcontainer.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/views/gridview/src/glxgridviewcontainer.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -54,29 +54,31 @@
 // ---------------------------------------------------------------------------
 //
 CGlxGridViewContainer* CGlxGridViewContainer::NewL(MGlxMediaList *aMediaList,
-														CGlxUiUtility* aUiUtility,
-																	MGlxGridEventObserver& aObserver,CAknToolbar* aToolbar)
-	{
-	TRACER("CGlxGridViewContainer::NewL");
-	CGlxGridViewContainer* self = CGlxGridViewContainer::NewLC(aMediaList,aUiUtility,aObserver,aToolbar) ;
-	CleanupStack::Pop(self) ;
-	return self ;
-	}
+        CGlxUiUtility* aUiUtility, MGlxGridEventObserver& aObserver,
+        CAknToolbar* aToolbar)
+    {
+    TRACER("CGlxGridViewContainer::NewL");
+    CGlxGridViewContainer* self = CGlxGridViewContainer::NewLC(aMediaList,
+            aUiUtility, aObserver, aToolbar);
+    CleanupStack::Pop(self);
+    return self;
+    }
 	
 // ---------------------------------------------------------------------------
 // Two-phased constructor.
 // ---------------------------------------------------------------------------
 //
-CGlxGridViewContainer* CGlxGridViewContainer::NewLC(MGlxMediaList *aMediaList,
-														CGlxUiUtility* aUiUtility,
-																	MGlxGridEventObserver& aObserver,CAknToolbar* aToolbar)
-	{
-	TRACER("CGlxGridViewContainer::NewLC");
-	CGlxGridViewContainer* self = new(ELeave) CGlxGridViewContainer(aMediaList,aUiUtility,aObserver,aToolbar);
-	CleanupStack::PushL(self ) ;
-	self->ConstructL() ;
-	return self ;
-	}
+CGlxGridViewContainer* CGlxGridViewContainer::NewLC(
+        MGlxMediaList *aMediaList, CGlxUiUtility* aUiUtility,
+        MGlxGridEventObserver& aObserver, CAknToolbar* aToolbar)
+    {
+    TRACER("CGlxGridViewContainer::NewLC");
+    CGlxGridViewContainer* self = new (ELeave) CGlxGridViewContainer(
+            aMediaList, aUiUtility, aObserver, aToolbar);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    return self;
+    }
 	
 // ---------------------------------------------------------------------------
 // Destructor
@@ -84,8 +86,7 @@
 //
 CGlxGridViewContainer::~CGlxGridViewContainer()
 	{
-	TRACER("CGlxGridViewContainer::~CGlxGridViewContainer");
-	
+	TRACER("CGlxGridViewContainer::~CGlxGridViewContainer");	
 	delete iMMCNotifier;
 	iMMCNotifier = NULL;
 	
@@ -125,12 +126,14 @@
 // might leave.
 // ---------------------------------------------------------------------------
 //
-CGlxGridViewContainer::CGlxGridViewContainer(MGlxMediaList *aMediaList,CGlxUiUtility* aUiUtility,
-																MGlxGridEventObserver& aObserver,CAknToolbar* aToolbar)
-					: iMediaList(aMediaList),iUiUtility(aUiUtility),iGlxGridViewObserver(aObserver),iToolbar(aToolbar)
-		{
-		TRACER("CGlxGridViewContainer::CGlxGridViewContainer");
-		}
+CGlxGridViewContainer::CGlxGridViewContainer(MGlxMediaList *aMediaList,
+        CGlxUiUtility* aUiUtility, MGlxGridEventObserver& aObserver,
+        CAknToolbar* aToolbar) :
+    iMediaList(aMediaList), iUiUtility(aUiUtility), iGlxGridViewObserver(
+            aObserver), iToolbar(aToolbar)
+    {
+    TRACER("CGlxGridViewContainer::CGlxGridViewContainer");
+    }
 	
 // ---------------------------------------------------------------------------
 // Symbian 2nd phase constructor can leave.
@@ -139,7 +142,6 @@
 void CGlxGridViewContainer::ConstructL()
 	{
 	TRACER("CGlxGridViewContainer::ConstructL()");
-
 	//create the container window.
 	CreateWindowL();
 
@@ -340,7 +342,6 @@
 void CGlxGridViewContainer::HandleOpenL( TInt aIndex )
 	{
     TRACER("CGlxGridViewContainer::HandleOpenL()");
-
 	// Make sure that the Selection Index is inside medialist count
 	if (aIndex <iMediaList->Count() && aIndex >=0)
 		{
@@ -382,7 +383,6 @@
 void CGlxGridViewContainer::CreateHgGridWidgetL()
 	{
 	TRACER("CGlxGridViewContainer::CreateHgGridWidgetL()");
-
 	TInt mediaCount = iMediaList->Count();
     GLX_DEBUG2("GlxGrid: CHgGrid::CreateHgGridWidgetL() "
             "mediaCount(%d)", mediaCount);
@@ -452,25 +452,27 @@
 //
 TRect CGlxGridViewContainer::GetHgGridRect()
     {
-    TRACER("CGlxGridViewContainer::GetHgGridRect()");
-    
+    TRACER("CGlxGridViewContainer::GetHgGridRect()");    
     TRect clientrect = iEikonEnv->EikAppUi()->ClientRect();
-    TRect apprect = iEikonEnv->EikAppUi()->ApplicationRect();	
-    if(apprect.Height()>apprect.Width())
+    TRect apprect = iEikonEnv->EikAppUi()->ApplicationRect();
+    if (apprect.Height() > apprect.Width())
         {
         //portrait:
         //height : apprect height - (status pane height + toolbar height + cba height)
         //width remains 360.
-        clientrect.SetHeight(apprect.Height() - ((clientrect.iTl.iY) + (iToolbar->Size().iHeight) + (iEikonEnv->AppUiFactory()->Cba()->Rect().Height())));
+        clientrect.SetHeight(apprect.Height() - ((clientrect.iTl.iY)
+                + (iToolbar->Size().iHeight)
+                + (iEikonEnv->AppUiFactory()->Cba()->Rect().Height())));
         }
     else
         {
         //Landscape:
         //height : apprect - (status pane height + cba height)
         //width  : apprect width - toolbarwidth.
-        clientrect.SetHeight(apprect.Height() - ((clientrect.iTl.iY) + (iEikonEnv->AppUiFactory()->Cba()->Rect().Height())));
+        clientrect.SetHeight(apprect.Height() - ((clientrect.iTl.iY)
+                + (iEikonEnv->AppUiFactory()->Cba()->Rect().Height())));
         clientrect.SetWidth(apprect.Width() - iToolbar->Size().iWidth);
-        }        
+        }
     return clientrect;
     }
 // ---------------------------------------------------------------------------
@@ -593,7 +595,8 @@
 		iHgGrid->ItemL(index).SetIcon(CGulIcon::NewL(bitmap));
 		GLX_LOG_INFO1("### CGlxGridViewContainer::SetIconsL speedTn-Index is %d",index);
 		}
-	else if ((KErrCANoRights ==tnError) || (KErrDiskFull ==tnError))
+	else if ((KErrCANoRights ==tnError) || (KErrDiskFull ==tnError)
+	        || (item.Category() == EMPXVideo && KErrNone != tnError))
 		{
 		/*
 		 * this is a safe code added to show default
@@ -608,45 +611,19 @@
 		 * In such a case we need to show default thumbnails instead of corrupted. 
 		 * 
 		 */
-		GLX_LOG_INFO2("CGlxGridViewContainer::SetIconsL - image_defaultthumbnail tnError(%d), i(%d)",
-				tnError, index);
-        CFbsBitmap* bitmap = NULL;
-        CFbsBitmap* mask = NULL;
-        AknsUtils::CreateIconLC(AknsUtils::SkinInstance(), KAknsIIDNone,
-                bitmap, mask, iIconsFileName, EMbmGlxiconsQgn_prop_image_notcreated,
+		GLX_LOG_INFO2(
+                "CGlxGridViewContainer::SetIconsL - image_defaultthumbnail tnError(%d), i(%d)",
+                tnError, index);
+        SetIconL(index, EMbmGlxiconsQgn_prop_image_notcreated,
                 EMbmGlxiconsQgn_prop_image_notcreated_mask);
-        __ASSERT_DEBUG(bitmap, Panic(EGlxPanicNullPointer));
-        __ASSERT_DEBUG(mask, Panic(EGlxPanicNullPointer));
-
-        AknIconUtils::SetSize(bitmap, iHgGridImageSize,
-                EAspectRatioPreservedAndUnusedSpaceRemoved);
-        AknIconUtils::SetSize(mask, iHgGridImageSize,
-                EAspectRatioPreservedAndUnusedSpaceRemoved);
-
-        iHgGrid->ItemL(index).SetIcon(CGulIcon::NewL(bitmap, mask));
-        CleanupStack::Pop(mask); 
-        CleanupStack::Pop(bitmap); 
 		}
    else if(KErrNone != tnError)
         {
-        GLX_LOG_INFO2("CGlxGridViewContainer::SetIconsL - image_corrupted tnError(%d), i(%d)",
+        GLX_LOG_INFO2(
+                "CGlxGridViewContainer::SetIconsL - image_corrupted tnError(%d), i(%d)",
                 tnError, index);
-        CFbsBitmap* bitmap = NULL;
-        CFbsBitmap* mask = NULL;
-        AknsUtils::CreateIconLC(AknsUtils::SkinInstance(), KAknsIIDNone,
-                bitmap, mask, iIconsFileName, EMbmGlxiconsQgn_prop_image_corrupted,
+        SetIconL(index, EMbmGlxiconsQgn_prop_image_corrupted,
                 EMbmGlxiconsQgn_prop_image_corrupted_mask);
-        __ASSERT_DEBUG(bitmap, Panic(EGlxPanicNullPointer));
-        __ASSERT_DEBUG(mask, Panic(EGlxPanicNullPointer));
-
-        AknIconUtils::SetSize(bitmap, iHgGridImageSize,
-                EAspectRatioPreservedAndUnusedSpaceRemoved);
-        AknIconUtils::SetSize(mask, iHgGridImageSize,
-                EAspectRatioPreservedAndUnusedSpaceRemoved);
-
-        iHgGrid->ItemL(index).SetIcon(CGulIcon::NewL(bitmap, mask));
-        CleanupStack::Pop(mask);
-        CleanupStack::Pop(bitmap);
         }
 
 	if (item.IsDrmProtected())
@@ -699,7 +676,32 @@
 		iHgGrid->ItemL(index).SetFlags(CHgItem::EHgItemFlagsVideo);
 		}
 	}
-   
+
+// ----------------------------------------------------------------------------
+// SetIconL
+// ----------------------------------------------------------------------------
+//  
+void CGlxGridViewContainer::SetIconL(TInt aItemIndex, TInt aBitmapId,
+        TInt aMaskId)
+    {
+    TRACER("CGlxGridViewContainer::SetIconL()");
+    CFbsBitmap* bitmap = NULL;
+    CFbsBitmap* mask = NULL;
+    TSize setSize = CHgGrid::PreferredImageSize();
+    AknsUtils::CreateIconLC(AknsUtils::SkinInstance(), KAknsIIDNone, bitmap,
+            mask, iIconsFileName, aBitmapId, aMaskId);
+    __ASSERT_DEBUG(bitmap, Panic(EGlxPanicNullPointer));
+    __ASSERT_DEBUG(mask, Panic(EGlxPanicNullPointer));
+
+    AknIconUtils::SetSize(bitmap, setSize,
+            EAspectRatioPreservedAndUnusedSpaceRemoved);
+    AknIconUtils::SetSize(mask, setSize,
+            EAspectRatioPreservedAndUnusedSpaceRemoved);
+
+    iHgGrid->ItemL(aItemIndex).SetIcon(CGulIcon::NewL(bitmap, mask));
+    CleanupStack::Pop(mask);
+    CleanupStack::Pop(bitmap);
+    }   
         
 // -----------------------------------------------------------------------------
 // MopSupplyObject
--- a/photosgallery/viewframework/views/gridview/src/glxgridviewimp.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/views/gridview/src/glxgridviewimp.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -121,7 +121,7 @@
 // ---------------------------------------------------------------------------
 //
 void CGlxGridViewImp::DoMLViewActivateL(
-		const TVwsViewId& aPrevViewId, 
+		const TVwsViewId& /*aPrevViewId*/, 
 		TUid /* aCustomMessageId */,
 		const TDesC8& aCustomMessage)
 	{
--- a/photosgallery/viewframework/views/gridview/src/glxgridviewmlobserver.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/views/gridview/src/glxgridviewmlobserver.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -34,7 +34,6 @@
 #include <glxthumbnailattributeinfo.h>                  // KGlxMediaIdThumbnail
 #include <glxdrmutility.h>                              // DRM utility class to provide DRM-related functionality
 #include <mpxmediadrmdefs.h>                            // KMPXMediaDrmProtected
-#include <glxcollectionplugindownloads.hrh>
 #include <glxgridviewdata.rsg>                          // Gridview resource
 #include <glxgeneraluiutilities.h>
 
@@ -258,26 +257,18 @@
             GLX_LOG_INFO1("### CGlxGridViewMLObserver::HandleAttributesAvailableL"
                     " speedTn-Index is %d",aItemIndex);
             }
-        else if ( KErrNone != tnError && KErrNotSupported != tnError &&
-                            KErrArgument != tnError )
+        else if (item.Category() == EMPXVideo && KErrNone != tnError)
             {
-            CFbsBitmap* bitmap = NULL;
-            CFbsBitmap* mask = NULL;
-            AknsUtils::CreateIconLC(AknsUtils::SkinInstance(), KAknsIIDNone,
-                    bitmap, mask, iIconsFileName,
-                    EMbmGlxiconsQgn_prop_image_corrupted,
-                    EMbmGlxiconsQgn_prop_image_corrupted_mask);
-            __ASSERT_DEBUG(bitmap, Panic(EGlxPanicNullPointer));
-            __ASSERT_DEBUG(mask, Panic(EGlxPanicNullPointer));
-            
-            AknIconUtils::SetSize(bitmap, setSize,
-                    EAspectRatioPreservedAndUnusedSpaceRemoved);
-            AknIconUtils::SetSize(mask, setSize,
-                    EAspectRatioPreservedAndUnusedSpaceRemoved);
-
-            iHgGrid->ItemL(aItemIndex).SetIcon(CGulIcon::NewL(bitmap, mask));
-            CleanupStack::Pop(mask);
-            CleanupStack::Pop(bitmap);
+            SetIconL(aItemIndex, EMbmGlxiconsQgn_prop_image_notcreated,
+                    EMbmGlxiconsQgn_prop_image_notcreated_mask,
+					CHgItem::EHgItemFlagsVideo);
+            }
+        else if (KErrNone != tnError && KErrNotSupported != tnError
+                && KErrArgument != tnError)
+            {
+            SetIconL(aItemIndex, EMbmGlxiconsQgn_prop_image_corrupted,
+                    EMbmGlxiconsQgn_prop_image_corrupted_mask,
+					CHgItem::EHgItemFlagsNone);
             }
         }
     
@@ -285,7 +276,7 @@
     UpdateItemsL(aItemIndex,aAttributes);
     
     //Now refresh the screen based on the attributes available index
-    RefreshScreen(aItemIndex,aAttributes);
+    RefreshScreenL(aItemIndex,aAttributes);
     }
     
 // ----------------------------------------------------------------------------
@@ -348,7 +339,6 @@
     TInt bitmapId  = EMbmGlxiconsQgn_prop_image_corrupted;
     TInt maskId = EMbmGlxiconsQgn_prop_image_corrupted_mask;	
     TInt flags     = CHgItem::EHgItemFlagsNone ;
-    TSize setSize = CHgGrid::PreferredImageSize();
     
     for ( TInt i = 0; i < iMediaList.Count(); i++ )
         {
@@ -375,32 +365,56 @@
                         }
                     break;
                 default:
-                    bitmapId  = EMbmGlxiconsQgn_prop_image_corrupted;
-					maskId = EMbmGlxiconsQgn_prop_image_corrupted_mask;
-                    flags     = CHgItem::EHgItemFlagsNone ;
+                    {
+                    if (item.Category() == EMPXVideo)
+                        {
+                        bitmapId = EMbmGlxiconsQgn_prop_image_notcreated;
+                        maskId = EMbmGlxiconsQgn_prop_image_notcreated_mask;
+						flags = CHgItem::EHgItemFlagsVideo;
+                        }
+                    else
+                        {
+                        bitmapId = EMbmGlxiconsQgn_prop_image_corrupted;
+                        maskId = EMbmGlxiconsQgn_prop_image_corrupted_mask;
+                    	flags = CHgItem::EHgItemFlagsNone;
+					    }
+
+                    }
                     break;  
                 }
             
-            CFbsBitmap* bitmap = NULL;
-            CFbsBitmap* mask = NULL;
-            AknsUtils::CreateIconLC(AknsUtils::SkinInstance(), KAknsIIDNone,
-                    bitmap, mask, iIconsFileName, bitmapId, maskId);
-            __ASSERT_DEBUG(bitmap, Panic(EGlxPanicNullPointer));
-            __ASSERT_DEBUG(mask, Panic(EGlxPanicNullPointer));
-
-            AknIconUtils::SetSize(bitmap, setSize,
-                    EAspectRatioPreservedAndUnusedSpaceRemoved);
-            AknIconUtils::SetSize(mask, setSize,
-                    EAspectRatioPreservedAndUnusedSpaceRemoved);
-
-            iHgGrid->ItemL(i).SetIcon(CGulIcon::NewL(bitmap, mask), flags);
-            CleanupStack::Pop(mask); 
-            CleanupStack::Pop(bitmap); 
+            SetIconL(i, bitmapId, maskId, flags);
             }
         }
     iHgGrid->RefreshScreen(iHgGrid->FirstIndexOnScreen());    
     }
-    
+
+// ----------------------------------------------------------------------------
+// SetIconL
+// ----------------------------------------------------------------------------
+//  
+void CGlxGridViewMLObserver::SetIconL(TInt aItemIndex, TInt aBitmapId,
+        TInt aMaskId, TInt aFlags)
+    {
+    TRACER("CGlxGridViewMLObserver::SetIconL()");
+    CFbsBitmap* bitmap = NULL;
+    CFbsBitmap* mask = NULL;
+    TSize setSize = CHgGrid::PreferredImageSize();
+    AknsUtils::CreateIconLC(AknsUtils::SkinInstance(), KAknsIIDNone, bitmap,
+            mask, iIconsFileName, aBitmapId, aMaskId);
+    __ASSERT_DEBUG(bitmap, Panic(EGlxPanicNullPointer));
+    __ASSERT_DEBUG(mask, Panic(EGlxPanicNullPointer));
+
+    AknIconUtils::SetSize(bitmap, setSize,
+            EAspectRatioPreservedAndUnusedSpaceRemoved);
+    AknIconUtils::SetSize(mask, setSize,
+            EAspectRatioPreservedAndUnusedSpaceRemoved);
+
+    iHgGrid->ItemL(aItemIndex).SetIcon(CGulIcon::NewL(bitmap, mask), aFlags);
+    CleanupStack::Pop(mask);
+    CleanupStack::Pop(bitmap);
+    }
+
 // ----------------------------------------------------------------------------
 // HandleCommandCompleteL
 // ----------------------------------------------------------------------------
@@ -502,14 +516,14 @@
 
 
 // ----------------------------------------------------------------------------
-// RefreshScreen
+// RefreshScreenL
 // ----------------------------------------------------------------------------
 // 
-void CGlxGridViewMLObserver::RefreshScreen(TInt aItemIndex,
+void CGlxGridViewMLObserver::RefreshScreenL(TInt aItemIndex,
                                       const RArray<TMPXAttribute>& aAttributes)
     {
-    TRACER("CGlxGridViewMLObserver::RefreshScreen()");
-    GLX_DEBUG2("CGlxGridViewMLObserver::RefreshScreen(%d)", aItemIndex);
+    TRACER("CGlxGridViewMLObserver::RefreshScreenL()");
+    GLX_DEBUG2("CGlxGridViewMLObserver::RefreshScreenL(%d)", aItemIndex);
     TInt mediaCount = iMediaList.Count();
     TInt firstIndex = iHgGrid->FirstIndexOnScreen();
     firstIndex = (firstIndex<0 ? 0 : firstIndex);
--- a/photosgallery/viewframework/views/listview/inc/glxlistviewimp.h	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/views/listview/inc/glxlistviewimp.h	Wed Jun 09 09:41:51 2010 +0300
@@ -49,7 +49,6 @@
 enum
     {
     EGlxListItemAll = 0,
-    EGlxListItemMonth,
     EGlxListItemAlbum,
     EGlxLIstItemTag    
     };
@@ -269,15 +268,11 @@
     /// The animation being applied to the view
     MGlxAnimation* iViewAnimation;
     
-    TBool iPopulateListTNs;
-	
     // Flag to check if all the items in list view need to be refreshed
     TBool iIsRefreshNeeded;
 
     TBool iBackwardNavigation;
 
-    TInt iStartIndex;
-
     TInt iLastFocusedIndex;
     
     TBool iNextViewActivationEnabled;
--- a/photosgallery/viewframework/views/listview/inc/glxpreviewthumbnailbinding.h	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/views/listview/inc/glxpreviewthumbnailbinding.h	Wed Jun 09 09:41:51 2010 +0300
@@ -88,8 +88,8 @@
      */
       void ScaleBitmapToListSizeL(CFbsBitmap* aSrcBitmap, CFbsBitmap* aDestBitmap);
 	
-      void HandleItemChangedL(const CMPXCollectionPath& aPath,TBool aPopulateListTNs, 
-									  TBool aIsRefreshNeeded, TBool aBackwardNavigation);
+      void HandleItemChangedL(const CMPXCollectionPath& aPath, 
+              TBool aIsRefreshNeeded, TBool aBackwardNavigation);
       void StartTimer();
       void StopTimer();
       
@@ -138,10 +138,6 @@
 	// flag that says whether timer has expired
 	TBool iTimerTicked;
 	
-	//flag will be true, when initially the first thumbnails for all the 
-	//items in the list are populated.
-	TBool iPopulateListTNs;
-	
 	TBool iIsRefreshNeeded;
     
     TSize iGridIconSize;
--- a/photosgallery/viewframework/views/listview/src/glxlistviewimp.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/views/listview/src/glxlistviewimp.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -46,7 +46,6 @@
 #include <glxthumbnailattributeinfo.h>
 #include <glxcollectionpluginall.hrh>
 #include <glxcollectionpluginalbums.hrh>
-#include <glxcollectionpluginmonths.hrh>
 #include <glxcollectionplugintype.hrh>
 #include <glxnavigationalstate.h>
 #include <glxfiltergeneraldefs.h>
@@ -58,8 +57,6 @@
 const TInt KListDataWindowSize(8); // Visible page
 const TInt KListNonVisibleDataWindowSize(32); // Visible page + 3 pages
 const TInt KNoOfPages(4);
-const TInt KGlxCollectionRootLevel = 1;
-
 
 // ======== MEMBER FUNCTIONS ========
 
@@ -130,10 +127,9 @@
         {
         toolbar->DisableToolbarL(ETrue);  
         }
-    CGlxUiUtility* uiUtility = CGlxUiUtility::UtilityL();
-    CleanupClosePushL(*uiUtility);
-    iGridIconSize = uiUtility->GetGridIconSize();
-    CleanupStack::PopAndDestroy(uiUtility);     
+
+    iGridIconSize = iUiUtility->GetGridIconSize();
+
     //Register the view to recieve toolbar events. ViewBase handles the events    
     SetToolbarObserver(this);
     }
@@ -243,11 +239,8 @@
     iMediaList->AddContextL(iSubtitleAttributeContext, KGlxFetchContextPriorityNormal);
     if (iMediaList->IdSpaceId(0) != KGlxIdSpaceIdRoot)
         {
-        iOtherAttribsContext = new (ELeave) CGlxAttributeContext(
-                &iThumbnailIterator);
-        iOtherAttribsContext->AddAttributeL(KMPXMediaGeneralCount);
-
-        iNonVisibleThumbnailIterator.SetRangeOffsets(0, KListNonVisibleDataWindowSize);
+        iNonVisibleThumbnailIterator.SetRangeOffsets(KListDataWindowSize,
+                KListNonVisibleDataWindowSize);
         iNonVisibleSubtitleAttributeContext
                 = new (ELeave) CGlxAttributeContext(
                         &iNonVisibleThumbnailIterator);
@@ -255,27 +248,30 @@
                 KGlxMediaCollectionPluginSpecificSubTitle);
         iMediaList->AddContextL(iNonVisibleSubtitleAttributeContext,
                 KGlxFetchContextPriorityLow);
-        iNonVisibleOtherAttribsContext = new (ELeave) CGlxAttributeContext(
-                &iNonVisibleThumbnailIterator);
-        iNonVisibleOtherAttribsContext->AddAttributeL(KMPXMediaGeneralCount);
 
         CMPXCollectionPath* path = iMediaList->PathLC(
                 NGlxListDefs::EPathParent);
         if (path->Id(0) == KGlxCollectionPluginAlbumsImplementationUid)
             {
+            iOtherAttribsContext = new (ELeave) CGlxAttributeContext(
+                &iThumbnailIterator);
             iOtherAttribsContext->AddAttributeL(KGlxMediaGeneralSystemItem);
             iOtherAttribsContext->AddAttributeL(
                     KGlxMediaGeneralSlideshowableContent);
+            iMediaList->AddContextL(iOtherAttribsContext,
+                    KGlxFetchContextPriorityNormal);
 
+            iNonVisibleOtherAttribsContext = new (ELeave) CGlxAttributeContext(
+                &iNonVisibleThumbnailIterator);
             iNonVisibleOtherAttribsContext->AddAttributeL(
                     KGlxMediaGeneralSystemItem);
             iNonVisibleOtherAttribsContext->AddAttributeL(
                     KGlxMediaGeneralSlideshowableContent);
+            iMediaList->AddContextL(iNonVisibleOtherAttribsContext,
+                    KGlxFetchContextPriorityLow);
             }
         CleanupStack::PopAndDestroy(path);
 
-        iMediaList->AddContextL(iOtherAttribsContext,
-                KGlxFetchContextPriorityNormal);
         iThumbnailContext = new (ELeave) CGlxAttributeContext(
                 &iThumbnailIterator);
         TMPXAttribute tnAttr(KGlxMediaIdThumbnail,
@@ -287,8 +283,6 @@
         iMediaList->AddContextL(iThumbnailContext,
                 KGlxFetchContextPriorityNormal);
 
-        iMediaList->AddContextL(iNonVisibleOtherAttribsContext,
-                KGlxFetchContextPriorityLow);
         iNonVisibleThumbnailContext = new (ELeave) CGlxAttributeContext(
                 &iNonVisibleThumbnailIterator);
         iNonVisibleThumbnailContext->SetDefaultSpec(iGridIconSize.iWidth,
@@ -310,19 +304,7 @@
 
     iPreviewTNBinding = CGlxPreviewThumbnailBinding::NewL(*this);
     CreateListL();
-    if (iMediaList->IdSpaceId(0) == KGlxIdSpaceIdRoot && iPreviewTNBinding
-			&& iBackwardNavigation && iMediaList->FocusIndex() == 0)
-		{
-		GLX_LOG_INFO("CGlxListViewImp::DoMLViewActivateL() - HandleItemChangedL()");
-		iPopulateListTNs = ETrue;
-		CMPXCollectionPath* path = iMediaList->PathLC(
-				NGlxListDefs::EPathFocusOrSelection);
-		iPreviewTNBinding->HandleItemChangedL(*path, iPopulateListTNs,
-				iIsRefreshNeeded, iBackwardNavigation);
-		CleanupStack::PopAndDestroy(path);
-		}
     iProgressIndicator = CGlxProgressIndicator::NewL(*this);
-    iProgressIndicator->ShowProgressbarL();
     iMMCNotifier = CGlxMMCNotifier::NewL(*this);
     }
 
@@ -547,21 +529,21 @@
         const TGlxMedia& item = iMediaList->Item(i);
         iList->ItemL(i).SetTitleL(item.Title());
         iList->ItemL(i).SetTextL(item.SubTitle());
-        UpdatePreviewL(i);
+        if(iMediaList->IdSpaceId(0) != KGlxIdSpaceIdRoot)
+            {
+            UpdatePreviewL(i);
+            }
         }
     
-    if(iMediaList->IdSpaceId(0) == KGlxIdSpaceIdRoot)
+    if (iMediaList->IdSpaceId(0) == KGlxIdSpaceIdRoot && iBackwardNavigation)
         {
-        if ( visIndex != iLastFocusedIndex && !iPopulateListTNs)
-            {
-            GLX_LOG_INFO1("CGlxListViewImp::RequestL - SetFocusL()"
-                    " iPopulateListTNs(%d)", iPopulateListTNs);      
-            GLX_LOG_INFO1("CGlxListViewImp::RequestL - SetFocusL()"
-                    " visIndex(%d)", visIndex);
-            iPopulateListTNs = ETrue;
-            iStartIndex = KErrNotFound;
-            iMediaList->SetFocusL(NGlxListDefs::EAbsolute, visIndex);
-            }
+        iMediaList->SetFocusL(NGlxListDefs::EAbsolute, 0);
+        CMPXCollectionPath* path = iMediaList->PathLC(
+                NGlxListDefs::EPathFocusOrSelection);
+        GLX_LOG_INFO("CGlxListViewImp::RequestL() - HandleItemChangedL()");
+        iPreviewTNBinding->HandleItemChangedL(*path, iIsRefreshNeeded,
+                iBackwardNavigation);
+        CleanupStack::PopAndDestroy(path);
         }
     else
         {
@@ -569,27 +551,24 @@
         }
     }
 
-
 void CGlxListViewImp::Release(TInt /*aBufferStart*/, TInt /*aBufferEnd*/)
     {
     TRACER("CGlxListViewImp::Release");
     }
 
-void CGlxListViewImp::HandleSelectL( TInt aIndex )
+void CGlxListViewImp::HandleSelectL(TInt aIndex)
     {
     TRACER("CGlxListViewImp::HandleSelectL");
-    if(0 <= aIndex && aIndex < iMediaList->Count())
-    	{
-    	iPopulateListTNs = EFalse;
-    	iMediaList->SetFocusL(NGlxListDefs::EAbsolute, aIndex);			
-    	}
+    if (0 <= aIndex && aIndex < iMediaList->Count())
+        {
+        iMediaList->SetFocusL(NGlxListDefs::EAbsolute, aIndex);
+        }
     }
 
 void CGlxListViewImp::HandleOpenL( TInt aIndex )
     {
     TRACER("CGlxListViewImp::HandleOpenL");
     
-#ifndef __WINSCW__ 
     GLX_LOG_INFO1("CGlxListViewImp RProperty::Get leftVariable %d",(iUiUtility->GetItemsLeftCount()));
 
     if (iUiUtility->GetItemsLeftCount())
@@ -607,7 +586,7 @@
         iSchedulerWait = new (ELeave) CActiveSchedulerWait();
         iSchedulerWait->Start();
         }
-#endif
+
     if (iNextViewActivationEnabled && (aIndex >= 0 && aIndex
             < iMediaList->Count()) && (iUiUtility->GetItemsLeftCount() == 0))
         {
@@ -646,111 +625,28 @@
     {
     TRACER("CGlxListViewImp::PreviewTNReadyL");
 
-    if (!iPopulateListTNs)
+    iPreviewTNBinding->StopTimer();
+
+    if (iMediaList->FocusIndex() != EGlxListItemAll || iMediaList->IdSpaceId(
+            0) != KGlxIdSpaceIdRoot)
         {
         GLX_LOG_INFO("CGlxListViewImp::PreviewTNReadyL()- Ignore!");
         return;
         }
-    iPreviewTNBinding->StopTimer();
 
-	TInt focusIndex = iMediaList->FocusIndex();
-    TInt mediaCount = iMediaList->Count();
-    GLX_LOG_INFO1("CGlxListViewImp::PreviewTNReadyL() focusIndex(%d)",
-            focusIndex);      
-    
-    TGlxIdSpaceId id = iMediaList->IdSpaceId(0);        
     if (aBitmap)
-	    {
-        iList->ItemL(focusIndex).SetIcon(CGulIcon::NewL(aBitmap));
-        if (id == KGlxIdSpaceIdRoot && focusIndex == EGlxListItemAll)
-            {
-            CFbsBitmap* bitmap = new (ELeave) CFbsBitmap;
-            bitmap->Duplicate(aBitmap->Handle());
-            iList->ItemL(EGlxListItemMonth).SetIcon(CGulIcon::NewL(bitmap));
-            }
-        else if (iBackwardNavigation && id == KGlxIdSpaceIdRoot && focusIndex
-                == EGlxListItemMonth)
-            {
-            CFbsBitmap* bitmap = new (ELeave) CFbsBitmap;
-            bitmap->Duplicate(aBitmap->Handle());
-            iList->ItemL(EGlxListItemAll).SetIcon(CGulIcon::NewL(bitmap));
-            }
+        {
+        iList->ItemL(EGlxListItemAll).SetIcon(CGulIcon::NewL(aBitmap));
         }
     else
-    	{
-	    // In main list view, default thumbnails will be set according 
-	    // to the list items.
-    	//Displays default thumbnail if aBitmap is NULL 
-        SetDefaultThumbnailL(focusIndex);
-        if(id == KGlxIdSpaceIdRoot && focusIndex == EGlxListItemAll)
-            {
-            SetDefaultThumbnailL(EGlxListItemMonth);
-            }
-    	}
-    
-    GLX_DEBUG2("CGlxListViewImp::PreviewTNReadyL()"
-            " RefreshList(%d)", focusIndex);
-    RefreshList(focusIndex);
-	
-	if (iPopulateListTNs)
-		{
-		if(iStartIndex == KErrNotFound)
-			{
-			iStartIndex = focusIndex;
-			}
-		
-		TInt count = iMediaList->Count();
-		if(count)
-		    {
-            TInt focus = (focusIndex + 1) % count;
-            if (!iBackwardNavigation && id == KGlxIdSpaceIdRoot && focus
-                    == EGlxListItemMonth)
-                {
-                focus += 1;
-                }
-            if (focus != iStartIndex)
-                {
-                iMediaList->SetFocusL(NGlxListDefs::EAbsolute, focus);
-                }
-            else
-                {
-                iPopulateListTNs = EFalse;	
-                iIsRefreshNeeded = EFalse;
-                
-                // iStartIndex holds the focus index of the item.
-                // If the focus is not on 0th index and if USB is Connected/Disconnected
-                // or some files are deleted from file manager, 
-                // Once the updation of all items is done, the focus should be set to
-                // previous focus index(not to 0th index). 
-                               
-                iMediaList->SetFocusL(NGlxListDefs::EAbsolute, 
-                		iStartIndex);
-                iList->SetSelectedIndex(iStartIndex);
-                iList->RefreshScreen(iStartIndex);
-                
-                iStartIndex = KErrNotFound;
-                
-                /* The medialist doesn't give the callback for focuschanged if the count is one.
-                 * So we have to explicitly start the timer of 2 seconds after populating the list 
-                 * TN's ie., after gettting the first thumbnail.
-                 * The callback is not given because the setfocus index is same as the focused index
-                 * in medialist. 
-                 */
-                if(count==1 )
-                    {       
-                    if(id == KGlxIdSpaceIdRoot )
-                    	{
-                        CMPXCollectionPath* path = iMediaList->PathLC( 
-                                NGlxListDefs::EPathFocusOrSelection );
-                        GLX_LOG_INFO("CGlxListViewImp::PreviewTNReadyL() - HandleItemChangedL()");                    
-                        iPreviewTNBinding->HandleItemChangedL(*path, 
-                                iPopulateListTNs, iIsRefreshNeeded, iBackwardNavigation);
-                        CleanupStack::PopAndDestroy( path );
-                    	}
-                    }
-                }
-			}
-		}
+        {
+        // In main list view, default thumbnails will be set according 
+        // to the list items.
+        //Displays default thumbnail if aBitmap is NULL 
+        SetDefaultThumbnailL(EGlxListItemAll);
+        }
+
+    iList->RefreshScreen(EGlxListItemAll);
     }
     
 // ----------------------------------------------------------------------------
@@ -761,7 +657,6 @@
     {
     TRACER("CGlxListViewImp::CreateListL");
     
-	iStartIndex = KErrNotFound;
 	TInt mediaCount = iMediaList->Count();
     GLX_DEBUG2("CGlxListViewImp::CreateListL() mediaCount=%d", mediaCount);
 	
@@ -781,11 +676,6 @@
             bitmapId = EMbmGlxiconsQgn_prop_photo_album_large;
             maskId = EMbmGlxiconsQgn_prop_photo_album_large_mask;
             }
-        else if (path->Id() == KGlxCollectionPluginMonthsImplementationUid)
-            {
-            bitmapId = EMbmGlxiconsQgn_prop_photo_calendar_large;
-            maskId = EMbmGlxiconsQgn_prop_photo_calendar_large_mask;
-            }
         else
             {
             bitmapId = EMbmGlxiconsQgn_prop_image_notcreated;
@@ -893,7 +783,6 @@
         if(aStartIndex == aEndIndex )
             {
             iLastFocusedIndex = aStartIndex;
-            iPopulateListTNs = EFalse;
             iMediaList->SetFocusL(NGlxListDefs::EAbsolute, iLastFocusedIndex);			
             iList->SetSelectedIndex(iLastFocusedIndex); 
             iList->RefreshScreen(iLastFocusedIndex);
@@ -930,7 +819,7 @@
 // ----------------------------------------------------------------------------
 //	
 void CGlxListViewImp::HandleAttributesAvailableL( TInt aItemIndex, 
-	const RArray<TMPXAttribute>& aAttributes, MGlxMediaList* aList)
+	const RArray<TMPXAttribute>& aAttributes, MGlxMediaList* /*aList*/)
 	{
 	TRACER("CGlxListViewImp::HandleAttributesAvailableL");
 
@@ -964,44 +853,51 @@
 		
 		// If there is some modified in grid/fullscreen view,
 		// HandleAttributesAvailableL will get called. Here we are setting
-		// iIsRefreshNeeded flag to ETrue		
+		// iIsRefreshNeeded flag to ETrue to cleanup once!		
 		if (!iIsRefreshNeeded && iBackwardNavigation)
 			{
-			iIsRefreshNeeded = ETrue;
-			if(iMediaList->IdSpaceId(0) != KGlxIdSpaceIdRoot)
-				{
-				CleanUpL();
-				}
-			}
-		// Set iPopulateListTNs to ETrue and refresh all the items in
-		// list view if subtitle is updated
-		else if (iPreviewTNBinding && ((!iPopulateListTNs && aItemIndex
-                == aList->Count() - 1) || (iIsRefreshNeeded)))
+            if (iMediaList->IdSpaceId(0) != KGlxIdSpaceIdRoot)
+                {
+                iIsRefreshNeeded = ETrue;
+                CleanUpL();
+                }
+            }
+		// Refresh thumbnail, if subtitle is updated for the All collection
+		if (iMediaList->IdSpaceId(0) == KGlxIdSpaceIdRoot &&
+		        iPreviewTNBinding && aItemIndex == 0)
             {
-			iPopulateListTNs = ETrue;
-			iStartIndex = KErrNotFound;
+            if (iBackwardNavigation)
+                {
+                iIsRefreshNeeded = ETrue;
+                }
+            iMediaList->SetFocusL(NGlxListDefs::EAbsolute, 0);
 			CMPXCollectionPath* path = iMediaList->PathLC(
 					NGlxListDefs::EPathFocusOrSelection);
-			GLX_LOG_INFO("CGlxListViewImp::HandleAttributesAvailableL() - HandleItemChangedL()");		
-			iPreviewTNBinding->HandleItemChangedL(*path, iPopulateListTNs,
-					iIsRefreshNeeded, iBackwardNavigation);
+			GLX_LOG_INFO("CGlxListViewImp::HandleAttributesAvailableL() - HandleItemChangedL()");
+			iPreviewTNBinding->HandleItemChangedL(*path, iIsRefreshNeeded,
+                    iBackwardNavigation);
 			CleanupStack::PopAndDestroy(path);		            	
 			}
 		}
 
 	if (iMediaList->IdSpaceId(0) != KGlxIdSpaceIdRoot)
 		{
-		TMPXAttribute countAttrib(KMPXMediaGeneralCount);
-		TMPXAttribute thumbnailAttribute(KGlxMediaIdThumbnail,
-				GlxFullThumbnailAttributeId(ETrue, iGridIconSize.iWidth,
-						iGridIconSize.iHeight));
-		if ((KErrNotFound != aAttributes.Find(thumbnailAttribute, match))
-				|| (KErrNotFound != aAttributes.Find(countAttrib, match)))
-			{
-			iIsRefreshNeeded = EFalse;
-			UpdatePreviewL(aItemIndex);
-			}
-		}
+        TMPXAttribute countAttrib(KMPXMediaGeneralCount);
+        TMPXAttribute thumbnailAttribute(KGlxMediaIdThumbnail,
+                GlxFullThumbnailAttributeId(ETrue, iGridIconSize.iWidth,
+                        iGridIconSize.iHeight));
+        if (iIsRefreshNeeded && KErrNotFound != aAttributes.Find(
+                thumbnailAttribute, match))
+            {
+            iIsRefreshNeeded = EFalse;
+            }
+
+        if ((KErrNotFound != aAttributes.Find(thumbnailAttribute, match))
+                || (KErrNotFound != aAttributes.Find(countAttrib, match)))
+            {
+            UpdatePreviewL(aItemIndex);
+            }
+        }
 	}
 	
 // ----------------------------------------------------------------------------
@@ -1012,25 +908,6 @@
 	TFocusChangeType /*aType*/, TInt /*aNewIndex*/, TInt /*aOldIndex*/,
 	MGlxMediaList* /*aList*/ )
 	{
-	TRACER( "CGlxListViewImp::HandleFocusChangedL");	 
-	if (iPreviewTNBinding && iPopulateListTNs)
-		{
-		if(iMediaList->IdSpaceId(0) == KGlxIdSpaceIdRoot)
-			{
-	        CMPXCollectionPath* path = iMediaList->PathLC(
-	                NGlxListDefs::EPathFocusOrSelection);
-	        if (!iBackwardNavigation && path->Levels() == KGlxCollectionRootLevel
-	                && path->Id(0) == KGlxCollectionPluginMonthsImplementationUid)
-	            {
-	            CleanupStack::PopAndDestroy(path);
-	            return;
-	            }
-	        GLX_LOG_INFO("CGlxListViewImp::HandleFocusChangedL() - HandleItemChangedL()");        
-	        iPreviewTNBinding->HandleItemChangedL(*path, iPopulateListTNs,
-	                iIsRefreshNeeded, iBackwardNavigation);	                
-	        CleanupStack::PopAndDestroy(path);			
-			}
-        }
 	}
 
 // ----------------------------------------------------------------------------
@@ -1166,12 +1043,6 @@
                 maskId = EMbmGlxiconsQgn_prop_photo_all_large_mask;
                 }
                 break;
-            case EGlxListItemMonth:
-                {
-                bitmapId = EMbmGlxiconsQgn_prop_photo_calendar_large;
-                maskId = EMbmGlxiconsQgn_prop_photo_calendar_large_mask;
-                }
-                break;
             case EGlxListItemAlbum:
                 {
                 bitmapId = EMbmGlxiconsQgn_prop_photo_album_large;
@@ -1199,11 +1070,6 @@
             bitmapId = EMbmGlxiconsQgn_prop_photo_album_large;
             maskId = EMbmGlxiconsQgn_prop_photo_album_large_mask;
             }
-        else if(path->Id(0) == KGlxCollectionPluginMonthsImplementationUid)
-            {
-            bitmapId = EMbmGlxiconsQgn_prop_photo_calendar_large;
-            maskId = EMbmGlxiconsQgn_prop_photo_calendar_large_mask;
-            }
         else
             {
             bitmapId = EMbmGlxiconsQgn_prop_image_notcreated;
@@ -1253,7 +1119,6 @@
     TRACER("CGlxListViewImp::HandleMMCInsertionL()");
     iMMCState = ETrue;
     NavigateToMainListL();
-    
     }
 
 // ---------------------------------------------------------------------------
@@ -1282,6 +1147,19 @@
         iMMCState = EFalse;
         NavigateToMainListL();
         }
+
+    if (iProgressIndicator)
+        {
+        iProgressIndicator->ControlTNDaemon(aForeground);
+        if (aForeground)
+            {
+            iProgressIndicator->ShowProgressbarL();
+            }
+        else
+            {
+            iProgressIndicator->DismissProgressDialog();
+            }
+        }
     }
 
 // ---------------------------------------------------------------------------
@@ -1293,6 +1171,7 @@
     TRACER("CGlxListViewImp::NavigateToMainListL()");
     ProcessCommandL(EAknSoftkeyClose);
     }
+
 // ----------------------------------------------------------------------------
 // CleanUpL
 // ----------------------------------------------------------------------------
--- a/photosgallery/viewframework/views/listview/src/glxpreviewthumbnailbinding.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/views/listview/src/glxpreviewthumbnailbinding.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -21,7 +21,6 @@
 #include <glxfilterfactory.h>                         // For TGlxFilterFactory
 #include <glxthumbnailattributeinfo.h>
 #include <glxuiutility.h>                               // For UiUtility instance
-#include <glxcollectionpluginmonths.hrh>
 #include <glxtracer.h>
 #include <glxlog.h>
 #include <glxerrormanager.h>             // For CGlxErrormanager
@@ -209,13 +208,12 @@
 // ----------------------------------------------------------------------------
 //    
 void CGlxPreviewThumbnailBinding::HandleItemChangedL(const CMPXCollectionPath& aPath,
-        TBool aPopulateListTNs, TBool  aIsRefreshNeeded, TBool aBackwardNavigation)
+        TBool  aIsRefreshNeeded, TBool aBackwardNavigation)
     {
     TRACER("CGlxPreviewThumbnailBinding::HandleItemChangedL");
     GLX_LOG_INFO("CGlxPreviewThumbnailBinding::HandleItemChangedL()");
     
     iTimerTicked = EFalse;
-    iPopulateListTNs = aPopulateListTNs;
     iIsRefreshNeeded = aIsRefreshNeeded;
 
     // remove and close old medialist   
@@ -257,12 +255,9 @@
         iTimer->Cancel();
         }
         
-    if (iPopulateListTNs)
-        {
-        iTimer->Start(KThumbnailsTimeTimeDelay, KThumbnailsTimeTimeDelay,
-                TCallBack(IsTimeL, this));
-        }
-     }
+    iTimer->Start(KThumbnailsTimeTimeDelay, KThumbnailsTimeTimeDelay,
+            TCallBack(IsTimeL, this));
+    }
 
 // ----------------------------------------------------------------------------
 // StopTimer - Stop the timer
@@ -324,13 +319,7 @@
         if (value)
 	        {
 	        GLX_LOG_INFO("CGlxPreviewThumbnailBinding::HandleAttributesAvailableL()");
-            // sometimes we get HandleAttributesAvailableL callback after some delay
-            // when we do cache cleanup. 
-            if(!iPopulateListTNs)
-            	{
-            	iPopulateListTNs = ETrue;
-            	StartTimer();
-            	} 
+           	StartTimer();
             }
         }
     }
@@ -418,7 +407,7 @@
 
 	// Do cache cleanup. If iIsRefreshNeeded is set,
 	// then clean up the item at 0th index 
-	if (iPopulateListTNs && iIsRefreshNeeded)
+	if (iIsRefreshNeeded)
 		{
 		if (iMediaList && iMediaList->Count() > 0)
 			{
--- a/photosgallery/viewframework/views/viewbase/src/glxmedialistviewbase.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/views/viewbase/src/glxmedialistviewbase.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -22,6 +22,7 @@
 
 #include <mpxcollectionutility.h>
 #include <glxcollectionpluginimageviewer.hrh>
+#include <glxcollectionpluginalbums.hrh>
 #include <glxcommandhandler.h>
 #include <glxassert.h>
 #include <glxgallery.hrh>
@@ -59,26 +60,24 @@
     iEnableMidddleSoftkey = aEnableMiddleSoftkey; 
 
     iSelectionIterator.SetRange(KMaxTInt);
-    iPreloadContextForCommandHandlers  = new (ELeave) CGlxAttributeContext(&iSelectionIterator);
-    
-    if(aTitle.Length() > 0)
+
+    if (aTitle.Length() > 0)
         {
         iFixedTitle = aTitle.AllocL();
         }
-    
-    
-    if(iUiUtility->IsPenSupported())
+
+    if (iUiUtility->IsPenSupported())
         {
         // Responsible for controlling the ui states of toolbar
         // Create ToolbarController only for touch supported devices.
-           iToolbarControl = CGlxToolbarController::NewL();
+        iToolbarControl = CGlxToolbarController::NewL();
         }
     else
         {
         // Responsible for controlling the middle softkey if enabled.
         // Create Middle Softkey Controller only for non-touch devices
-            iCbaControl = CGlxMSKController::NewL();
-        }   
+        iCbaControl = CGlxMSKController::NewL();
+        }
     }
 
 // -----------------------------------------------------------------------------
@@ -96,7 +95,10 @@
 
     delete iFixedTitle;
     delete iTitleFetcher;
-    delete iPreloadContextForCommandHandlers;
+    if (iPreloadContextForCommandHandlers)
+        {
+        delete iPreloadContextForCommandHandlers;
+        }
         
     if( iCbaControl )
         {
@@ -161,8 +163,24 @@
     
     if (!iMediaList && iMediaListFactory)
         {
-        iMediaList = &iMediaListFactory->CreateMediaListL(*iCollectionUtility);
-    	iMediaList->AddContextL(iPreloadContextForCommandHandlers, 0);
+        iMediaList
+                = &iMediaListFactory->CreateMediaListL(*iCollectionUtility);
+
+        if ((navigationalState->Id() != TMPXItemId(
+                KGlxCollectionPluginAlbumsImplementationUid))
+                && (navigationalState->Id() != TMPXItemId(
+                        KGlxCollectionPluginAlbumsImplementationUid)))
+            {
+            iPreloadContextForCommandHandlers
+                    = new (ELeave) CGlxAttributeContext(&iSelectionIterator);
+            TInt commandHandlerCount = iCommandHandlerList.Count();
+            for (TInt i = 0; i < commandHandlerCount; i++)
+                {
+                DoPrepareCommandHandlerL(iCommandHandlerList[i]);
+                }
+            
+            iMediaList->AddContextL(iPreloadContextForCommandHandlers, 0);
+            }
         }
     __ASSERT_ALWAYS(iMediaList, Panic(EGlxPanicNullMediaList));
 
@@ -302,11 +320,15 @@
 		AddAttributesToContextL(*attributeContext, iCommandHandlerList[i], ETrue, aFilterUsingCommandId, aCommandId);
 		}
 	
+	if( EAknSoftkeyBack == aCommandId || attributeContext->AttributeCount())
+	    {
+        // Check if media attributes are already fetched.
+        // If media item is NULL, Cancel the previous pending request
+        MediaList().CancelPreviousRequests();
+        }
+	
 	if (attributeContext->AttributeCount())
 		{
-		// Check if media attributes are already fetched.
-		// If media item is NULL, Cancel the previous pending request
-		MediaList().CancelPreviousRequests();
 				
 	    MediaList().AddContextL(attributeContext, KGlxFetchContextPriorityCommandHandlerOpening );
 	    
@@ -352,9 +374,12 @@
 EXPORT_C void CGlxMediaListViewBase::DoPrepareCommandHandlerL(
 											CGlxCommandHandler* aCommandHandler)
 	{
-	AddAttributesToContextL(*iPreloadContextForCommandHandlers, 
-			                                            aCommandHandler, EFalse, EFalse);
-	}
+    if (iPreloadContextForCommandHandlers)
+        {
+        AddAttributesToContextL(*iPreloadContextForCommandHandlers,
+                aCommandHandler, EFalse, EFalse);
+        }
+    }
 	
 // -----------------------------------------------------------------------------
 // CGlxMediaListViewBase::CloseMediaList
@@ -364,7 +389,10 @@
 	{
     if (iMediaList)
         {
-        iMediaList->RemoveContext(iPreloadContextForCommandHandlers);
+        if (iPreloadContextForCommandHandlers)
+            {
+            iMediaList->RemoveContext(iPreloadContextForCommandHandlers);
+            }
         iMediaList->Close();
         iMediaList = NULL;
         }
--- a/photosgallery/viewframework/views/viewbase/src/glxmskcontroller.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/views/viewbase/src/glxmskcontroller.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -291,13 +291,6 @@
 			            }
 	                break;
                     }
-                case EMPXMonth:
-                    {
-                    iCba->SetCommandL(CEikButtonGroupContainer::EMiddleSoftkeyPosition,
-                            EAknCmdOpen, textopen );
-                    iCba->DrawNow();
-                    break;
-                    }
                 case EMPXAlbum:
                     {
                     iCba->SetCommandL(CEikButtonGroupContainer::EMiddleSoftkeyPosition,
--- a/photosgallery/viewframework/views/zoomview/inc/glxzoommathsengine.h	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/views/zoomview/inc/glxzoommathsengine.h	Wed Jun 09 09:41:51 2010 +0300
@@ -139,7 +139,7 @@
      *  We ignore aZoommode if we have a aRelativeZoomFactor.
      *  
      */          
-    TInt NewZoomRatio( 
+    TReal NewZoomRatio( 
             TInt aExpectedZoomRatio,
             TInt aRelativeZoomFactor,
             TZoomMode aZoomMode,
--- a/photosgallery/viewframework/views/zoomview/src/glxzoomeventhandler.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/views/zoomview/src/glxzoomeventhandler.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -51,6 +51,10 @@
 
 const TInt KGlxPanInertiaFrameInmS      = 20000     ;
 
+//Zoom Factor to keep the relative Zoom Ratio 
+//same while changing orientation.
+const TInt KGlxNeutralZoomFactor = 100;
+
 using namespace GestureHelper;
 
 // ============================ CGlxZoomPanEventHandler===============================
@@ -842,8 +846,9 @@
     TRACER("CGlxZoomPanEventHandler::OrientationChanged ");
     
     iMathsEngine.OrientationChanged(aNewScreenRect);
-    iMinZoomRatio = iMathsEngine.MinimumZoomRatio(); 
-    Zoom(0, 0, iZoomMode) ;
+    iMinZoomRatio = iMathsEngine.MinimumZoomRatio();
+    //Keep the relative Zoom Ratio same while changing orientation
+    Zoom(0, KGlxNeutralZoomFactor, iZoomMode) ;
     }
 
 // -----------------------------------------------------------------------------
--- a/photosgallery/viewframework/views/zoomview/src/glxzoommathsengine.cpp	Tue May 25 12:42:31 2010 +0300
+++ b/photosgallery/viewframework/views/zoomview/src/glxzoommathsengine.cpp	Wed Jun 09 09:41:51 2010 +0300
@@ -213,20 +213,20 @@
     GLX_LOG_INFO2(" Zoom(): viewPortTopLeft  Before Zoom  = [%d,%d] ", TInt(viewPortTopLeft.iX),
             TInt(viewPortTopLeft.iY)  );
     
-    TInt oldZoomRatio = iZoomRatio ;  
-    TInt newZoomRatio = NewZoomRatio(aExpectedZoomRatio, aRelativeZoomFactor, aZoomMode, aThresholdReached);
+    TReal oldZoomRatio = iZoomRatio ;  
+    TReal newZoomRatio = NewZoomRatio(aExpectedZoomRatio, aRelativeZoomFactor, aZoomMode, aThresholdReached);
 
     // we have an offcenter focus for our zoom in certain cases ( e.g pinch operation) or a double tap at an offcenter point. 
     // In such a case the zoom happens around that point. So we need to translate (move) the 
-    // center in such a way that the relative position of the zoom facus does not change. 
+    // center in such a way that the relative position of the zoom focus does not change. 
     // centerTranslationfactor is the vector representation of that amount. 
-    if (NULL != apZoomFocus)
+    if ( (NULL != apZoomFocus) )
         {
-        centerTranslationfactor.iX = (((apZoomFocus->iX - halfScreenWidth) * newZoomRatio)/oldZoomRatio) + (halfScreenWidth - apZoomFocus->iX);         
-        centerTranslationfactor.iY = (((apZoomFocus->iY - halfScreenHeight) * newZoomRatio)/oldZoomRatio) + (halfScreenHeight - apZoomFocus->iY);
+        centerTranslationfactor.iX = (((apZoomFocus->iX - halfScreenWidth   ) * newZoomRatio)/oldZoomRatio) + (halfScreenWidth  - apZoomFocus->iX);         
+        centerTranslationfactor.iY = (((apZoomFocus->iY - halfScreenHeight  ) * newZoomRatio)/oldZoomRatio) + (halfScreenHeight - apZoomFocus->iY);
         }
 
-    GLX_LOG_INFO1(" Zoom: newZoomRatio = %d.   ", newZoomRatio );
+    GLX_LOG_INFO1(" Zoom: newZoomRatio = %x.   ", newZoomRatio );
     
     TSize imageDimension = TSize(iActualImageSize);
     imageDimension.iWidth =  (imageDimension.iWidth  * newZoomRatio)/100;
@@ -249,7 +249,6 @@
         iCenter.iX = (iCenter.iX * imageDimension.iWidth )/iImageVirtualSize.iWidth  ;
         iCenter.iY = (iCenter.iY * imageDimension.iHeight)/iImageVirtualSize.iHeight ;
 
-        
         //HEIGHT Calculation
         // TODO: Hive center corrections into an different function.
         // If the image might have become smaller than the screen DUE to or AFTER the above calculations
@@ -363,11 +362,9 @@
                 iCenter.iX =(imageDimension.iWidth/2);
                 }
             }
-
         viewPortTopLeft.iX = iCenter.iX - halfScreenWidth;
         viewPortTopLeft.iY = iCenter.iY - halfScreenHeight;
         iImageVirtualSize = imageDimension;
-        
         }
 
     // if centerTranslationfactor exists that means we have an off center zoom, then 
@@ -413,14 +410,14 @@
 // NewZoomRatio: Calculates the Zoom Ratio 
 //-------------------------------------------------------------------------------------
 //
-TInt TGlxZoomAndPanMathsEngine::NewZoomRatio( 
+TReal TGlxZoomAndPanMathsEngine::NewZoomRatio( 
         TInt aExpectedZoomRatio,
         TInt aRelativeZoomFactor,
         TZoomMode aZoomMode,
         TBool *aThresholdReached)  
     {
     TRACER("TGlxZoomAndPanMathsEngine::NewZoomRatio ");
-    GLX_LOG_INFO1("NewZoomRatio: Old Zoom Ratio = %d .   ",TInt(iZoomRatio)   );
+    GLX_LOG_INFO1("NewZoomRatio: Old Zoom Ratio = %x .   ",iZoomRatio   );
     GLX_LOG_INFO1("NewZoomRatio: Expected Zoom Ratio  = %d .   ",aExpectedZoomRatio    );
     GLX_LOG_INFO1("NewZoomRatio: Relative Zoom Factor = %d .   ",aRelativeZoomFactor   );
     
@@ -442,7 +439,6 @@
             {
             normalizedRelativeZoomFactor = KGlxMaxRelativeZoomPercent;
             }
-        
         iZoomRatio =  (iZoomRatio * normalizedRelativeZoomFactor)/100 ;
         }
     else
@@ -477,7 +473,7 @@
             }
         }
 
-    GLX_LOG_INFO1("NewZoomRatio: New Zoom Ratio = %d.   ",TInt(iZoomRatio)   );
+    GLX_LOG_INFO1("NewZoomRatio: New Zoom Ratio = %x.   ",iZoomRatio   );
     return iZoomRatio;
     }