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