engine/collectionframework/plugins/glxcollectionpluginalbums/src/glxcollectionpluginalbums.cpp
changeset 62 36d93b4dc635
parent 45 863223ea6961
equal deleted inserted replaced
58:383b67fbdb11 62:36d93b4dc635
    35 #include "glxcollectionpluginalbums.h"
    35 #include "glxcollectionpluginalbums.h"
    36 #include "glxcollectionpluginalbums.hrh"
    36 #include "glxcollectionpluginalbums.hrh"
    37 #include <glxmediageneraldefs.h>
    37 #include <glxmediageneraldefs.h>
    38 #include <glxmediacollectioninternaldefs.h>
    38 #include <glxmediacollectioninternaldefs.h>
    39 #include <glxcollectiongeneraldefs.h>
    39 #include <glxcollectiongeneraldefs.h>
       
    40 #include <hbtextresolversymbian.h>
    40 
    41 
    41 #include <glxpanic.h>
    42 #include <glxpanic.h>
    42 #include <mglxdatasource.h>
    43 #include <mglxdatasource.h>
    43 #include <glxrequest.h>
    44 #include <glxrequest.h>
    44 #include <glxidlistrequest.h>
    45 #include <glxidlistrequest.h>
   212                 	tempTitle = LoadLocalizedStringLC(KResourceFile, R_ALBUM_SUB_TITLE_MULTI);
   213                 	tempTitle = LoadLocalizedStringLC(KResourceFile, R_ALBUM_SUB_TITLE_MULTI);
   213                 	}
   214                 	}
   214             	}
   215             	}
   215             else
   216             else
   216             	{
   217             	{
   217             	if(0 == usageCount)
   218                 tempTitle = HbTextResolverSymbian::LoadLC(KAlbumContainer, usageCount);
   218             		{
       
   219                 	tempTitle = LoadLocalizedStringLC(KNoImages); 
       
   220          
   219          
   221                 	
   220                 	
   222                 	// Set the title in the response.
   221                 	// Set the title in the response.
   223             		aResponse->SetTextValueL(attr, *tempTitle);  
   222             		aResponse->SetTextValueL(attr, *tempTitle);  
   224             		CleanupStack::PopAndDestroy(tempTitle);
   223             		CleanupStack::PopAndDestroy(tempTitle);
   225             		continue;                	
   224             		continue;                	
   226             		}            	
       
   227             	else if (1 == usageCount)
       
   228                 	{
       
   229                 	tempTitle = LoadLocalizedStringLC(KResourceFile, R_ALBUM_ITEM_SUB_TITLE_SINGLE);
       
   230                 	}
       
   231                 else
       
   232                 	{
       
   233                     tempTitle = LoadLocalizedStringLC(KResourceFile, R_ALBUM_ITEM_SUB_TITLE_MULTI);
       
   234                 	}
       
   235             	}
   225             	}
   236             
   226             
   237             TPtr formatString = tempTitle->Des();
   227             TPtr formatString = tempTitle->Des();
   238             
   228             
   239             // Now create a buffer that will contain the result. needs to be length of format string plus a few extra for the number
   229             // Now create a buffer that will contain the result. needs to be length of format string plus a few extra for the number
   277                 {
   267                 {
   278                 if( aResponse->IsSupported(KGlxMediaCollectionInternalSystemItemType) )
   268                 if( aResponse->IsSupported(KGlxMediaCollectionInternalSystemItemType) )
   279 					{
   269 					{
   280 					if( TGlxMediaId(KCapturedAlbumId) == aMediaId )
   270 					if( TGlxMediaId(KCapturedAlbumId) == aMediaId )
   281 						{
   271 						{
   282 						 HBufC* title = LoadLocalizedStringLC(KCameraText);
   272 						 HBufC* title = HbTextResolverSymbian::LoadLC(KCameraText); 
   283 						 aResponse->SetTextValueL(attr, *title);  
   273 						 aResponse->SetTextValueL(attr, *title);  
   284 						 CleanupStack::PopAndDestroy(title);						
   274 						 CleanupStack::PopAndDestroy(title);						
   285 						}
   275 						}
   286 					else if (TGlxMediaId(KFavoriteAlbumId) == aMediaId  )
   276 					else if (TGlxMediaId(KFavoriteAlbumId) == aMediaId  )
   287 						{
   277 						{
   288 						HBufC* title = LoadLocalizedStringLC(KMyFavText);
   278 						HBufC* title = HbTextResolverSymbian::LoadLC(KMyFavText); 
   289 						aResponse->SetTextValueL(attr, *title);  
   279 						aResponse->SetTextValueL(attr, *title);  
   290 						CleanupStack::PopAndDestroy(title);						
   280 						CleanupStack::PopAndDestroy(title);						
   291 						}
   281 						}
   292 					}                                             
   282 					}                                             
   293                  aResponse->Delete(KGlxMediaCollectionInternalSystemItemType);                    
   283                  aResponse->Delete(KGlxMediaCollectionInternalSystemItemType);