photosgallery/viewframework/dataprovider/src/glxdetailsboundcommand.cpp
branchRCL_3
changeset 75 01504893d9cb
parent 60 5b3385a43d68
equal deleted inserted replaced
68:5b238bc8ffb6 75:01504893d9cb
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 
    19 
       
    20 
       
    21 #include    <e32base.h>                                 // Base class for all classes to be instantiated on the heap
       
    22 #include    <ExifModify.h>                              //For CExifModify
    20 #include    "glxdetailsboundcommand.hrh"
    23 #include    "glxdetailsboundcommand.hrh"
    21 #include    "glxdetailsboundcommand.h"                  // Handles user commands
    24 #include    "glxdetailsboundcommand.h"                  // Handles user commands
    22 #include    "glxuiutility.h"
       
    23 /** Error Id EMPY-7MKDHP **/ 
       
    24 #include    "mglxmetadatadialogobserver.h"              //for call back to dailog
       
    25 
       
    26 #include    <e32base.h>                                 // Base class for all classes to be instantiated on the heap
       
    27 #include    <ExifModify.h>                              //For CExifModify
       
    28 #include    <glxmetadatadialog.rsg>
    25 #include    <glxmetadatadialog.rsg>
    29 #include    <glxuiutilities.rsg>
    26 #include    <glxuiutilities.rsg>
    30 #include    <glxuiutilities.rsg>
    27 #include    <glxuiutilities.rsg>
    31 #include    <glxcommandhandleraddtocontainer.h>	        // For CGlxCommandHandlerAddToContainer
    28 #include    <glxcommandhandleraddtocontainer.h>	        // For CGlxCommandHandlerAddToContainer
    32 #include    <glxcommandhandlers.hrh> 			        // for command handler id
    29 #include    <glxcommandhandlers.hrh> 			        // for command handler id
    38 #include    <glxgeneraluiutilities.h>                   // General utilties class definition
    35 #include    <glxgeneraluiutilities.h>                   // General utilties class definition
    39 #include    <StringLoader.h>                            // Class provides methods to load and format resource strings
    36 #include    <StringLoader.h>                            // Class provides methods to load and format resource strings
    40 #include    <glxlog.h>                                  // Logging
    37 #include    <glxlog.h>                                  // Logging
    41 #include    <glxtracer.h>
    38 #include    <glxtracer.h>
    42 #include    <glxviewbase.rsg>
    39 #include    <glxviewbase.rsg>
    43 #include    <glxscreenfurniture.h>
    40 #include    "glxuiutility.h"
    44 #include    <glxresourceutilities.h>                    // for CGlxResourceUtilities
    41 #include <glxscreenfurniture.h>
    45 #include    <glxmediageneraldefs.h>                     // for KMaxMediaPopupTextLength
    42 #include <glxresourceutilities.h>                // for CGlxResourceUtilities
    46 
    43 /** Error Id EMPY-7MKDHP **/ 
       
    44 #include 	"mglxmetadatadialogobserver.h" 				//for call back to dailog
       
    45 
       
    46 
       
    47 //CONSTANTS
       
    48 const TInt KMaxMediaPopupTitleLength = 0x100;
    47 
    49 
    48 // ----------------------------------------------------------------------------
    50 // ----------------------------------------------------------------------------
    49 // CGlxTitleBoundCommand::NewL
    51 // CGlxTitleBoundCommand::NewL
    50 // ----------------------------------------------------------------------------
    52 // ----------------------------------------------------------------------------
    51 //
    53 //
    87 	    {
    89 	    {
    88 	    if ( aCommandId == KGlxEditBoundMenuCommandId  && media->IsSupported( KMPXMediaGeneralTitle))
    90 	    if ( aCommandId == KGlxEditBoundMenuCommandId  && media->IsSupported( KMPXMediaGeneralTitle))
    89 	        {
    91 	        {
    90 	        ///@todo - remove popup when editable template is avaliable
    92 	        ///@todo - remove popup when editable template is avaliable
    91 	        //Popup for testing
    93 	        //Popup for testing
    92 	        HBufC* textBuf = HBufC::NewLC( KMaxMediaPopupTextLength );
    94 	        HBufC* textBuf = HBufC::NewLC( KMaxMediaPopupTitleLength );
    93 	        (textBuf->Des()).Copy((media->ValueText(KMPXMediaGeneralTitle)));
    95 	        (textBuf->Des()).Copy((media->ValueText(KMPXMediaGeneralTitle)));
    94 	        TPtr textPtr = textBuf->Des();
    96 	        TPtr textPtr = textBuf->Des();
    95 	        /// bug fix - EMPY-7MCKD6 
    97 	        /// bug fix - EMPY-7MCKD6 
    96 	        TBuf<KMaxMediaPopupTextLength> titleText(*textBuf);
    98 	        TBuf<KMaxMediaPopupTitleLength> titleText(*textBuf);
    97 	        /// bug fix - EMPY-7MCKD6
    99 	        /// bug fix - EMPY-7MCKD6
    98 	        ///@todo - remove literal for popup title when resource string is avaliable
   100 	        ///@todo - remove literal for popup title when resource string is avaliable
    99 			HBufC *buf = StringLoader::LoadLC(R_GLX_METADATA_VIEW_TITLE_NSERIES);
   101 			HBufC *buf = StringLoader::LoadLC(R_GLX_METADATA_VIEW_TITLE_NSERIES);
   100 	        CGlxTextEntryPopup* popup = CGlxTextEntryPopup::NewL( *buf, textPtr );
   102 	        CGlxTextEntryPopup* popup = CGlxTextEntryPopup::NewL( *buf, textPtr );
   101 			CleanupStack::PopAndDestroy(buf);
   103 			CleanupStack::PopAndDestroy(buf);
   382 	const CGlxMedia* media = iMedialist->Item(0).Properties();
   384 	const CGlxMedia* media = iMedialist->Item(0).Properties();
   383 	if ( aCommandId == KGlxEditBoundMenuCommandId )
   385 	if ( aCommandId == KGlxEditBoundMenuCommandId )
   384 		{
   386 		{
   385 		///@todo - remove popup when editable template is avaliable
   387 		///@todo - remove popup when editable template is avaliable
   386 		//Popup for testing
   388 		//Popup for testing
   387 		HBufC* textBuf = HBufC::NewLC( KMaxMediaPopupTextLength );
   389 		HBufC* textBuf = HBufC::NewLC( KMaxMediaPopupTitleLength );
   388 		(textBuf->Des()).Copy((media->ValueText(KMPXMediaGeneralComment)));
   390 		(textBuf->Des()).Copy((media->ValueText(KMPXMediaGeneralComment)));
   389 		TPtr textPtr = textBuf->Des();
   391 		TPtr textPtr = textBuf->Des();
   390 		/// bug fix - EMPY-7MCKD6
   392 		/// bug fix - EMPY-7MCKD6
   391 		TBuf<KMaxMediaPopupTextLength> descText(*textBuf);
   393 		TBuf<KMaxMediaPopupTitleLength> descText(*textBuf);
   392 		/// bug fix - EMPY-7MCKD6
   394 		/// bug fix - EMPY-7MCKD6
   393 		///@todo - remove literal for popup title when resource string is avaliable
   395 		///@todo - remove literal for popup title when resource string is avaliable
   394 		
   396 		
   395 		HBufC *buf = StringLoader::LoadLC(R_GLX_METADATA_VIEW_DESCRIPTION_NSERIES);
   397 		HBufC *buf = StringLoader::LoadLC(R_GLX_METADATA_VIEW_DESCRIPTION_NSERIES);
   396 	    CGlxTextEntryPopup* popup = CGlxTextEntryPopup::NewL( *buf, textPtr );
   398 	    CGlxTextEntryPopup* popup = CGlxTextEntryPopup::NewL( *buf, textPtr );
  1018 // ----------------------------------------------------------------------------
  1020 // ----------------------------------------------------------------------------
  1019 //
  1021 //
  1020 void CGlxUsageRightsBoundCommand::InitMenuL( CEikMenuPane& aMenu ) const
  1022 void CGlxUsageRightsBoundCommand::InitMenuL( CEikMenuPane& aMenu ) const
  1021 	{
  1023 	{
  1022 	TRACER("CGlxUsageRightsBoundCommand::InitMenuL");
  1024 	TRACER("CGlxUsageRightsBoundCommand::InitMenuL");
       
  1025 	aMenu.SetItemTextL( KGlxViewBoundMenuCommandId, R_GLX_METADATA_VIEW_OPTIONS_VIEW ); 
  1023 	aMenu.SetItemDimmed( KGlxViewBoundMenuCommandId, EFalse );
  1026 	aMenu.SetItemDimmed( KGlxViewBoundMenuCommandId, EFalse );
  1024 	}
  1027 	}
  1025 
  1028 
  1026 // ----------------------------------------------------------------------------
  1029 // ----------------------------------------------------------------------------
  1027 // CGlxUsageRightsBoundCommand::HideLocationMenuItem
  1030 // CGlxUsageRightsBoundCommand::HideLocationMenuItem