diff -r b023a8d2866a -r ea65f74e6de4 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 #include #include +#include // 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 currentName; + TBuf 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