photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlerrename.cpp
--- a/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlerrename.cpp Thu Jul 15 18:39:01 2010 +0300
+++ b/photosgallery/viewframework/commandhandlers/commoncommandhandlers/src/glxcommandhandlerrename.cpp Thu Aug 19 09:55:03 2010 +0300
@@ -38,13 +38,10 @@
#include <glxicons.mbg>
#include <glxtracer.h>
#include <glxlog.h>
+#include <glxmediageneraldefs.h> // for KMaxMediaPopupTextLength
#include "glxcommandfactory.h"
-namespace
- {
- const TInt KNameMaxLength = 128;
- }
// ---------------------------------------------------------------------------
// Two-phased constructor.
@@ -81,7 +78,7 @@
//
void CGlxCommandHandlerRename::ConstructL(const TDesC& aFileName)
{
- iRenameText = HBufC::NewL(KNameMaxLength);
+ iRenameText = HBufC::NewL(KMaxMediaPopupTextLength);
iResourceOffset = CCoeEnv::Static()->AddResourceFileL(aFileName);
@@ -137,16 +134,13 @@
TPtr textPtr = iRenameText->Des();
GetTitleL( textPtr, aMediaList );
// store the current name.
- TBuf<KNameMaxLength> currentName;
+ TBuf<KMaxMediaPopupTextLength> currentName;
currentName.Copy(textPtr);
// Load the title for the popup
HBufC* title = StringLoader::LoadLC( R_GLX_POPUP_RENAME_TITLE );
CGlxTextEntryPopup* popup = CGlxTextEntryPopup::NewL( *title,
textPtr );
-
-
-
if ( popup->ExecuteLD() == EEikBidOk && currentName != *iRenameText)
{
// Text entry was successful