diff -r 0396474f30f5 -r 4ce476e64c59 meetingrequest/mrgui/mrfieldbuilderpluginextension/src/cesmrconflictpopup.cpp --- a/meetingrequest/mrgui/mrfieldbuilderpluginextension/src/cesmrconflictpopup.cpp Mon Mar 15 12:39:10 2010 +0200 +++ b/meetingrequest/mrgui/mrfieldbuilderpluginextension/src/cesmrconflictpopup.cpp Wed Mar 31 21:08:33 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -14,24 +14,22 @@ * Description: ESMR Conflict popup implementation * */ +#include "cesmrconflictpopup.h" +#include "mesmrcalentry.h" +#include "mesmrmeetingrequestentry.h" + +#include +#include +#include +#include +#include #include "emailtrace.h" -#include "cesmrconflictpopup.h" - -#include -#include -#include - -#include "cesmrlayoutmgr.h" -#include "mesmrcalentry.h" -#include "mesmrmeetingrequestentry.h" -#include -#include // Unnamed namespace for local definitions namespace{ -const TInt KTimeDelayBeforeShow(2000); // 2 Seconds +const TInt KTimeDelayBeforeShow(0); // 0 Seconds const TInt KTimeForView(5000); // 5 Seconds const TInt KZero(0); const TInt KTimeStringLength(20); @@ -44,6 +42,15 @@ _LIT (KSpace , " " ); const TInt KFullTimeStringSize(256); +void CalEntryPointerArrayCleanup( TAny* aArray ) + { + RPointerArray* entryArray = + static_cast*>( aArray ); + + entryArray->ResetAndDestroy(); + entryArray->Close(); + } + }//namespace // ======== MEMBER FUNCTIONS ======== @@ -112,7 +119,11 @@ { FUNC_LOG; RPointerArray entryArray; - CleanupClosePushL( entryArray ); + CleanupStack::PushL( + TCleanupItem( + CalEntryPointerArrayCleanup, + &entryArray ) ); + TInt ret = iEntry->FetchConflictingEntriesL( entryArray ); if( ret == KErrNotFound ) { @@ -131,6 +142,16 @@ // get the first conflicting entry and set the string for display meetingTitle = entryArray[KZero]->SummaryL(); meetingLocation = entryArray[KZero]->LocationL(); + + + if ( ( meetingLocation.Length()== 0 ) && ( meetingTitle.Length() == 0 ) ) + { + // if no title, set unnamed text: + HBufC* title = StringLoader::LoadLC ( R_QTN_MEET_REQ_CONFLICT_UNNAMED ); + meetingTitle.Copy( *title ); + CleanupStack::PopAndDestroy( title ); + } + dispStrLength = meetingTitle.Length() + meetingLocation.Length(); startTime = entryArray[KZero]->StartTimeL().TimeLocalL(); endTime = entryArray[KZero]->EndTimeL().TimeLocalL(); @@ -209,8 +230,10 @@ CEikonEnv::Static()-> // codescanner::eikonenvstatic HandleError(error); } - iNote->SetPositionAndAlignment( CESMRLayoutManager::ConflictPopupPosition(), - EHLeftVCenter ); + + // TODO: use XML layout data. Use this one popup_preview_text_window + /*iNote->SetPositionAndAlignment( CESMRLayoutManager::ConflictPopupPosition(), + EHLeftVCenter );*/ iNote->ShowInfoPopupNote(); }