diff -r 0396474f30f5 -r 4ce476e64c59 meetingrequest/mrcasplugin/src/cesmrcaspluginuilauncher.cpp --- a/meetingrequest/mrcasplugin/src/cesmrcaspluginuilauncher.cpp Mon Mar 15 12:39:10 2010 +0200 +++ b/meetingrequest/mrcasplugin/src/cesmrcaspluginuilauncher.cpp Wed Mar 31 21:08:33 2010 +0300 @@ -25,22 +25,22 @@ #include // #include "tfsccontactactionpluginparams.h" -#include -#include +#include +#include #include #include #include -#include +#include #include #include "mfscactionutils.h" // -#include +#include #include #include #include #include "esmrcommands.h" #include -#include +#include #include @@ -319,7 +319,7 @@ if (iOutParams.iAction == MAgnEntryUi::EMeetingSaved) { TInt res = R_FS_MR_NOTE_SAVED; - HBufC* prompt = StringLoader::LoadLC( res, CEikonEnv::Static() ); + HBufC* prompt = StringLoader::LoadLC( res, CEikonEnv::Static() );// codescanner::eikonenvstatic CAknConfirmationNote* dialog = new( ELeave )CAknConfirmationNote(); dialog->ExecuteLD( *prompt ); CleanupStack::PopAndDestroy( prompt ); @@ -380,36 +380,33 @@ { FUNC_LOG; CMRMailboxUtils::TMailboxInfo defaultMailBox; - - RArray mailBoxes; - CleanupClosePushL( mailBoxes ); - SupportedMailboxesL( iMBUtils, mailBoxes ); - - if ( KErrNone == iMBUtils.GetDefaultMRMailBoxL(defaultMailBox) ) - { - for ( TInt i(0); i < mailBoxes.Count(); i++ ) - { - if ( (defaultMailBox.iEntryId != mailBoxes[i].iEntryId) && - ( i == mailBoxes.Count() - 1 ) ) - { - TInt selectedMailbox( PromptForDefaultMailboxL(mailBoxes) ); - - if ( KErrCancel != selectedMailbox ) - { - iMBUtils.SetDefaultMRMailBoxL( mailBoxes[selectedMailbox].iEntryId ); - iMBUtils.GetDefaultMRMailBoxL(defaultMailBox); - } - - // This will leave if user cancelled the mailbox selection - User::LeaveIfError( selectedMailbox ); - } - } - } - - CleanupStack::PopAndDestroy( &mailBoxes ); - + if ( KErrNotFound == iMBUtils.GetDefaultMRMailBoxL(defaultMailBox) ) + { + RArray mailBoxes; + CleanupClosePushL( mailBoxes ); + + SupportedMailboxesL( iMBUtils, mailBoxes ); + + TInt selectedMailbox( PromptForDefaultMailboxL(mailBoxes) ); + + if ( KErrCancel != selectedMailbox ) + { + iMBUtils.SetDefaultMRMailBoxL( mailBoxes[selectedMailbox].iEntryId ); + iMBUtils.GetDefaultMRMailBoxL(defaultMailBox); + } + CleanupStack::PopAndDestroy( &mailBoxes ); + + // This will leave if user cancelled the mailbox selection + User::LeaveIfError( selectedMailbox ); + } + delete iMtmUid; iMtmUid = NULL; iMtmUid = defaultMailBox.iMtmUid.Name().AllocL(); + + // iMtmUid needs to be upper case due to resource file definition, + // so let's make sure + TPtr mtm( iMtmUid->Des() ); + mtm.UpperCase(); //Set the organizer from the selected mailbox CCalUser* organizer = CCalUser::NewL( defaultMailBox.iEmailAddress );