photosgallery/viewframework/views/metadatadialog/src/glximgvwrmetadatacontainer.cpp
branchRCL_3
changeset 13 bcb43dc84c44
parent 12 ce1c7ad1f18b
child 17 a60acebbbd9d
equal deleted inserted replaced
12:ce1c7ad1f18b 13:bcb43dc84c44
    61 const TInt KMediaListId              = 0x2000D248;
    61 const TInt KMediaListId              = 0x2000D248;
    62 const TInt KMarqueeLoopCount         = 3;
    62 const TInt KMarqueeLoopCount         = 3;
    63 const TInt KMarqueeScrollAmount      = 20;
    63 const TInt KMarqueeScrollAmount      = 20;
    64 const TInt KMarqueeScrollDelay       = 1000000;
    64 const TInt KMarqueeScrollDelay       = 1000000;
    65 const TInt KMarqueeScrollInterval    = 200000;
    65 const TInt KMarqueeScrollInterval    = 200000;
    66 _LIT( KGlxTextSetter, "");
       
    67 
    66 
    68 // ============================ MEMBER FUNCTIONS ===============================
    67 // ============================ MEMBER FUNCTIONS ===============================
    69 
    68 
    70 // ---------------------------------------------------------
    69 // ---------------------------------------------------------
    71 // NewL
    70 // NewL
   156 //-----------------------------------------------------------------------------
   155 //-----------------------------------------------------------------------------
   157 CAknSettingItem* CGlxImgVwrMetadataContainer::CreateSettingItemL(TInt aResourceId)
   156 CAknSettingItem* CGlxImgVwrMetadataContainer::CreateSettingItemL(TInt aResourceId)
   158     {
   157     {
   159     TRACER("CGlxImgVwrMetadataContainer::CreateSettingItemL");      
   158     TRACER("CGlxImgVwrMetadataContainer::CreateSettingItemL");      
   160     CAknSettingItem* settingItem = NULL; // No need to push onto cleanup stack
   159     CAknSettingItem* settingItem = NULL; // No need to push onto cleanup stack
   161     iTextSetter.Copy(KGlxTextSetter);  
   160     iTextSetter.Zero();  
   162 
   161 
   163     //Creating a empty Settings list box which will  be populated with metadata in handleattributeavailable
   162     //Creating a empty Settings list box which will  be populated with metadata in handleattributeavailable
   164     switch(aResourceId)
   163     switch(aResourceId)
   165         {
   164         {
   166         case EImgVwrNameItem:
   165         case EImgVwrNameItem:
   303             CGlxUStringConverter* stringConverter = CGlxUStringConverter::NewL();
   302             CGlxUStringConverter* stringConverter = CGlxUStringConverter::NewL();
   304             CleanupStack::PushL(stringConverter );
   303             CleanupStack::PushL(stringConverter );
   305             for(TInt index = 0; index <= EImgVwrlicenseItem; index++)
   304             for(TInt index = 0; index <= EImgVwrlicenseItem; index++)
   306                 {
   305                 {
   307                 HBufC* string = NULL;               
   306                 HBufC* string = NULL;               
       
   307 				iTextSetter.Zero();
   308 
   308 
   309                 if(index == EImgVwrSizeItem)
   309                 if(index == EImgVwrSizeItem)
   310                     {
   310                     {
   311                     stringConverter->AsStringL(item,
   311                     stringConverter->AsStringL(item,
   312                             KMPXMediaGeneralSize,0, string );              
   312                             KMPXMediaGeneralSize,0, string );              
   342                     {
   342                     {
   343                     //no implementation
   343                     //no implementation
   344                     } 
   344                     } 
   345                 if(string)
   345                 if(string)
   346                     {
   346                     {
   347                     iTextSetter.Copy(KGlxTextSetter);
   347                     iTextSetter.Zero();
   348                     iTextSetter.Append(*string);
   348                     iTextSetter.Append(*string);
   349                     }
   349                     }
   350                 CleanupStack::PushL( string );
   350                 CleanupStack::PushL( string );
   351                 EditItemL(index,EFalse);   
   351                 EditItemL(index,EFalse);   
   352                 CleanupStack::PopAndDestroy(string );           
   352                 CleanupStack::PopAndDestroy(string );           
   372     }    
   372     }    
   373 // ----------------------------------------------------------------------------
   373 // ----------------------------------------------------------------------------
   374 // HandleCommandCompleteL
   374 // HandleCommandCompleteL
   375 // ----------------------------------------------------------------------------
   375 // ----------------------------------------------------------------------------
   376 // 
   376 // 
   377 void CGlxImgVwrMetadataContainer::HandleCommandCompleteL(TAny* aSessionId, 
   377 void CGlxImgVwrMetadataContainer::HandleCommandCompleteL(TAny* /*aSessionId*/, 
   378         CMPXCommand* /*aCommandResult*/, TInt aError, MGlxMediaList* aList)
   378         CMPXCommand* /*aCommandResult*/, TInt /*aError*/, MGlxMediaList* /*aList*/)
   379     {
   379     {
   380     TRACER("CGlxImgVwrMetadataContainer::HandleCommandCompleteL()");
   380     TRACER("CGlxImgVwrMetadataContainer::HandleCommandCompleteL()");
   381     }
   381     }
   382 
   382 
   383 // ----------------------------------------------------------------------------
   383 // ----------------------------------------------------------------------------
   572                 attribute,0, string );
   572                 attribute,0, string );
   573         }
   573         }
   574     //get the settings item based on the attribute and set the text.
   574     //get the settings item based on the attribute and set the text.
   575     if ( string )
   575     if ( string )
   576         {
   576         {
   577         iTextSetter.Copy(KGlxTextSetter);
   577         iTextSetter.Zero();
   578         iTextSetter.Append(*string);
   578         iTextSetter.Append(*string);
   579         if(attribute == KMPXMediaGeneralSize)
   579         if(attribute == KMPXMediaGeneralSize)
   580             {
   580             {
   581             EditItemL(EImgVwrSizeItem,EFalse);
   581             EditItemL(EImgVwrSizeItem,EFalse);
   582             }    
   582             }    
   663     if ( popup->ExecuteLD() == EEikBidOk )
   663     if ( popup->ExecuteLD() == EEikBidOk )
   664     {
   664     {
   665       if(0 != (titleText.Compare(*textBuf)))
   665       if(0 != (titleText.Compare(*textBuf)))
   666       {
   666       {
   667         //Modify the MDS and setting list only if the entry is different from previous Item value
   667         //Modify the MDS and setting list only if the entry is different from previous Item value
       
   668         iTextSetter.Zero();
   668         iTextSetter.Copy(*textBuf);
   669         iTextSetter.Copy(*textBuf);
   669         EditItemL(aItem,EFalse);
   670         EditItemL(aItem,EFalse);
   670         if( iItemMediaList->Count() > 0 )
   671         if( iItemMediaList->Count() > 0 )
   671         {
   672         {
   672           iItemMediaList->SetFocusL(NGlxListDefs::EAbsolute,0);//set focus to first item
   673           iItemMediaList->SetFocusL(NGlxListDefs::EAbsolute,0);//set focus to first item