Revision: 201009 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 15 Mar 2010 12:40:18 +0200
branchRCL_3
changeset 13 0f07cd1b5772
parent 12 38571fd2a704
child 14 a552c9d3f67b
child 19 1984aceb8774
Revision: 201009 Kit: 201010
alarmui/group/alarmuisnooze.rul
calendarui/application/data/Calendar.rss
calendarui/commonutils/src/calenviewutils.cpp
calendarui/controller/data/calencommonui.rss
calendarui/controller/src/calencmdlinelauncher.cpp
calendarui/controller/src/calencmdlineparser.cpp
calendarui/controller/src/calencontextfwlistener.cpp
calendarui/controller/src/calenmultipledbui.cpp
calendarui/controller/src/calenpopulationstate.cpp
calendarui/editors/src/CalenEntryUpdater.cpp
calendarui/editors/src/calenunifiededitor.cpp
calendarui/globaldata/BWINS/calenglobaldatau.def
calendarui/globaldata/eabi/calenglobaldatau.def
calendarui/globaldata/inc/calensend.h
calendarui/globaldata/src/calenglobaldata.cpp
calendarui/globaldata/src/calensend.cpp
calendarui/multicaluidialog/src/caldblistboxitemdrawer.cpp
calendarui/multicaluidialog/src/multicaluidialogmodel.cpp
calendarui/organizerplugin/aiagendapluginengine/src/CalenEngine.cpp
calendarui/server/CalenSvr/src/CalenServer.cpp
calendarui/settings/settingsui/group/calensettingsui.mmp
calendarui/settings/settingsui/src/CalenFileListSettingItem.cpp
calendarui/settings/settingsui/src/calensettingsuicontainer.cpp
calendarui/views/inc/calendayview.h
calendarui/views/inc/calennativeview.h
calendarui/views/inc/calentodoview.h
calendarui/views/src/calendaylistboxview.cpp
calendarui/views/src/calendayview.cpp
calendarui/views/src/caleneventview.cpp
calendarui/views/src/caleneventviewcontainer.cpp
calendarui/views/src/calennativeview.cpp
calendarui/views/src/calentodoview.cpp
clock2/clockui/uilayer/clkdatetimeview/group/clkdatetimeview.mmp
clock2/clockui/uilayer/clkdatetimeview/src/clkdatetimeview.cpp
notepad/notepad1/LibSrc/NpdEdwinBase.cpp
notepad/notepad1/LibSrc/NpdPopupList.cpp
organizer_plat/calendar_common_utils_api/tsrc/group/CalendarCommonUtilsTest_DoxyFile.txt
organizer_plat/calendar_custamization_api/inc/calencommands.hrh
organizer_pub/calendar_interim_utils2_api/tsrc/stiff/group/CalenInterimUtils2Test_DoxyFile.txt
organizer_pub/notepad_library_api/tsrc/.cproject
organizer_pub/notepad_library_api/tsrc/.project
organizer_pub/notepad_library_api/tsrc/group/ABLD.BAT
pimappservices/calendar/group/backup_registration.xml
pimappservices/calendar/server/src/agsalarm.cpp
pimappservices/calendar/server/src/agsentrymodel.cpp
pimappsupport/chinesecalendaralg/group/cconoriginal.mmp
pimappsupport/chinesecalendaralg/test/group/calcontable.mmp
pimappsupport/chinesecalendaralg/test/group/cconoriginal.mmp
pimappsupport/vcardandvcal/tsrc/TJapaneseSoundProperty.mmp
pimappsupport/vcardandvcal/tsrc/Test_saveloadbinoom.mmp
pimappsupport/vcardandvcal/tsrc/UnitTest_PBAPSupport/group/TestExternalize.mmp
--- a/alarmui/group/alarmuisnooze.rul	Fri Mar 12 15:42:35 2010 +0200
+++ b/alarmui/group/alarmuisnooze.rul	Mon Mar 15 12:40:18 2010 +0200
@@ -85,30 +85,6 @@
             </publishContext>
         </actions>
     </elseIf>
-    <!-- deactivate sensor channels when alarm is dismissed -->
-    <elseIf>
-        <and>
-            <!-- ...an alarm that was just deactivated -->
-            <contextUpdated>
-                <contextRef source='AlarmUI' type='State'/>
-            </contextUpdated>
-            <equals>
-                <contextRef source='AlarmUI' type='State'/>
-                <string>Inactive</string>
-            </equals>
-        </and>
-        <actions>
-            <!-- deactivate doubletap channel -->
-            <publishContext>
-                <contextRef source='Sensor' type='Event' value='DoubleTap.Deactivate'/>
-            </publishContext>
-
-            <!-- deactivate orientation channel -->
-            <publishContext>
-                <contextRef source='Sensor' type='Event' value='Orientation.Deactivate'/>
-            </publishContext>
-        </actions>
-    </elseIf>
     <!-- stop an active alarm on a 'Stop' command -->
     <elseIf>
         <and>
--- a/calendarui/application/data/Calendar.rss	Fri Mar 12 15:42:35 2010 +0200
+++ b/calendarui/application/data/Calendar.rss	Mon Mar 15 12:40:18 2010 +0200
@@ -891,7 +891,7 @@
 //
 RESOURCE TBUF r_calen_date_prompt
     {
-    buf = text_calendar_date_prompt;
+    buf = qtn_cale_go_to_date;
     }
 
 // ---------------------------------------------------------
@@ -2570,7 +2570,8 @@
     
     RESOURCE TBUF r_qtn_cale_db_already_exists_note
     {
-    buf = qtn_fldr_rename_query;
+    //buf = qtn_fldr_rename_query;
+    buf = qtn_fldr_name_already_used;
     }
 
 // ---------------------------------------------------------
@@ -2710,7 +2711,7 @@
 
 RESOURCE TBUF r_cale_db_calendar_default_name
     {
-    buf = "Calendar(%U)"; //qtn_cale_db_calendar_default_name 
+    buf = qtn_cale_db_calendar_default_name;
     }
 
 RESOURCE TBUF r_calen_illegal_characters
--- a/calendarui/commonutils/src/calenviewutils.cpp	Fri Mar 12 15:42:35 2010 +0200
+++ b/calendarui/commonutils/src/calenviewutils.cpp	Mon Mar 15 12:40:18 2010 +0200
@@ -93,10 +93,19 @@
     const TInt max = aMaxLength;
     TInt freeSpace = max - 2; // freeSpace is recalculated after each update
 
-    const TDesC& summary = aEntry.SummaryL();
-    const TDesC& location = aEntry.LocationL();
+    const TDesC& summary = aEntry.SummaryL();    
+    //const TDesC& location = aEntry.LocationL();    
     const TDesC& westernSeparator = KWesternSummaryLocationSeparator;
     const TDesC& arabicSeparator =  KArabicSummaryLocationSeparator;
+    
+    //location string is not available for anniversary and todo
+    HBufC16* text = HBufC16::NewLC( max );    
+    TPtrC location = text->Des();
+    if ( CCalEntry::ETodo != aEntry.EntryTypeL())
+        {
+            location.Set(aEntry.LocationL());
+        }
+    
 
     if(AknLayoutUtils::LayoutMirrored())
         {
@@ -150,7 +159,7 @@
         freeSpace = max - aTarget.Length();
         CleanupStack::PopAndDestroy(emptytext);
         }
-
+    CleanupStack::PopAndDestroy( text );
     TRACE_EXIT_POINT;
     }
     
--- a/calendarui/controller/data/calencommonui.rss	Fri Mar 12 15:42:35 2010 +0200
+++ b/calendarui/controller/data/calencommonui.rss	Mon Mar 15 12:40:18 2010 +0200
@@ -404,17 +404,17 @@
 //
 //----------------------------------------------------
 //
-RESOURCE AVKON_BUTTON_STATE_EXTENSION r_calen_tb_ext_qgn_indi_cale_tb_repeat_add
+RESOURCE AVKON_BUTTON_STATE_EXTENSION r_calen_tb_ext_qgn_indi_cale_tb_today
      {
      bmbSkinIdMajor = EAknsMajorGeneric;
-     bmbSkinIdMinor = EAknsMinorGenericQgnIndiRepeatAdd;
+     bmbSkinIdMinor =  EAknsMinorGenericQgnIndiCaleTbToday;
      //skin KAknsIIDQgnIndiRepeatAdd
      } 
 
-RESOURCE AVKON_BUTTON_STATE_EXTENSION r_calen_tb_ext_qgn_indi_cale_tb_right
+RESOURCE AVKON_BUTTON_STATE_EXTENSION r_calen_tb_ext_qgn_indi_cale_tb_changeview
      {
      bmbSkinIdMajor = EAknsMajorGeneric;
-     bmbSkinIdMinor = EAknsMinorGenericQgnIndiCaleTbRight;
+     bmbSkinIdMinor = EAknsMinorGenericQgnIndiCaleTbChangeview;
      //skin KAknsIIDQgnIndiCaleTbRight
      }
 
@@ -469,7 +469,7 @@
                         bmpfile = BITMAP_DIR"\\calendar.mif";
                         bmpid = EMbmCalendarQgn_indi_cale_tb_today;
                         bmpmask = EMbmCalendarQgn_indi_cale_tb_today_mask;
-                        extension = r_calen_tb_ext_qgn_indi_cale_tb_repeat_add;
+                        extension = r_calen_tb_ext_qgn_indi_cale_tb_today;
                         }
                     };
                 };
@@ -484,7 +484,7 @@
                 bmpFile = BITMAP_DIR"\\calendar.mif";
                 bmpId = EMbmCalendarQgn_indi_cale_tb_changeview;
                 bmpMask = EMbmCalendarQgn_indi_cale_tb_changeview_mask ;
-                extension = r_calen_tb_ext_qgn_indi_cale_tb_right;
+                extension = r_calen_tb_ext_qgn_indi_cale_tb_changeview;
                 items =
                     {
                     TBAR_CTRL
@@ -502,7 +502,7 @@
                                     bmpfile = BITMAP_DIR"\\calendar.mif";
                                     bmpid = EMbmCalendarQgn_indi_cale_tb_changeview;
                                     bmpmask = EMbmCalendarQgn_indi_cale_tb_changeview_mask;
-                                    extension = r_calen_tb_ext_qgn_indi_cale_tb_right;
+                                    extension = r_calen_tb_ext_qgn_indi_cale_tb_changeview;
                                     }
                                 };
                             };
@@ -534,7 +534,7 @@
                 bmpFile = BITMAP_DIR"\\calendar.mif";
                 bmpId = EMbmCalendarQgn_indi_cale_tb_changeview;
                 bmpMask = EMbmCalendarQgn_indi_cale_tb_changeview_mask ;
-                extension = r_calen_tb_ext_qgn_indi_cale_tb_right;
+                extension = r_calen_tb_ext_qgn_indi_cale_tb_changeview;
                 items =
                     {
                     TBAR_CTRL
@@ -552,7 +552,7 @@
                                     bmpfile = BITMAP_DIR"\\calendar.mif";
                                     bmpid = EMbmCalendarQgn_indi_cale_tb_changeview;
                                     bmpmask = EMbmCalendarQgn_indi_cale_tb_changeview_mask;
-                                    extension = r_calen_tb_ext_qgn_indi_cale_tb_right;
+                                    extension = r_calen_tb_ext_qgn_indi_cale_tb_changeview;
                                     }
                                 };
                             };
@@ -575,7 +575,7 @@
                         bmpfile = BITMAP_DIR"\\calendar.mif";
                         bmpid = EMbmCalendarQgn_indi_cale_tb_today;
                         bmpmask = EMbmCalendarQgn_indi_cale_tb_today_mask;
-                        extension = r_calen_tb_ext_qgn_indi_cale_tb_repeat_add;
+                        extension = r_calen_tb_ext_qgn_indi_cale_tb_today;
                         }
                     };
                 };
@@ -1043,7 +1043,7 @@
     }
 
 RESOURCE TBUF r_qtn_calen_info_cannot_open        	   { buf = qtn_cale_drm_protected_attachment; }
-RESOURCE TBUF r_qtn_calen_info_already_attached        { buf = r_qtn_calen_info_already_attached; }
+RESOURCE TBUF r_qtn_calen_info_already_attached        { buf = qtn_calen_info_already_attached; }
 
 // ---------------------------------------------------------
 //
--- a/calendarui/controller/src/calencmdlinelauncher.cpp	Fri Mar 12 15:42:35 2010 +0200
+++ b/calendarui/controller/src/calencmdlinelauncher.cpp	Mon Mar 15 12:40:18 2010 +0200
@@ -32,6 +32,7 @@
 #include "calencontroller.h"            // CCalenController
 #include "calencmdlineparser.h"         // CCalCmdLineParser
 #include "CalenUid.h"
+#include "calensend.h"
 
 // ================= MEMBER FUNCTIONS =======================
 
@@ -159,6 +160,14 @@
             key.iCode = EKeyEscape;
             key.iModifiers = 0;
             CCoeEnv::Static()->SimulateKeyEventL( key, EEventKey );
+            
+            // Break is added to close the messaging editor as the messagng editor is not 
+            // consuming the escape key event.
+            if( iGlobalData->CalenSendL().IsMessagingEditorOpen() )
+                {
+            break;
+                }
+                 
             }
 
         // Interpret 8bit data as 16bit unicode data
--- a/calendarui/controller/src/calencmdlineparser.cpp	Fri Mar 12 15:42:35 2010 +0200
+++ b/calendarui/controller/src/calencmdlineparser.cpp	Mon Mar 15 12:40:18 2010 +0200
@@ -407,14 +407,14 @@
         {
         res = EStartTypeUidViewer;
         }        
+    else if( des.Find(KCommandAlarmViewerNoSnooze) != KErrNotFound )
+        {
+        res = EStartTypeUidAlarmViewerNoSnooze;
+        }
     else if( des.Find(KCommandAlarmViewer) != KErrNotFound )
         {
         res = EStartTypeUidAlarmViewer;
         }
-    else if( des.Find(KCommandAlarmViewerNoSnooze) != KErrNotFound )
-        {
-        res = EStartTypeUidAlarmViewerNoSnooze;
-        }
     else if( des.Find( KCommandUid ) != KErrNotFound )
         {
         res = EStartTypeUid;
--- a/calendarui/controller/src/calencontextfwlistener.cpp	Fri Mar 12 15:42:35 2010 +0200
+++ b/calendarui/controller/src/calencontextfwlistener.cpp	Mon Mar 15 12:40:18 2010 +0200
@@ -216,13 +216,16 @@
     {
     TRACE_ENTRY_POINT;
     CCFContextObject* co = CCFContextObject::NewLC( aSource, aType, aValue );
-
-    const TInt err = iCFClient->PublishContext( *co );
-    CleanupStack::PopAndDestroy( co );
+    if(iCFClient)
+      {
+        const TInt err = iCFClient->PublishContext( *co );
+        
 #ifdef _DEBUG
     RDebug::Print( _L("### PublishContext - err: %d"), err );
 #endif
     User::LeaveIfError( err );
+      }
+    CleanupStack::PopAndDestroy( co );
     TRACE_EXIT_POINT;
     }
 
--- a/calendarui/controller/src/calenmultipledbui.cpp	Fri Mar 12 15:42:35 2010 +0200
+++ b/calendarui/controller/src/calenmultipledbui.cpp	Mon Mar 15 12:40:18 2010 +0200
@@ -56,6 +56,8 @@
 const TInt KMultiDbMaxLength = 300;
 const TInt KBuffLength = 24;
 
+
+
 // ----------------------------------------------------------------------------
 // CCalenMultipleDbListboxItemDrawer::CCalenMultipleDbListboxItemDrawer
 // Constructor
@@ -484,7 +486,7 @@
               HBufC* calendarFileName = 
                   calendarInfoList[currentIndex]->FileNameL().AllocLC();
               if (!(calendarFileName->CompareF(
-                        iController.Services().SessionL().DefaultFileNameL())))
+                      _L("c:Calendar1"))))
                   {
                   aMenuPane->DeleteMenuItem(ECalenCmdDelete);
                   }
@@ -862,7 +864,7 @@
                 HBufC* calendarFileName = 
                         calendarInfoList[currentIndex]->FileNameL().AllocLC();
                 if (calendarFileName->CompareF(
-                        iController.Services().SessionL().DefaultFileNameL()))
+                        _L("c:Calendar1")))
                     {
                     DeleteItemL();
                     }
--- a/calendarui/controller/src/calenpopulationstate.cpp	Fri Mar 12 15:42:35 2010 +0200
+++ b/calendarui/controller/src/calenpopulationstate.cpp	Mon Mar 15 12:40:18 2010 +0200
@@ -99,6 +99,14 @@
         RequestCallbackL( handler, aCommand );
         cmdUsed = ETrue;
         }
+    
+    else if( ECalenEventView == cmd )
+        {
+        SetCurrentState( aStateMachine, CCalenStateMachine::ECalenIdleState );
+        ActivateCurrentStateL(aStateMachine);
+        RequestCallbackL( handler, aCommand );
+        cmdUsed = ETrue;
+        }
 
     TRACE_EXIT_POINT;
     return cmdUsed;
--- a/calendarui/editors/src/CalenEntryUpdater.cpp	Fri Mar 12 15:42:35 2010 +0200
+++ b/calendarui/editors/src/CalenEntryUpdater.cpp	Mon Mar 15 12:40:18 2010 +0200
@@ -353,7 +353,9 @@
     TCalenInstanceId instanceIdTemp = iServices.Context().InstanceId();
     instanceIdTemp.iColId = colId;
     instanceIdTemp.iType = aEditedEntry.EntryTypeL();
-    if( aNewInstanceStartDate.TimeLocalL() != aOrigInstanceDate.TimeLocalL() )
+    
+    if (aNewInstanceStartDate.TimeLocalL() != aOrigInstanceDate.TimeLocalL()
+            || instanceIdTemp.iInstanceTime <= 0)
         {
         instanceIdTemp.iInstanceTime = aNewInstanceStartDate.TimeLocalL();
         }
--- a/calendarui/editors/src/calenunifiededitor.cpp	Fri Mar 12 15:42:35 2010 +0200
+++ b/calendarui/editors/src/calenunifiededitor.cpp	Mon Mar 15 12:40:18 2010 +0200
@@ -2256,6 +2256,13 @@
 
     CleanupStack::PushL( entry );
     iEditedCalEntry.DescriptionL();  // make sure entry is fully loaded
+    if (CCalEntry::ETodo == entry->EntryTypeL())//check the entry type
+        {//remove GeoValue and Location info from a ToDo as ToDo does specs
+    //does not include them
+        iEditedCalEntry.ClearGeoValueL();
+        iEditedCalEntry.SetLocationL(KNullDesC);
+        }
+    
     entry->CopyFromL(iEditedCalEntry, CCalEntry::EDontCopyId);
     entry->DescriptionL();  // make sure entry is fully copied
     
@@ -2275,12 +2282,7 @@
             }
 		}
     
-    if(!IsCreatingNewEntry() && !iEditorDataHandler->IsCalendarEditedL())
-        {
-        iServices->GetAttachmentData()->Reset();
-        iServices->EntryViewL(iEditorDataHandler->PreviousDbCollectionId())
-                                                ->DeleteL(*iOriginalCalEntry);
-        }
+
     
     TInt saveErr( KErrNone );
     if( aForcedExit )
@@ -2306,6 +2308,9 @@
                    newInstanceEndDate,
                    iUnifiedEditorControl->GetCalendarNameForEntryL() ) );
         }
+    
+    //Agenda server is taking care of deleting the old entry when only entrytype is changing
+    //so calendar is not deleting the old entry here, when only entry type has changed.
     if(!IsCreatingNewEntry() && iEditorDataHandler->IsCalendarEditedL())
         {
         iServices->GetAttachmentData()->Reset();
@@ -3345,6 +3350,7 @@
 void CCalenUnifiedEditor::AddPictureL(TInt isNotFirstTime)
     {
     TRACE_ENTRY_POINT;
+    return;
     
     // Instantiate CMapIconPicture object 300x300 twips in size
     CEikRichTextEditor* locationControl = static_cast<CEikRichTextEditor*>(Control(ECalenEditorPlace));
--- a/calendarui/globaldata/BWINS/calenglobaldatau.def	Fri Mar 12 15:42:35 2010 +0200
+++ b/calendarui/globaldata/BWINS/calenglobaldatau.def	Mon Mar 15 12:40:18 2010 +0200
@@ -1,37 +1,38 @@
 EXPORTS
 	?EntryViewL@CCalenGlobalData@@QAEPAVCCalEntryView@@E@Z @ 1 NONAME ; class CCalEntryView * CCalenGlobalData::EntryViewL(unsigned char)
-	?InstanceViewL@CCalenGlobalData@@QAEPAVCCalInstanceView@@XZ @ 2 NONAME ; class CCalInstanceView * CCalenGlobalData::InstanceViewL(void)
-	?InitializeGlobalDataL@CCalenGlobalData@@QAEXXZ @ 3 NONAME ; void CCalenGlobalData::InitializeGlobalDataL(void)
-	??1CCalenSend@@UAE@XZ @ 4 NONAME ; CCalenSend::~CCalenSend(void)
-	?DisplaySendMenuItemL@CCalenSend@@QAEXAAVCEikMenuPane@@H@Z @ 5 NONAME ; void CCalenSend::DisplaySendMenuItemL(class CEikMenuPane &, int)
-	?ResetKeyEventQueue@CCalenGlobalData@@QAEXXZ @ 6 NONAME ; void CCalenGlobalData::ResetKeyEventQueue(void)
-	?GetQueuedKeyEvent@CCalenGlobalData@@QAEHAAUTKeyEvent@@AAW4TEventCode@@@Z @ 7 NONAME ; int CCalenGlobalData::GetQueuedKeyEvent(struct TKeyEvent &, enum TEventCode &)
-	?CalSessionL@CCalenGlobalData@@QAEAAVCCalSession@@ABVTDesC16@@@Z @ 8 NONAME ; class CCalSession & CCalenGlobalData::CalSessionL(class TDesC16 const &)
-	?MRMailboxUtilsL@CCalenGlobalData@@QAEAAVCMRMailboxUtils@@XZ @ 9 NONAME ; class CMRMailboxUtils & CCalenGlobalData::MRMailboxUtilsL(void)
-	?CalenSendL@CCalenGlobalData@@QAEAAVCCalenSend@@XZ @ 10 NONAME ; class CCalenSend & CCalenGlobalData::CalenSendL(void)
-	?ConstructFileMappingL@CCalenGlobalData@@AAEHXZ @ 11 NONAME ; int CCalenGlobalData::ConstructFileMappingL(void)
-	?NewL@CCalenGlobalData@@SAPAV1@AAVMCalProgressCallBack@@PAVMCalenContextChangeObserver@@@Z @ 12 NONAME ; class CCalenGlobalData * CCalenGlobalData::NewL(class MCalProgressCallBack &, class MCalenContextChangeObserver *)
-	?InstanceL@CCalenGlobalData@@SAPAV1@XZ @ 13 NONAME ; class CCalenGlobalData * CCalenGlobalData::InstanceL(void)
-	?NewL@CCalenSend@@SAPAV1@HAAVCCalSession@@@Z @ 14 NONAME ; class CCalenSend * CCalenSend::NewL(int, class CCalSession &)
-	?RemoveCalendarL@CCalenGlobalData@@QAEXABVTDesC16@@@Z @ 15 NONAME ; void CCalenGlobalData::RemoveCalendarL(class TDesC16 const &)
-	?EntryViewExists@CCalenGlobalData@@QAEHXZ @ 16 NONAME ; int CCalenGlobalData::EntryViewExists(void)
-	?QueueKeyEvent@CCalenGlobalData@@QAEHABUTKeyEvent@@W4TEventCode@@@Z @ 17 NONAME ; int CCalenGlobalData::QueueKeyEvent(struct TKeyEvent const &, enum TEventCode)
-	?InstanceViewL@CCalenGlobalData@@QAEPAVCCalInstanceView@@ABV?$RArray@H@@@Z @ 18 NONAME ; class CCalInstanceView * CCalenGlobalData::InstanceViewL(class RArray<int> const &)
-	?AttemptToRetrieveDefaultMailboxL@CCalenGlobalData@@QAEHAAUTMailboxInfo@CMRMailboxUtils@@@Z @ 19 NONAME ; int CCalenGlobalData::AttemptToRetrieveDefaultMailboxL(struct CMRMailboxUtils::TMailboxInfo &)
-	?CalSessionL@CCalenGlobalData@@QAEAAVCCalSession@@XZ @ 20 NONAME ; class CCalSession & CCalenGlobalData::CalSessionL(void)
-	?GetAllCalendarInfoL@CCalenGlobalData@@QAEXAAV?$RPointerArray@VCCalCalendarInfo@@@@@Z @ 21 NONAME ; void CCalenGlobalData::GetAllCalendarInfoL(class RPointerArray<class CCalCalendarInfo> &)
-	?InstanceL@CCalenGlobalData@@SAPAV1@AAVCCalSession@@@Z @ 22 NONAME ; class CCalenGlobalData * CCalenGlobalData::InstanceL(class CCalSession &)
-	?InterimUtilsL@CCalenGlobalData@@QAEAAVCCalenInterimUtils2@@XZ @ 23 NONAME ; class CCalenInterimUtils2 & CCalenGlobalData::InterimUtilsL(void)
-	?MeetingRequestUtilsL@CCalenGlobalData@@QAEAAVCMRUtils@@XZ @ 24 NONAME ; class CMRUtils & CCalenGlobalData::MeetingRequestUtilsL(void)
-	?DisplaySendCascadeMenuL@CCalenSend@@QAEXXZ @ 25 NONAME ; void CCalenSend::DisplaySendCascadeMenuL(void)
-	?SendAsVCalendarL@CCalenSend@@QAEXHAAVCCalEntry@@@Z @ 26 NONAME ; void CCalenSend::SendAsVCalendarL(int, class CCalEntry &)
-	?GetCalFileNameForCollectionId@CCalenGlobalData@@QAEABVTDesC16@@E@Z @ 27 NONAME ; class TDesC16 const & CCalenGlobalData::GetCalFileNameForCollectionId(unsigned char)
-	?EntryViewL@CCalenGlobalData@@QAEPAVCCalEntryView@@XZ @ 28 NONAME ; class CCalEntryView * CCalenGlobalData::EntryViewL(void)
-	?Instance@CCalenGlobalData@@SAPAV1@XZ @ 29 NONAME ; class CCalenGlobalData * CCalenGlobalData::Instance(void)
-	?UpdateCalendarL@CCalenGlobalData@@QAEXPAVCCalCalendarInfo@@@Z @ 30 NONAME ; void CCalenGlobalData::UpdateCalendarL(class CCalCalendarInfo *)
-	?Release@CCalenGlobalData@@QAEXXZ @ 31 NONAME ; void CCalenGlobalData::Release(void)
-	?AddCalendarL@CCalenGlobalData@@QAEXPAVCCalCalendarInfo@@@Z @ 32 NONAME ; void CCalenGlobalData::AddCalendarL(class CCalCalendarInfo *)
-	?Context@CCalenGlobalData@@QAEAAVMCalenContext@@XZ @ 33 NONAME ; class MCalenContext & CCalenGlobalData::Context(void)
-	?CanSendL@CCalenSend@@QAEHH@Z @ 34 NONAME ; int CCalenSend::CanSendL(int)
-	?RemoveDeadCalendarsL@CCalenGlobalData@@QAEXXZ @ 35 NONAME ; void CCalenGlobalData::RemoveDeadCalendarsL(void)
+	?IsMessagingEditorOpen@CCalenSend@@QAEHXZ @ 2 NONAME ; int CCalenSend::IsMessagingEditorOpen(void)
+	?CalSessionL@CCalenGlobalData@@QAEAAVCCalSession@@ABVTDesC16@@@Z @ 3 NONAME ; class CCalSession & CCalenGlobalData::CalSessionL(class TDesC16 const &)
+	?MRMailboxUtilsL@CCalenGlobalData@@QAEAAVCMRMailboxUtils@@XZ @ 4 NONAME ; class CMRMailboxUtils & CCalenGlobalData::MRMailboxUtilsL(void)
+	?ConstructFileMappingL@CCalenGlobalData@@AAEHXZ @ 5 NONAME ; int CCalenGlobalData::ConstructFileMappingL(void)
+	?InstanceL@CCalenGlobalData@@SAPAV1@XZ @ 6 NONAME ; class CCalenGlobalData * CCalenGlobalData::InstanceL(void)
+	?NewL@CCalenSend@@SAPAV1@HAAVCCalSession@@@Z @ 7 NONAME ; class CCalenSend * CCalenSend::NewL(int, class CCalSession &)
+	?RemoveCalendarL@CCalenGlobalData@@QAEXABVTDesC16@@@Z @ 8 NONAME ; void CCalenGlobalData::RemoveCalendarL(class TDesC16 const &)
+	?QueueKeyEvent@CCalenGlobalData@@QAEHABUTKeyEvent@@W4TEventCode@@@Z @ 9 NONAME ; int CCalenGlobalData::QueueKeyEvent(struct TKeyEvent const &, enum TEventCode)
+	?InstanceViewL@CCalenGlobalData@@QAEPAVCCalInstanceView@@ABV?$RArray@H@@@Z @ 10 NONAME ; class CCalInstanceView * CCalenGlobalData::InstanceViewL(class RArray<int> const &)
+	?CalSessionL@CCalenGlobalData@@QAEAAVCCalSession@@XZ @ 11 NONAME ; class CCalSession & CCalenGlobalData::CalSessionL(void)
+	?InstanceL@CCalenGlobalData@@SAPAV1@AAVCCalSession@@@Z @ 12 NONAME ; class CCalenGlobalData * CCalenGlobalData::InstanceL(class CCalSession &)
+	?InterimUtilsL@CCalenGlobalData@@QAEAAVCCalenInterimUtils2@@XZ @ 13 NONAME ; class CCalenInterimUtils2 & CCalenGlobalData::InterimUtilsL(void)
+	?DisplaySendCascadeMenuL@CCalenSend@@QAEXXZ @ 14 NONAME ; void CCalenSend::DisplaySendCascadeMenuL(void)
+	?RemoveDeadCalendarsL@CCalenGlobalData@@QAEXXZ @ 15 NONAME ; void CCalenGlobalData::RemoveDeadCalendarsL(void)
+	?UpdateCalendarL@CCalenGlobalData@@QAEXPAVCCalCalendarInfo@@@Z @ 16 NONAME ; void CCalenGlobalData::UpdateCalendarL(class CCalCalendarInfo *)
+	?Context@CCalenGlobalData@@QAEAAVMCalenContext@@XZ @ 17 NONAME ; class MCalenContext & CCalenGlobalData::Context(void)
+	?InstanceViewL@CCalenGlobalData@@QAEPAVCCalInstanceView@@XZ @ 18 NONAME ; class CCalInstanceView * CCalenGlobalData::InstanceViewL(void)
+	?InitializeGlobalDataL@CCalenGlobalData@@QAEXXZ @ 19 NONAME ; void CCalenGlobalData::InitializeGlobalDataL(void)
+	??1CCalenSend@@UAE@XZ @ 20 NONAME ; CCalenSend::~CCalenSend(void)
+	?DisplaySendMenuItemL@CCalenSend@@QAEXAAVCEikMenuPane@@H@Z @ 21 NONAME ; void CCalenSend::DisplaySendMenuItemL(class CEikMenuPane &, int)
+	?ResetKeyEventQueue@CCalenGlobalData@@QAEXXZ @ 22 NONAME ; void CCalenGlobalData::ResetKeyEventQueue(void)
+	?GetQueuedKeyEvent@CCalenGlobalData@@QAEHAAUTKeyEvent@@AAW4TEventCode@@@Z @ 23 NONAME ; int CCalenGlobalData::GetQueuedKeyEvent(struct TKeyEvent &, enum TEventCode &)
+	?CalenSendL@CCalenGlobalData@@QAEAAVCCalenSend@@XZ @ 24 NONAME ; class CCalenSend & CCalenGlobalData::CalenSendL(void)
+	?NewL@CCalenGlobalData@@SAPAV1@AAVMCalProgressCallBack@@PAVMCalenContextChangeObserver@@@Z @ 25 NONAME ; class CCalenGlobalData * CCalenGlobalData::NewL(class MCalProgressCallBack &, class MCalenContextChangeObserver *)
+	?EntryViewExists@CCalenGlobalData@@QAEHXZ @ 26 NONAME ; int CCalenGlobalData::EntryViewExists(void)
+	?AttemptToRetrieveDefaultMailboxL@CCalenGlobalData@@QAEHAAUTMailboxInfo@CMRMailboxUtils@@@Z @ 27 NONAME ; int CCalenGlobalData::AttemptToRetrieveDefaultMailboxL(struct CMRMailboxUtils::TMailboxInfo &)
+	?GetAllCalendarInfoL@CCalenGlobalData@@QAEXAAV?$RPointerArray@VCCalCalendarInfo@@@@@Z @ 28 NONAME ; void CCalenGlobalData::GetAllCalendarInfoL(class RPointerArray<class CCalCalendarInfo> &)
+	?MeetingRequestUtilsL@CCalenGlobalData@@QAEAAVCMRUtils@@XZ @ 29 NONAME ; class CMRUtils & CCalenGlobalData::MeetingRequestUtilsL(void)
+	?SendAsVCalendarL@CCalenSend@@QAEXHAAVCCalEntry@@@Z @ 30 NONAME ; void CCalenSend::SendAsVCalendarL(int, class CCalEntry &)
+	?GetCalFileNameForCollectionId@CCalenGlobalData@@QAEABVTDesC16@@E@Z @ 31 NONAME ; class TDesC16 const & CCalenGlobalData::GetCalFileNameForCollectionId(unsigned char)
+	?Instance@CCalenGlobalData@@SAPAV1@XZ @ 32 NONAME ; class CCalenGlobalData * CCalenGlobalData::Instance(void)
+	?EntryViewL@CCalenGlobalData@@QAEPAVCCalEntryView@@XZ @ 33 NONAME ; class CCalEntryView * CCalenGlobalData::EntryViewL(void)
+	?Release@CCalenGlobalData@@QAEXXZ @ 34 NONAME ; void CCalenGlobalData::Release(void)
+	?AddCalendarL@CCalenGlobalData@@QAEXPAVCCalCalendarInfo@@@Z @ 35 NONAME ; void CCalenGlobalData::AddCalendarL(class CCalCalendarInfo *)
+	?CanSendL@CCalenSend@@QAEHH@Z @ 36 NONAME ; int CCalenSend::CanSendL(int)
 
--- a/calendarui/globaldata/eabi/calenglobaldatau.def	Fri Mar 12 15:42:35 2010 +0200
+++ b/calendarui/globaldata/eabi/calenglobaldatau.def	Mon Mar 15 12:40:18 2010 +0200
@@ -1,41 +1,42 @@
 EXPORTS
 	_ZN10CCalenSend16SendAsVCalendarLEiR9CCalEntry @ 1 NONAME
 	_ZN10CCalenSend20DisplaySendMenuItemLER12CEikMenuPanei @ 2 NONAME
-	_ZN10CCalenSend23DisplaySendCascadeMenuLEv @ 3 NONAME
-	_ZN10CCalenSend4NewLEiR11CCalSession @ 4 NONAME
-	_ZN10CCalenSend8CanSendLEi @ 5 NONAME
-	_ZN10CCalenSendD0Ev @ 6 NONAME
-	_ZN10CCalenSendD1Ev @ 7 NONAME
-	_ZN10CCalenSendD2Ev @ 8 NONAME
-	_ZN16CCalenGlobalData10CalenSendLEv @ 9 NONAME
-	_ZN16CCalenGlobalData10EntryViewLEh @ 10 NONAME
-	_ZN16CCalenGlobalData10EntryViewLEv @ 11 NONAME
-	_ZN16CCalenGlobalData11CalSessionLERK7TDesC16 @ 12 NONAME
-	_ZN16CCalenGlobalData11CalSessionLEv @ 13 NONAME
-	_ZN16CCalenGlobalData12AddCalendarLEP16CCalCalendarInfo @ 14 NONAME
-	_ZN16CCalenGlobalData13InstanceViewLERK6RArrayIiE @ 15 NONAME
-	_ZN16CCalenGlobalData13InstanceViewLEv @ 16 NONAME
-	_ZN16CCalenGlobalData13InterimUtilsLEv @ 17 NONAME
-	_ZN16CCalenGlobalData13QueueKeyEventERK9TKeyEvent10TEventCode @ 18 NONAME
-	_ZN16CCalenGlobalData15EntryViewExistsEv @ 19 NONAME
-	_ZN16CCalenGlobalData15MRMailboxUtilsLEv @ 20 NONAME
-	_ZN16CCalenGlobalData15RemoveCalendarLERK7TDesC16 @ 21 NONAME
-	_ZN16CCalenGlobalData15UpdateCalendarLEP16CCalCalendarInfo @ 22 NONAME
-	_ZN16CCalenGlobalData17GetQueuedKeyEventER9TKeyEventR10TEventCode @ 23 NONAME
-	_ZN16CCalenGlobalData18ResetKeyEventQueueEv @ 24 NONAME
-	_ZN16CCalenGlobalData19GetAllCalendarInfoLER13RPointerArrayI16CCalCalendarInfoE @ 25 NONAME
-	_ZN16CCalenGlobalData20MeetingRequestUtilsLEv @ 26 NONAME
-	_ZN16CCalenGlobalData21ConstructFileMappingLEv @ 27 NONAME
-	_ZN16CCalenGlobalData21InitializeGlobalDataLEv @ 28 NONAME
-	_ZN16CCalenGlobalData29GetCalFileNameForCollectionIdEh @ 29 NONAME
-	_ZN16CCalenGlobalData32AttemptToRetrieveDefaultMailboxLERN15CMRMailboxUtils12TMailboxInfoE @ 30 NONAME
-	_ZN16CCalenGlobalData4NewLER20MCalProgressCallBackP27MCalenContextChangeObserver @ 31 NONAME
-	_ZN16CCalenGlobalData7ContextEv @ 32 NONAME
-	_ZN16CCalenGlobalData7ReleaseEv @ 33 NONAME
-	_ZN16CCalenGlobalData8InstanceEv @ 34 NONAME
-	_ZN16CCalenGlobalData9InstanceLER11CCalSession @ 35 NONAME
-	_ZN16CCalenGlobalData9InstanceLEv @ 36 NONAME
-	_ZTI17CCalenContextImpl @ 37 NONAME
-	_ZTV17CCalenContextImpl @ 38 NONAME
-	_ZN16CCalenGlobalData20RemoveDeadCalendarsLEv @ 39 NONAME
+	_ZN10CCalenSend21IsMessagingEditorOpenEv @ 3 NONAME
+	_ZN10CCalenSend23DisplaySendCascadeMenuLEv @ 4 NONAME
+	_ZN10CCalenSend4NewLEiR11CCalSession @ 5 NONAME
+	_ZN10CCalenSend8CanSendLEi @ 6 NONAME
+	_ZN10CCalenSendD0Ev @ 7 NONAME
+	_ZN10CCalenSendD1Ev @ 8 NONAME
+	_ZN10CCalenSendD2Ev @ 9 NONAME
+	_ZN16CCalenGlobalData10CalenSendLEv @ 10 NONAME
+	_ZN16CCalenGlobalData10EntryViewLEh @ 11 NONAME
+	_ZN16CCalenGlobalData10EntryViewLEv @ 12 NONAME
+	_ZN16CCalenGlobalData11CalSessionLERK7TDesC16 @ 13 NONAME
+	_ZN16CCalenGlobalData11CalSessionLEv @ 14 NONAME
+	_ZN16CCalenGlobalData12AddCalendarLEP16CCalCalendarInfo @ 15 NONAME
+	_ZN16CCalenGlobalData13InstanceViewLERK6RArrayIiE @ 16 NONAME
+	_ZN16CCalenGlobalData13InstanceViewLEv @ 17 NONAME
+	_ZN16CCalenGlobalData13InterimUtilsLEv @ 18 NONAME
+	_ZN16CCalenGlobalData13QueueKeyEventERK9TKeyEvent10TEventCode @ 19 NONAME
+	_ZN16CCalenGlobalData15EntryViewExistsEv @ 20 NONAME
+	_ZN16CCalenGlobalData15MRMailboxUtilsLEv @ 21 NONAME
+	_ZN16CCalenGlobalData15RemoveCalendarLERK7TDesC16 @ 22 NONAME
+	_ZN16CCalenGlobalData15UpdateCalendarLEP16CCalCalendarInfo @ 23 NONAME
+	_ZN16CCalenGlobalData17GetQueuedKeyEventER9TKeyEventR10TEventCode @ 24 NONAME
+	_ZN16CCalenGlobalData18ResetKeyEventQueueEv @ 25 NONAME
+	_ZN16CCalenGlobalData19GetAllCalendarInfoLER13RPointerArrayI16CCalCalendarInfoE @ 26 NONAME
+	_ZN16CCalenGlobalData20MeetingRequestUtilsLEv @ 27 NONAME
+	_ZN16CCalenGlobalData20RemoveDeadCalendarsLEv @ 28 NONAME
+	_ZN16CCalenGlobalData21ConstructFileMappingLEv @ 29 NONAME
+	_ZN16CCalenGlobalData21InitializeGlobalDataLEv @ 30 NONAME
+	_ZN16CCalenGlobalData29GetCalFileNameForCollectionIdEh @ 31 NONAME
+	_ZN16CCalenGlobalData32AttemptToRetrieveDefaultMailboxLERN15CMRMailboxUtils12TMailboxInfoE @ 32 NONAME
+	_ZN16CCalenGlobalData4NewLER20MCalProgressCallBackP27MCalenContextChangeObserver @ 33 NONAME
+	_ZN16CCalenGlobalData7ContextEv @ 34 NONAME
+	_ZN16CCalenGlobalData7ReleaseEv @ 35 NONAME
+	_ZN16CCalenGlobalData8InstanceEv @ 36 NONAME
+	_ZN16CCalenGlobalData9InstanceLER11CCalSession @ 37 NONAME
+	_ZN16CCalenGlobalData9InstanceLEv @ 38 NONAME
+	_ZTI17CCalenContextImpl @ 39 NONAME
+	_ZTV17CCalenContextImpl @ 40 NONAME
 
--- a/calendarui/globaldata/inc/calensend.h	Fri Mar 12 15:42:35 2010 +0200
+++ b/calendarui/globaldata/inc/calensend.h	Mon Mar 15 12:40:18 2010 +0200
@@ -69,6 +69,11 @@
      * Send an entry a vCal through sendui
      */
     IMPORT_C void SendAsVCalendarL(TInt aCommand, CCalEntry& aEntry);
+    
+	/**
+	* check whether messaging editor is open or not.
+	*/
+    IMPORT_C TBool IsMessagingEditorOpen();
 
 private: // utility functions
     /**
@@ -89,6 +94,7 @@
     CSendUi* iSendUi;
     TInt iSendAsCmdId;
     TUid iSelectedMtmUid;
+    TBool iISEditorOpen;
 
     CArrayFixFlat<TUid>* iSendMtmsToDim;
     CCalSession& iSession;
--- a/calendarui/globaldata/src/calenglobaldata.cpp	Fri Mar 12 15:42:35 2010 +0200
+++ b/calendarui/globaldata/src/calenglobaldata.cpp	Mon Mar 15 12:40:18 2010 +0200
@@ -54,6 +54,8 @@
 _LIT( KExtCalendar,"Ext calendar" );
 const TInt KBuffLength = 24;
 
+_LIT(KPhoneCalendarName,"PhoneCalendar");
+
 // ============================ MEMBER FUNCTIONS ===============================
 
 // -----------------------------------------------------------------------------
@@ -1469,9 +1471,17 @@
 	{
 	TRACE_ENTRY_POINT;
 		
-	for(TInt index=0;index<iCalendarInfoList.Count();index++)
+	for(TInt index=0;index < iCalendarInfoList.Count();index++)
 	    {
-	    aCalendarInfoList.AppendL(iCalendarInfoList[index]);
+        TPtrC fileNamePtr = iCalendarInfoList[index]->FileNameL();
+	    TPtrC calendarNamePtr = iCalendarInfoList[index]->NameL();
+	        
+	    //We dont want default calendar PhoneCalendar tobe shown in calendarui.
+	    if(fileNamePtr.CompareF(KCalendarDatabaseFilePath) 
+	                && calendarNamePtr.CompareF(KPhoneCalendarName))
+	            {
+                aCalendarInfoList.AppendL(iCalendarInfoList[index]);
+	            }
 	    }
 	
 	TRACE_EXIT_POINT;
--- a/calendarui/globaldata/src/calensend.cpp	Fri Mar 12 15:42:35 2010 +0200
+++ b/calendarui/globaldata/src/calensend.cpp	Mon Mar 15 12:40:18 2010 +0200
@@ -262,7 +262,9 @@
         CMessageData* messageData = CMessageData::NewL();
         CleanupStack::PushL( messageData );
         messageData->SetBodyTextL( text );
+        iISEditorOpen = ETrue;
         iSendUi->CreateAndSendMessageL( iSelectedMtmUid, messageData, KMsgBioUidVCalendar, ETrue );
+        iISEditorOpen = EFalse;
         CleanupStack::PopAndDestroy(); // messagedata
         CleanupStack::PopAndDestroy(bufCnv);
         }
@@ -273,6 +275,23 @@
     }
 
 // ---------------------------------------------------------
+// CCalenSend::IsMessagingEditorOpen
+// Prcess "Send As" for attachment file
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+
+EXPORT_C TBool CCalenSend::IsMessagingEditorOpen()
+    {
+    TRACE_ENTRY_POINT;
+    
+    return iISEditorOpen;
+    
+    TRACE_EXIT_POINT;
+    }
+
+
+// ---------------------------------------------------------
 // CCalenSend::DoSendAsAttachmentFileL
 // Prcess "Send As" for attachment file
 // (other items were commented in a header).
@@ -285,7 +304,9 @@
     CMessageData* messageData = CMessageData::NewL();
     CleanupStack::PushL( messageData );
     messageData->AppendAttachmentL( aFilename.FullName() );
+    iISEditorOpen = ETrue;
     iSendUi->CreateAndSendMessageL( iSelectedMtmUid, messageData, KMsgBioUidVCalendar, ETrue );
+    iISEditorOpen = EFalse;
     CleanupStack::PopAndDestroy(); // messagedata
     
     TRACE_EXIT_POINT;
@@ -304,7 +325,9 @@
     CMessageData* messageData = CMessageData::NewL();
     CleanupStack::PushL( messageData );
     messageData->AppendAttachmentHandleL(aHandle);
+    iISEditorOpen = ETrue;
     iSendUi->CreateAndSendMessageL( iSelectedMtmUid, messageData, KMsgBioUidVCalendar, ETrue );
+    iISEditorOpen = EFalse;
     CleanupStack::PopAndDestroy( messageData );
     
     TRACE_EXIT_POINT;
--- a/calendarui/multicaluidialog/src/caldblistboxitemdrawer.cpp	Fri Mar 12 15:42:35 2010 +0200
+++ b/calendarui/multicaluidialog/src/caldblistboxitemdrawer.cpp	Mon Mar 15 12:40:18 2010 +0200
@@ -105,7 +105,7 @@
      
 	 // Ggetting the layout for clolourstrips for list dialog
 	 TAknWindowComponentLayout tempLayout = 
-             AknLayoutScalable_Apps::list_cale_time_pane_g6( aItemIndex ) ;     
+             AknLayoutScalable_Apps::list_cale_time_pane_g6( aItemIndex - iListBox->TopItemIndex() ) ;     
 
      TAknLayoutRect colourstrips;
      colourstrips.LayoutRect( actualItemRect, tempLayout.LayoutLine() );
--- a/calendarui/multicaluidialog/src/multicaluidialogmodel.cpp	Fri Mar 12 15:42:35 2010 +0200
+++ b/calendarui/multicaluidialog/src/multicaluidialogmodel.cpp	Mon Mar 15 12:40:18 2010 +0200
@@ -26,6 +26,8 @@
 #include "multicaluidialogmodel.h"
 #include "calendarui_debug.h"
 
+_LIT( KCalendarDatabaseFilePath, "c:calendar" );
+
 // ----------------------------------------------------------------------------
 // CMultiCalUiDialogModel::CMultiCalUiDialogModel
 // Constructor
@@ -148,7 +150,7 @@
         {
         iCalendarStatus.Append(0);
 
-        if (!index) //First create the default session
+       /* if (!index) //First create the default session
             {
             const TPtrC name = iCalendarInfoList[index]->FileNameL();
             defaultSession->OpenL(name);
@@ -158,7 +160,7 @@
             iCalEntryViewArray.Append(entryView);
             CleanupStack::Pop(entryView);
             }
-        else
+        else*/
             {
             CCalSession* session = CCalSession::NewL(*defaultSession);
             CleanupStack::PushL(session);
@@ -234,19 +236,19 @@
     TRACE_ENTRY_POINT
     //Create copy for entires.
     RPointerArray<CCalEntry> copyEntries;
-    CreateCopyL(copyEntries);
-
     //Store the copy into calendars
     for (TInt i = 0; i < iCalEntryViewArray.Count(); i++)
         {
         if (iCalendarStatus[i])
             {
-            TInt numSuccess;
+            TInt numSuccess;            
+            CreateCopyL(copyEntries);
             iCalEntryViewArray[i]->StoreL(copyEntries, numSuccess);
+            copyEntries.ResetAndDestroy();
             }
         }
 
-    copyEntries.ResetAndDestroy();
+    
     TRACE_EXIT_POINT;
     }
 
@@ -305,7 +307,15 @@
     CCalCalendarInfo* calendarInfo = calIter->FirstL();
     while (calendarInfo)
         {
-        aCalendarInfoList.AppendL(calendarInfo);
+        TPtrC fileNamePtr = calendarInfo->FileNameL();
+        if(fileNamePtr.CompareF(KCalendarDatabaseFilePath))
+           {
+           aCalendarInfoList.AppendL(calendarInfo);
+           }
+        else
+           {
+           delete calendarInfo;
+           }
         calendarInfo = calIter->NextL();
         }
     CleanupStack::PopAndDestroy(calIter);
--- a/calendarui/organizerplugin/aiagendapluginengine/src/CalenEngine.cpp	Fri Mar 12 15:42:35 2010 +0200
+++ b/calendarui/organizerplugin/aiagendapluginengine/src/CalenEngine.cpp	Mon Mar 15 12:40:18 2010 +0200
@@ -188,7 +188,7 @@
     for(CCalCalendarInfo* calendarInfo = calIter->FirstL() ;
         calendarInfo != NULL ; calendarInfo = calIter->NextL() )
         {
-        if(calendarInfo->Enabled())
+        if(calendarInfo->Enabled() && calendarInfo->FileNameL().CompareF(_L("c:Calendar")))
             {
             TCalInfo calInfo;
             calInfo.iFileName = calendarInfo->FileNameL();
--- a/calendarui/server/CalenSvr/src/CalenServer.cpp	Fri Mar 12 15:42:35 2010 +0200
+++ b/calendarui/server/CalenSvr/src/CalenServer.cpp	Mon Mar 15 12:40:18 2010 +0200
@@ -51,6 +51,7 @@
 
 
 const TInt KComma( ',' );
+_LIT(KPhoneCalendarName,"PhoneCalendar");
 
 // ================= MEMBER FUNCTIONS =======================
 //
@@ -337,6 +338,7 @@
             {
             TBuf<KMaxFileName> calendarFileName;
             calendarFileName.Append(KCalendarDatabaseFilePath);
+            calendarInfo->SetEnabled(EFalse);
             TRAPD(error,session->CreateCalFileL(calendarFileName,*calendarInfo));
 			User::LeaveIfError(error);
             }
@@ -377,10 +379,14 @@
     
     BaflUtils::NearestLanguageFile( fsSession, resourceFileName );
     
-   // __PRINT(" resourcefileName : %s" , resourceFileName );
-
     resourceFile.OpenL(fsSession, resourceFileName );
     resourceFile.ConfirmSignatureL( 0 );
+    
+    //Phone calendar 
+       HBufC* phoneCalendarBuffer = KPhoneCalendarName().AllocLC();
+       aCalendarNames.AppendL(phoneCalendarBuffer->Des());
+       CleanupStack::PopAndDestroy( phoneCalendarBuffer );
+        
     // personal
         HBufC8* personalBuffer = resourceFile.AllocReadLC( R_CALE_DB_PERSONAL );    
        const TPtrC16 ptrPBuffer(( TText16*) personalBuffer->Ptr(),
@@ -465,6 +471,10 @@
     
     TPtrC marker = aRepositoryBuffer;
     TInt calendarColorOffset;
+    
+    //For phone calendar 
+    aCalendarColors.Append(KRgbRed.Value());
+    
     while ((calendarColorOffset = marker.Locate(TChar(KComma)))
             != KErrNotFound)
         {
--- a/calendarui/settings/settingsui/group/calensettingsui.mmp	Fri Mar 12 15:42:35 2010 +0200
+++ b/calendarui/settings/settingsui/group/calensettingsui.mmp	Mon Mar 15 12:40:18 2010 +0200
@@ -76,6 +76,7 @@
 LIBRARY             eikcoctl.lib
 LIBRARY             eikctl.lib 
 LIBRARY             euser.lib
+LIBRARY             featdiscovery.lib
 LIBRARY             featmgr.lib
 LIBRARY             filelist.lib
 LIBRARY             hlplch.lib
--- a/calendarui/settings/settingsui/src/CalenFileListSettingItem.cpp	Fri Mar 12 15:42:35 2010 +0200
+++ b/calendarui/settings/settingsui/src/CalenFileListSettingItem.cpp	Mon Mar 15 12:40:18 2010 +0200
@@ -35,12 +35,13 @@
 
 #include <ProfileEngineDomainConstants.h>
 #include <StringLoader.h>
+#include <featdiscovery.h> // CFeatureDiscovery
+#include <ProfileEngineDomainCRKeys.h> // KCRUidProfileEngine / KProEngRingingToneMaxSize
 
 // PathInfo for concatenating resource
 #include <pathinfo.h>
 // KDC_RESOURCE_DIR definition
 #include <data_caging_path_literals.hrh>
-
 #include <mediafilelist.h>
 
 
@@ -230,9 +231,26 @@
     // Make sure that iOffToneFile is passed, in case iToneFile happens to be KNullDesC
     ASSERT(!IsEmpty(iToneFile));
     
+    // Do not show items over the file size limit, if configured.
+    if ( CFeatureDiscovery::IsFeatureSupportedL(
+         KFeatureIdFfLimitedMessageAndAlarmToneSize ) )
+        {
+         // Max file size allowed (in KB).  0 == no limit.
+        TInt fileSizeLimit = 0;
+        CRepository* profilesCenRep = CRepository::NewLC( KCRUidProfileEngine );
+
+        // Reading the repository should not fail, but if it does, the default
+        // value we have for the file size limit is acceptable.
+        profilesCenRep->Get( KProEngRingingToneMaxSize, fileSizeLimit ); // codescanner::crepository
+        CleanupStack::PopAndDestroy( profilesCenRep );
+
+        if ( fileSizeLimit > 0 )
+            {
+            filelist->SetMaxFileSize( fileSizeLimit * KKilo );
+            }
+        }
     TBool ok( filelist->LaunchL( iToneFile, *iPopupHeader ) );
 
-
     CleanupStack::PopAndDestroy( filelist ); // filelist
 #else
     CMediaFileList* list = CMediaFileList::NewL();
@@ -251,9 +269,27 @@
             CMediaFileList::EMediaFileTypeAudio,
             CMediaFileList::ENullItemIconOff);
     
-    list->SetAttrL(CMediaFileList::EAttrExcludeMimeType, CMediaFileList::EMediaFileTypeVideo);
+    list->SetAttrL(CMediaFileList::EAttrExcludeFolder, CMediaFileList::EMediaFileTypeVideo);
     list->SetAttrL(CMediaFileList::EAttrAutomatedType, CDRMHelper::EAutomatedTypeCalendarAlarm);
-    
+
+    // Do not show items over the file size limit, if configured.
+    if ( CFeatureDiscovery::IsFeatureSupportedL(
+         KFeatureIdFfLimitedMessageAndAlarmToneSize ) )
+        {
+        // Max file size allowed (in KB).  0 == no limit.
+        TInt fileSizeLimit = 0;
+        CRepository* profilesCenRep = CRepository::NewLC( KCRUidProfileEngine );
+
+        // Reading the repository should not fail, but if it does, the default
+        // value we have for the file size limit is acceptable.
+        profilesCenRep->Get( KProEngRingingToneMaxSize, fileSizeLimit ); // codescanner::crepository
+        CleanupStack::PopAndDestroy( profilesCenRep );
+
+        if ( fileSizeLimit > 0 )
+            {
+            list->SetAttrL( CMediaFileList::EAttrFileSize, fileSizeLimit );
+            }
+        }
     // Make sure that iOffToneFile is passed, in case iToneFile happens to be KNullDesC
     ASSERT(!IsEmpty(iToneFile));
     
@@ -263,13 +299,13 @@
     
     CleanupStack::PopAndDestroy(list);    
 #endif
-    
-    if (ok)
+    if( ok )
         {
         iAlarmSoundChanged = ETrue;
         StoreL();
-        UpdateListBoxTextL();
+        UpdateListBoxTextL(); 
         }
+
     
     TRACE_EXIT_POINT;
     }
--- a/calendarui/settings/settingsui/src/calensettingsuicontainer.cpp	Fri Mar 12 15:42:35 2010 +0200
+++ b/calendarui/settings/settingsui/src/calensettingsuicontainer.cpp	Mon Mar 15 12:40:18 2010 +0200
@@ -659,6 +659,9 @@
     // Construct setting item with parametrized values
     HBufC* itemTitle = StringLoader::LoadLC( R_CALEN_SETTING_DEFAULTMAILBOX_TITLE );
     // The resources loaded up here are empty as the items need to be dynamically updated.
+    
+    settingItem->SetEmptyItemTextL( KNullDesC );
+    
     settingItem->ConstructL( EFalse, aOrdinal, *itemTitle, NULL,
                              R_CALEN_SETTING_DEFAULTMAILBOX, EAknCtPopupSettingList,
                              NULL, R_CALEN_EMPTY_POPUP_SETTING_TEXTS );
@@ -788,7 +791,7 @@
 
     // Always add this in. We will set it hidden when it's not needed (i.e. when the
     // week start is set to anything other than "Monday") at the bottom of this function.
-    AddBinaryItemL( iWeekTitle,
+    AddEnumerationItemL( iWeekTitle,
                          ECalenWeekTitleItemId,
                          R_CALEN_SETTING_WEEKTITLE_TITLE,
                          R_CALEN_SETTING_WEEKTITLE,
@@ -1007,7 +1010,12 @@
          // Open edit dialog if EAknCmdOpen, invert the value otherwise
         aPageStatus = ETrue;
         iPageStatus = aPageStatus;
-        item->EditItemL( aCommand == EAknCmdOpen );
+        // for week title only two options available
+        // so let's toggle instead of opening setting page
+        if( item->Identifier() != ECalenWeekTitleItemId )
+            {
+            item->EditItemL( aCommand == EAknCmdOpen );
+            }
         aPageStatus = EFalse;
         iPageStatus = aPageStatus;
         TBool isNativeSettingChange = ETrue;
@@ -1036,8 +1044,13 @@
                     iSetting->SetDefaultView( TUid::Uid( iDefView ) );
                     break;
                 case ECalenWeekTitleItemId:
-                    item->StoreL();
-                    iSetting->SetWeekTitle( static_cast<TCalenWeekTitle>( iWeekTitle ) );
+					//item->StoreL();
+                    // toggling option done here
+                    iSetting->SetWeekTitle( static_cast<TCalenWeekTitle>( iWeekTitle ) == EWeekTitleNumber ?
+                            EWeekTitleDuration  : EWeekTitleNumber );
+                    iWeekTitle = iSetting->WeekTitle();
+                    item->LoadL();
+                    item->UpdateListBoxTextL();
                     break;
                 case ECalenDefaultMailboxId:
                     item->StoreL();
--- a/calendarui/views/inc/calendayview.h	Fri Mar 12 15:42:35 2010 +0200
+++ b/calendarui/views/inc/calendayview.h	Mon Mar 15 12:40:18 2010 +0200
@@ -124,12 +124,7 @@
     
     TUid Id() const;
 	
-	/**
-     * Enable the copy functionality for the entries 
-	  *.to single aur multiple calendars.    
-     */
-    
-    void CopyToCalendarsL();
+	
     
 private:  // From MEikMenuObserver
     /**
--- a/calendarui/views/inc/calennativeview.h	Fri Mar 12 15:42:35 2010 +0200
+++ b/calendarui/views/inc/calennativeview.h	Mon Mar 15 12:40:18 2010 +0200
@@ -262,6 +262,12 @@
     * @see MEikMenuObserver.
     */
     void DynInitMenuBarL( TInt aResourceId, CEikMenuBar* aMenuBar );
+    
+    /**
+    * @brief copies the calendar entry to respective calendar.
+    */
+    void CopyToCalendarsL();
+    
 
 protected:  // New functions
     /**
@@ -347,6 +353,18 @@
      * From CAknView View deactivation handler
      */
     void DoDeactivate();
+    
+    /**
+    * @brief asynchronous call back for copy to calendar functionality.
+    *        added because of err VGGG-82X8TV . 
+    * 
+    */
+    static TInt AsyncCopyToCalendarsL(TAny* aThisPtr);
+
+    /**
+    * @brief called from AsyncCopyToCalendarsL
+    */
+    void CopyEntryToCalendarsL();
 
 protected:  // Data
     CCalenContainer*                iContainer;
@@ -380,6 +398,8 @@
      * @brief ETrue if some command handling is under progress, EFalse otherwise
      */
     TBool iCommandProcessing;
+    
+    CAsyncCallBack* iAsyncCallback; 
     };
 
 #endif  // CALENNATIVEVIEW_H
--- a/calendarui/views/inc/calentodoview.h	Fri Mar 12 15:42:35 2010 +0200
+++ b/calendarui/views/inc/calentodoview.h	Mon Mar 15 12:40:18 2010 +0200
@@ -216,12 +216,7 @@
          **/
         TInt ShowMarkedTodosDeleteConfirmationQueryL( TInt aCount );
 		
-		/**
-         * Enable the functionlity of copying entries to one or more calendars.         
-         **/
-        
-        void CopyToCalendarsL();
-
+	
     private:
         /**
          * Static callback function
--- a/calendarui/views/src/calendaylistboxview.cpp	Fri Mar 12 15:42:35 2010 +0200
+++ b/calendarui/views/src/calendaylistboxview.cpp	Mon Mar 15 12:40:18 2010 +0200
@@ -234,7 +234,7 @@
             TInt nextCell(LastLineOfCell(iCurrentItemIndex) + 1);
 
         if ( !( iItemDrawer->Flags()
-                & CTextListItemDrawer::EDisableHighlight )
+                & CTextListItemDrawer::ESingleClickDisabledHighlight  )
                 && aItemIndex < nextCell )
             {
             highlight = ETrue;
--- a/calendarui/views/src/calendayview.cpp	Fri Mar 12 15:42:35 2010 +0200
+++ b/calendarui/views/src/calendayview.cpp	Mon Mar 15 12:40:18 2010 +0200
@@ -503,52 +503,6 @@
     TRACE_EXIT_POINT;
     return KUidCalenDayView;
     }
-
-// ----------------------------------------------------------------------------
-// CCalenDayView::CopytoCalendarsL
-// From CAknView
-// Return the UID of the day view
-// (other items were commented in a header)
-// ----------------------------------------------------------------------------
-//
-void CCalenDayView::CopyToCalendarsL()
-    {
-
-    // Hide the toolbar before we display settings menu
-    MCalenToolbar* toolbar = iServices.ToolbarOrNull();
-    if(toolbar)
-        {
-        toolbar->SetToolbarVisibilityL(EFalse);  
-        }
-    iSPUtils->UnderLineTitleText( EFalse );
-    MCalenContext& context = iServices.Context();
-    TCalLocalUid instanceId = context.InstanceId().iEntryLocalUid;
-            
-    CCalEntry* entry = iServices.EntryViewL(context.InstanceId().iColId)->FetchL(instanceId);
-    CleanupStack::PushL(entry);
-    
-    RPointerArray<CCalEntry> calentryArray;
-    calentryArray.Append( entry );
-    
-    // Launch the Calendar List Dialiog.
-    CMultiCalUiDialog* calenDbListDialog = CMultiCalUiDialog::NewLC(calentryArray, ETrue);
-    TInt err = KErrNone;
-    // Execute.
-    TRAP( err,calenDbListDialog->LaunchL() );
-    CleanupStack::PopAndDestroy( calenDbListDialog );
-    
-    iSPUtils->UnderLineTitleText( EFalse );
-    // Unhide the toolbar when settings is closed
-    if(toolbar)
-        {
-        toolbar->SetToolbarVisibilityL(ETrue); 
-        }
-    CleanupStack::Pop(entry);
-    calentryArray.ResetAndDestroy();    
-    
-    BeginRepopulationL();
-    }
-
 // ----------------------------------------------------------------------------
 // CCalenDayView::ClearViewSpecificDataL
 // Clears any cached data for the specific view, e.g. currently
--- a/calendarui/views/src/caleneventview.cpp	Fri Mar 12 15:42:35 2010 +0200
+++ b/calendarui/views/src/caleneventview.cpp	Mon Mar 15 12:40:18 2010 +0200
@@ -37,6 +37,7 @@
 #include "calendar.hrh"
 #include <finditem.hrh>
 #include <finditemmenu.h>
+#include "calenattachmentmodel.h" 
 
 // Button position of the MSK CBA button
 const TInt KSK2CBAPosition = 2;
@@ -280,7 +281,12 @@
 void CCalenEventView::DoDeactivateImpl()
     {
     TRACE_ENTRY_POINT;
-    
+    // After forced exit need to Reset CCalenAttachmentModel 
+    //to refresh the model after opening the calender next time
+    if (iServices.GetAttachmentData()->NumberOfItems()) 
+        {
+        iServices.GetAttachmentData()->Reset();
+        }
     iPreviousViewId.iViewUid = KNullUid;
 
     // Remove the toolbar buttons for event viewer before exiting from event view
--- a/calendarui/views/src/caleneventviewcontainer.cpp	Fri Mar 12 15:42:35 2010 +0200
+++ b/calendarui/views/src/caleneventviewcontainer.cpp	Mon Mar 15 12:40:18 2010 +0200
@@ -680,6 +680,7 @@
         
     iTextEditor->SetFocus(EFalse);    
     iTextEditor->SetRect( Rect() );
+    iTextEditor->SetCursorPosL(0,EFalse);
     iTextEditor->RichText()->Reset();
     
     // Create the scroll bars.
@@ -861,6 +862,11 @@
             {
             // date field
             AddDateFieldL(iEventViewData->StartDateTime());
+            
+            // against the location field in the viewer
+            iTimeFieldLines = 1;
+            // location
+            AddLocationFieldL();
     		
             // Adds empty line
             AddEmptyLineL();
@@ -899,6 +905,13 @@
 				AddDateDateFieldL( startTime, endTime );
 				}
 
+			// Increment the time filed count to 1 so that maps icon is placed
+			// against the location field in the viewer
+                    iTimeFieldLines = 1;
+			
+			// location
+                    AddLocationFieldL();
+            
 		    // extra empty line between primary and secondary information
 		    AddEmptyLineL();
 		    
--- a/calendarui/views/src/calennativeview.cpp	Fri Mar 12 15:42:35 2010 +0200
+++ b/calendarui/views/src/calennativeview.cpp	Mon Mar 15 12:40:18 2010 +0200
@@ -43,6 +43,8 @@
 #include <calsession.h>
 #include <calenviewutils.h>
 #include <calcalendarinfo.h>
+#include <caleninstanceid.h>            // TCalenInstanceId
+
 
 #include "calendarui_debug.h"           // Debug.
 #include "CalendarVariant.hrh"
@@ -56,6 +58,7 @@
 #include "calendar.hrh"
 #include "CalenUid.h"
 #include "CalendarPrivateCRKeys.h"
+#include "multicaluidialog.h"
 
 const TInt KAbbreviatedWeekNames[] =
     {
@@ -113,6 +116,13 @@
     
     delete iSPUtils;
 
+    if( iAsyncCallback )
+        {
+        iAsyncCallback->Cancel();
+        delete iAsyncCallback;
+        iAsyncCallback = NULL;
+        }
+    
     TRACE_EXIT_POINT;
     }
 
@@ -511,6 +521,143 @@
     }
 
 // ----------------------------------------------------------------------------
+// CCalenNativeView::CopytoCalendarsL
+// From CAknView
+// Return the UID of the day view
+// (other items were commented in a header)
+// ----------------------------------------------------------------------------
+//
+void CCalenNativeView::CopyToCalendarsL()
+    {
+    TRACE_ENTRY_POINT;
+    
+    iAsyncCallback->CallBack();
+    
+    TRACE_EXIT_POINT;
+    }
+
+// ----------------------------------------------------------------------------
+// CCalenNativeView::AsyncCopyToCalendarsL
+// From CAknView
+// Return the UID of the day view
+// (other items were commented in a header)
+// ----------------------------------------------------------------------------
+//
+TInt CCalenNativeView::AsyncCopyToCalendarsL( TAny* aThisPtr )
+    {
+    TRACE_ENTRY_POINT;
+    
+    static_cast<CCalenNativeView*>(aThisPtr)->CopyEntryToCalendarsL();
+    
+    TRACE_EXIT_POINT;
+    return 0;
+
+    }
+
+// ----------------------------------------------------------------------------
+// CCalenNativeView::CopyEntryToCalendarsL
+// From CAknView
+// Return the UID of the day view
+// (other items were commented in a header)
+// ----------------------------------------------------------------------------
+//
+void CCalenNativeView::CopyEntryToCalendarsL()
+    {
+    TRACE_ENTRY_POINT;
+    
+    // Create settings own titlepane and navipane, and swap with existing ones
+    CEikStatusPane* sp = CEikonEnv::Static()->AppUiFactory()->StatusPane();
+
+    // Hide the toolbar before we display settings menu
+    MCalenToolbar* toolbar = iServices.ToolbarOrNull();
+    if(toolbar)
+        {
+        toolbar->SetToolbarVisibilityL(EFalse);  
+        }
+    iSPUtils->UnderLineTitleText( EFalse );
+
+    // Titlepane
+    CAknTitlePane* newtp = new( ELeave ) CAknTitlePane();
+    CleanupStack::PushL( newtp );
+    CCoeControl* oldtp = sp->SwapControlL( TUid::Uid(EEikStatusPaneUidTitle), newtp );
+    CleanupStack::Pop( newtp ); // ownership is passed to statuspane
+    TRect oldRect( 0, 0, 0, 0 );
+    if( oldtp )
+        {
+        CleanupStack::PushL( oldtp );
+        oldRect = oldtp->Rect();
+        CCoeControl* ctrl = sp->ContainerControlL( TUid::Uid( EEikStatusPaneUidTitle ));
+        newtp->SetContainerWindowL( *ctrl );
+        newtp->ConstructL();
+        newtp->SetRect(oldRect);
+        newtp->ActivateL();
+        }        
+
+    // NaviPane
+    CAknNavigationControlContainer* newnp = new( ELeave )CAknNavigationControlContainer();
+    CleanupStack::PushL( newnp );
+    CCoeControl* oldnp = sp->SwapControlL( TUid::Uid( EEikStatusPaneUidNavi ), newnp );
+    CleanupStack::Pop( newnp ); // ownership is passed to statuspane
+    if( oldnp )
+        {
+        CleanupStack::PushL( oldnp );
+        oldRect = oldnp->Rect();
+        CCoeControl* ctrl = sp->ContainerControlL( TUid::Uid( EEikStatusPaneUidNavi ) );
+        newnp->SetContainerWindowL( *ctrl );
+        newnp->ConstructL();
+        newnp->SetRect( oldRect );
+        newnp->PushDefaultL();
+        newnp->ActivateL();
+        }
+
+    MCalenContext& context = iServices.Context();
+    TCalLocalUid instanceId = context.InstanceId().iEntryLocalUid;
+
+    CCalEntry* entry = iServices.EntryViewL(context.InstanceId().iColId)->FetchL(instanceId);
+    CleanupStack::PushL(entry);
+
+    RPointerArray<CCalEntry> calentryArray;
+    calentryArray.Append( entry );
+
+    // Launch the Calendar List Dialiog.
+    CMultiCalUiDialog* calenDbListDialog = CMultiCalUiDialog::NewLC(calentryArray, EFalse);
+    TInt err = KErrNone;
+    // Execute.
+    TRAP( err,calenDbListDialog->LaunchL() );
+    CleanupStack::PopAndDestroy( calenDbListDialog );
+
+    iSPUtils->UnderLineTitleText( EFalse );
+    // Unhide the toolbar when settings is closed
+    if(toolbar)
+        {
+        toolbar->SetToolbarVisibilityL(ETrue); 
+        }
+    
+    CleanupStack::Pop(entry);
+    calentryArray.ResetAndDestroy(); 
+    
+    // When setting is closed, swap back old titlepane and navipane
+    if( oldnp && sp->SwapControlL( TUid::Uid(EEikStatusPaneUidNavi), oldnp ) )
+        {
+        CleanupStack::Pop( oldnp );
+        delete newnp;
+        oldnp->ActivateL();
+        }
+
+    if( oldtp && sp->SwapControlL( TUid::Uid(EEikStatusPaneUidTitle), oldtp ) )
+        {
+        CleanupStack::Pop( oldtp );
+        delete newtp;
+        oldtp->ActivateL();
+        }
+    
+    BeginRepopulationL();
+    
+    TRACE_EXIT_POINT;
+    
+    }
+
+// ----------------------------------------------------------------------------
 // C++ constructor can NOT contain any code, that
 // might leave.
 // ----------------------------------------------------------------------------
@@ -566,6 +713,8 @@
     notificationArray.Reset();
     
     iCommandProcessing = EFalse;
+    TCallBack callback(CCalenNativeView::AsyncCopyToCalendarsL,this);
+    iAsyncCallback = new(ELeave) CAsyncCallBack(callback,CActive::EPriorityStandard);
 
     TRACE_EXIT_POINT;
     }
--- a/calendarui/views/src/calentodoview.cpp	Fri Mar 12 15:42:35 2010 +0200
+++ b/calendarui/views/src/calentodoview.cpp	Mon Mar 15 12:40:18 2010 +0200
@@ -906,50 +906,6 @@
            ( iHighlightedRowNumber == KErrNotFound );
     }
 
-// ----------------------------------------------------------------------------
-// CCalenTodoView::CopyToCalendarsL
-// 
-// (other items were commented in a header)
-// ----------------------------------------------------------------------------
-//
-void CCalenTodoView::CopyToCalendarsL()
-    {
-    
-    // Hide the toolbar before we display settings menu
-       MCalenToolbar* toolbar = iServices.ToolbarOrNull();
-       if(toolbar)
-           {
-           toolbar->SetToolbarVisibilityL(EFalse);  
-           }
-
-       MCalenContext& context = iServices.Context();
-       TCalLocalUid instanceId = context.InstanceId().iEntryLocalUid;
-               
-       CCalEntry* entry = iServices.EntryViewL(context.InstanceId().iColId)->FetchL(instanceId);
-       CleanupStack::PushL(entry);
-       
-       RPointerArray<CCalEntry> entryArray;
-       entryArray.Append(entry);
-       
-       
-       // Launch the Calendar List Dialiog.
-       CMultiCalUiDialog* multiCalUiDialog = CMultiCalUiDialog::NewLC(entryArray , ETrue );
-       TInt err = KErrNone;
-       // Execute.
-       TRAP( err,multiCalUiDialog->LaunchL() );
-       CleanupStack::PopAndDestroy( multiCalUiDialog );
-       
-       // Unhide the toolbar when settings is closed
-       if(toolbar)
-           {
-           toolbar->SetToolbarVisibilityL(ETrue); 
-           }
-       
-       CleanupStack::Pop(entry);
-       entryArray.ResetAndDestroy();
-       
-       BeginRepopulationL();
-    }
 
 
 // ----------------------------------------------------------------------------
--- a/clock2/clockui/uilayer/clkdatetimeview/group/clkdatetimeview.mmp	Fri Mar 12 15:42:35 2010 +0200
+++ b/clock2/clockui/uilayer/clkdatetimeview/group/clkdatetimeview.mmp	Mon Mar 15 12:40:18 2010 +0200
@@ -70,6 +70,7 @@
 LIBRARY         efsrv.lib
 LIBRARY			avkon.lib
 LIBRARY         hlplch.lib
+LIBRARY         featdiscovery.lib
 LIBRARY         featmgr.lib
 LIBRARY			drmhelper.lib
 LIBRARY 		tzclient.lib
--- a/clock2/clockui/uilayer/clkdatetimeview/src/clkdatetimeview.cpp	Fri Mar 12 15:42:35 2010 +0200
+++ b/clock2/clockui/uilayer/clkdatetimeview/src/clkdatetimeview.cpp	Mon Mar 15 12:40:18 2010 +0200
@@ -54,6 +54,8 @@
 #include <ProfileEngineDomainConstants.h>
 #include <clock.rsg>
 #include <AknGlobalNote.h>
+#include <featdiscovery.h>
+#include <ProfileEngineDomainCRKeys.h>
 
 // User Includes
 #include "clkuiclksrvmodel.h"
@@ -2448,7 +2450,24 @@
 	// Do not show videos.
 	alarmToneList->AddExclusiveMediaTypeL( ECLFMediaTypeVideo );
 	alarmToneList->SetAutomatedType( CDRMHelper::EAutomatedTypeClockAlarm );
-	
+    // Do not show items over the file size limit, if configured.
+    if ( CFeatureDiscovery::IsFeatureSupportedL(
+         KFeatureIdFfLimitedMessageAndAlarmToneSize ) )
+        {
+         // Max file size allowed (in KB).  0 == no limit.
+        TInt fileSizeLimit = 0;
+        CRepository* profilesCenRep = CRepository::NewLC( KCRUidProfileEngine );
+
+        // Reading the repository should not fail, but if it does, the default
+        // value we have for the file size limit is acceptable.
+        profilesCenRep->Get( KProEngRingingToneMaxSize, fileSizeLimit ); // codescanner::crepository
+        CleanupStack::PopAndDestroy( profilesCenRep );
+
+        if ( fileSizeLimit > 0 )
+            {
+            alarmToneList->SetMaxFileSize( fileSizeLimit * KKilo );
+            }
+        }
 	// Launch the list. ETrue is returned if OK is pressed. EFalse otherwise.
     if( alarmToneList->LaunchL( iAlarmToneName, *iToneListHeader ) )
 		{
--- a/notepad/notepad1/LibSrc/NpdEdwinBase.cpp	Fri Mar 12 15:42:35 2010 +0200
+++ b/notepad/notepad1/LibSrc/NpdEdwinBase.cpp	Mon Mar 15 12:40:18 2010 +0200
@@ -32,6 +32,10 @@
 #include <aknlayoutscalable_apps.cdl.h>
 #include <aknappui.h>
 #include <NpdLib.rsg>
+#ifdef RD_SCALABLE_UI_V2
+#include <akntoolbar.h> 
+#include <eikcolib.h>
+#endif
 
 #include "NpdEdwin.h"
 #include "NpdRichTextEditor.h"
@@ -110,7 +114,25 @@
 	TRect mainPane(TPoint(0, 0), tempMainPane.Size());
 	mainNotesPane.LayoutRect(mainPane, AknLayoutScalable_Apps::main_notes_pane().LayoutLine());
 	lineLayout.LayoutRect(mainNotesPane.Rect(),AknLayoutScalable_Apps::list_notes_pane().LayoutLine());
-	TAknLayoutScalableParameterLimits textLimits =AknLayoutScalable_Apps::list_notes_text_pane_ParamLimits();
+	TAknLayoutScalableParameterLimits textLimits; 
+	TBool isShowToolbar = EFalse;
+#ifdef RD_SCALABLE_UI_V2
+    CEikAppUiFactory* appUiFactory 
+        = static_cast<CEikAppUiFactory*>( CEikonEnv::Static()->AppUiFactory() );
+    CAknToolbar* oldFixedToolbar = appUiFactory->CurrentFixedToolbar();
+    if ( oldFixedToolbar != NULL )
+        {
+        isShowToolbar = oldFixedToolbar->IsShown();
+        }
+#endif
+    if ( isShowToolbar )
+        {
+        textLimits = AknLayoutScalable_Apps::list_notes_text_pane_ParamLimits(1);
+        }
+    else
+        {
+        textLimits =AknLayoutScalable_Apps::list_notes_text_pane_ParamLimits();
+        }
 	RArray<TAknTextComponentLayout> layouts;
 	for (TInt i = 0; i < textLimits.LastRow()+1 ; i++)
     		{
@@ -352,7 +374,7 @@
 		TRect tempMainPane;
         	AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane,tempMainPane);
 		TRect mainPane(TPoint(0, 0), tempMainPane.Size());
-		TAknWindowLineLayout scrollPane = AknLayoutScalable_Apps::scroll_pane_cp06().LayoutLine();
+        TAknWindowLineLayout scrollPane = AknLayoutScalable_Apps::scroll_pane_cp05(0).LayoutLine();
 		mainNotesPane.LayoutRect(mainPane, AknLayoutScalable_Apps::main_notes_pane().LayoutLine());
         	AknLayoutUtils::LayoutVerticalScrollBar(sbFrame, mainNotesPane.Rect(), scrollPane);
         	}
--- a/notepad/notepad1/LibSrc/NpdPopupList.cpp	Fri Mar 12 15:42:35 2010 +0200
+++ b/notepad/notepad1/LibSrc/NpdPopupList.cpp	Mon Mar 15 12:40:18 2010 +0200
@@ -116,6 +116,11 @@
     if ( !iFinished || *iFinished ) // really finished
         {
         CAknPopupList::AttemptExitL(aAccept);
+        if ( iFlags & ENotepadIsViewDeactivated )
+        	{
+            iEikonEnv->RemoveFromStack(this);
+            CAknEnv::StopSchedulerWaitWithBusyMessage(iWait);	
+        	}        
         }
     else // empty -> non-empty
         {
--- a/organizer_plat/calendar_common_utils_api/tsrc/group/CalendarCommonUtilsTest_DoxyFile.txt	Fri Mar 12 15:42:35 2010 +0200
+++ b/organizer_plat/calendar_common_utils_api/tsrc/group/CalendarCommonUtilsTest_DoxyFile.txt	Mon Mar 15 12:40:18 2010 +0200
@@ -1,8 +1,8 @@
 #
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
+# under the terms of "Eclipse Public License v1.0"
 # which accompanies this distribution, and is available
 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
 #
@@ -10,7 +10,7 @@
 # Nokia Corporation - initial contribution.
 #
 # Contributors:
-# 
+#
 # Description:
 #
 #
--- a/organizer_plat/calendar_custamization_api/inc/calencommands.hrh	Fri Mar 12 15:42:35 2010 +0200
+++ b/organizer_plat/calendar_custamization_api/inc/calencommands.hrh	Mon Mar 15 12:40:18 2010 +0200
@@ -68,6 +68,7 @@
     ECalenNewDayNote,
     ECalenNewReminder,
     ECalenNewMeetingRequest,
+    ECalenNewMeetingTimeSpan,
     ECalenEditCurrentEntry,
     ECalenEditSeries,
     ECalenEditOccurrence,
--- a/organizer_pub/calendar_interim_utils2_api/tsrc/stiff/group/CalenInterimUtils2Test_DoxyFile.txt	Fri Mar 12 15:42:35 2010 +0200
+++ b/organizer_pub/calendar_interim_utils2_api/tsrc/stiff/group/CalenInterimUtils2Test_DoxyFile.txt	Mon Mar 15 12:40:18 2010 +0200
@@ -1,8 +1,8 @@
 #
-# Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+# Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 # All rights reserved.
 # This component and the accompanying materials are made available
-# under the terms of the License "Eclipse Public License v1.0"
+# under the terms of "Eclipse Public License v1.0"
 # which accompanies this distribution, and is available
 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
 #
@@ -10,7 +10,7 @@
 # Nokia Corporation - initial contribution.
 #
 # Contributors:
-# 
+#
 # Description:
 #
 #
--- a/organizer_pub/notepad_library_api/tsrc/.cproject	Fri Mar 12 15:42:35 2010 +0200
+++ b/organizer_pub/notepad_library_api/tsrc/.cproject	Mon Mar 15 12:40:18 2010 +0200
@@ -1,30 +1,30 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?fileVersion 4.0.0?>
-
-<cproject>
-<storageModule buildFromInf="true" buildingTestComps="true" cleanLevel="0" concurrentBuildJobs="4" defaultMMPChangedAction="0" infBuildComponents="" infFileLocation="group\Bld.inf" macrosFile="" manageDependencies="true" moduleId="com.nokia.carbide.cdt.builder.carbideCPPBuilder" overrideWorkspaceSettings="false" promptForMMPChangedAction="true" useConcurrentBuilding="true" useIncrementalBuilder="false" useMMPMacros="true"/>
-<storageModule moduleId="org.eclipse.cdt.core.settings">
-<cconfiguration id="Emulator Debug (WINSCW) [wk34]">
-<storageModule buildSystemId="com.nokia.carbide.cdt.builder.CarbideConfigurationDataProvider" id="Emulator Debug (WINSCW) [wk34]" moduleId="org.eclipse.cdt.core.settings" name="Emulator Debug (WINSCW) [wk34]">
-<externalSettings/>
-<extensions>
-<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
-<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
-<extension id="com.nokia.cdt.debug.cw.symbian.SymbianE32" point="org.eclipse.cdt.core.BinaryParser"/>
-<extension id="com.nokia.carbide.cdt.builder.MakeDefErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="com.nokia.carbide.cdt.builder.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="com.nokia.carbide.cdt.builder.MWLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="com.nokia.carbide.cdt.builder.CarbideMakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="com.nokia.carbide.cdt.builder.RCOMPErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-<extension id="com.nokia.carbide.cdt.builder.MakmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
-</extensions>
-</storageModule>
-<storageModule moduleId="CarbideConfigurationDataProvider">
-<ENV_VAR_DATA_ID/>
-<ARGUMENTS_DATA_ID ABLDFREEZEARGSSTORAGE="-r"/>
-</storageModule>
-<storageModule filesCache="R:\s60\app\organizer\organizer_sdk\notepad_library_api\tsrc\group\TestNpdApi.mmp;R:\s60\app\organizer\organizer_sdk\notepad_library_api\tsrc\group\Bld.inf;R:\epoc32\include\domain\osextensions\platform_paths.hrh;" includesCache="R:/s60/app/organizer/organizer_sdk/notepad_library_api/tsrc/inc[LOCAL];r:/epoc32/include;r:/epoc32/include/oem;r:/epoc32/include/osextensions;r:/epoc32/include/domain/osextensions;r:/epoc32/include/domain/osextensions/loc;r:/epoc32/include/domain/osextensions/loc/sc;r:/epoc32/include/applications;R:/epoc32/include/oem;" macrosCache="__WINSCW__;__SUPPORT_CPP_EXCEPTIONS__;__SYMBIAN32__;_UNICODE;__SERIES60_5x__;_DEBUG;__DLL__;__WINS__;__CW32__;__SERIES60_50__;" moduleId="configDataCache" sourcesCache="/TestNpdApi/inc;/TestNpdApi/src;" timestampCache="1220696835953" useMmpMacrosCache="true"/>
-<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
-</cconfiguration>
-</storageModule>
-</cproject>
+<?xml version="1.0" encoding="UTF-8"?>
+<?fileVersion 4.0.0?>
+
+<cproject>
+<storageModule buildFromInf="true" buildingTestComps="true" cleanLevel="0" concurrentBuildJobs="4" defaultMMPChangedAction="0" infBuildComponents="" infFileLocation="group\Bld.inf" macrosFile="" manageDependencies="true" moduleId="com.nokia.carbide.cdt.builder.carbideCPPBuilder" overrideWorkspaceSettings="false" promptForMMPChangedAction="true" useConcurrentBuilding="true" useIncrementalBuilder="false" useMMPMacros="true"/>
+<storageModule moduleId="org.eclipse.cdt.core.settings">
+<cconfiguration id="Emulator Debug (WINSCW) [wk34]">
+<storageModule buildSystemId="com.nokia.carbide.cdt.builder.CarbideConfigurationDataProvider" id="Emulator Debug (WINSCW) [wk34]" moduleId="org.eclipse.cdt.core.settings" name="Emulator Debug (WINSCW) [wk34]">
+<externalSettings/>
+<extensions>
+<extension id="org.eclipse.cdt.core.PE" point="org.eclipse.cdt.core.BinaryParser"/>
+<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
+<extension id="com.nokia.cdt.debug.cw.symbian.SymbianE32" point="org.eclipse.cdt.core.BinaryParser"/>
+<extension id="com.nokia.carbide.cdt.builder.MakeDefErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.MWLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.CarbideMakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.RCOMPErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+<extension id="com.nokia.carbide.cdt.builder.MakmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
+</extensions>
+</storageModule>
+<storageModule moduleId="CarbideConfigurationDataProvider">
+<ENV_VAR_DATA_ID/>
+<ARGUMENTS_DATA_ID ABLDFREEZEARGSSTORAGE="-r"/>
+</storageModule>
+<storageModule filesCache="R:\s60\app\organizer\organizer_sdk\notepad_library_api\tsrc\group\TestNpdApi.mmp;R:\s60\app\organizer\organizer_sdk\notepad_library_api\tsrc\group\Bld.inf;R:\epoc32\include\domain\osextensions\platform_paths.hrh;" includesCache="R:/s60/app/organizer/organizer_sdk/notepad_library_api/tsrc/inc[LOCAL];r:/epoc32/include;r:/epoc32/include/oem;r:/epoc32/include/osextensions;r:/epoc32/include/domain/osextensions;r:/epoc32/include/domain/osextensions/loc;r:/epoc32/include/domain/osextensions/loc/sc;r:/epoc32/include/applications;R:/epoc32/include/oem;" macrosCache="__WINSCW__;__SUPPORT_CPP_EXCEPTIONS__;__SYMBIAN32__;_UNICODE;__SERIES60_5x__;_DEBUG;__DLL__;__WINS__;__CW32__;__SERIES60_50__;" moduleId="configDataCache" sourcesCache="/TestNpdApi/inc;/TestNpdApi/src;" timestampCache="1220696835953" useMmpMacrosCache="true"/>
+<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
+</cconfiguration>
+</storageModule>
+</cproject>
--- a/organizer_pub/notepad_library_api/tsrc/.project	Fri Mar 12 15:42:35 2010 +0200
+++ b/organizer_pub/notepad_library_api/tsrc/.project	Mon Mar 15 12:40:18 2010 +0200
@@ -1,31 +1,31 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>TestNpdApi</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>com.nokia.carbide.cdt.builder.carbideCPPBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>com.nokia.carbide.cdt.rombuilder.carbideRomBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>com.nokia.s60tools.pclint.pclintAuditor</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.cdt.core.cnature</nature>
-		<nature>org.eclipse.cdt.core.ccnature</nature>
-		<nature>com.nokia.carbide.cdt.builder.carbideCPPBuilderNature</nature>
-		<nature>com.nokia.carbide.cdt.rombuilder.carbideRomBuildNature</nature>
-		<nature>com.nokia.s60tools.pclint.pclintNature</nature>
-	</natures>
-</projectDescription>
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>TestNpdApi</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>com.nokia.carbide.cdt.builder.carbideCPPBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>com.nokia.carbide.cdt.rombuilder.carbideRomBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>com.nokia.s60tools.pclint.pclintAuditor</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.cdt.core.cnature</nature>
+		<nature>org.eclipse.cdt.core.ccnature</nature>
+		<nature>com.nokia.carbide.cdt.builder.carbideCPPBuilderNature</nature>
+		<nature>com.nokia.carbide.cdt.rombuilder.carbideRomBuildNature</nature>
+		<nature>com.nokia.s60tools.pclint.pclintNature</nature>
+	</natures>
+</projectDescription>
--- a/organizer_pub/notepad_library_api/tsrc/group/ABLD.BAT	Fri Mar 12 15:42:35 2010 +0200
+++ b/organizer_pub/notepad_library_api/tsrc/group/ABLD.BAT	Mon Mar 15 12:40:18 2010 +0200
@@ -1,8 +1,8 @@
 rem
-rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+rem Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
 rem All rights reserved.
 rem This component and the accompanying materials are made available
-rem under the terms of the License "Eclipse Public License v1.0"
+rem under the terms of "Eclipse Public License v1.0"
 rem which accompanies this distribution, and is available
 rem at the URL "http://www.eclipse.org/legal/epl-v10.html".
 rem
@@ -11,7 +11,8 @@
 rem
 rem Contributors:
 rem
-rem Description: batch file
+rem Description:
+rem
 rem
 
 @ECHO OFF
--- a/pimappservices/calendar/group/backup_registration.xml	Fri Mar 12 15:42:35 2010 +0200
+++ b/pimappservices/calendar/group/backup_registration.xml	Mon Mar 15 12:40:18 2010 +0200
@@ -1,10 +1,10 @@
 <?xml version="1.0" standalone="yes"?>
 
 <!--
- Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
+ Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
  All rights reserved.
  This component and the accompanying materials are made available
- under the terms of the License "Eclipse Public License v1.0"
+ under the terms of "Eclipse Public License v1.0"
  which accompanies this distribution, and is available
  at the URL "http://www.eclipse.org/legal/epl-v10.html".
 
--- a/pimappservices/calendar/server/src/agsalarm.cpp	Fri Mar 12 15:42:35 2010 +0200
+++ b/pimappservices/calendar/server/src/agsalarm.cpp	Mon Mar 15 12:40:18 2010 +0200
@@ -680,8 +680,15 @@
 	else
 		{
 		aAlarmInfo.iRecurrenceId = entry->RecurrenceId().UtcL();
-		}
-	aAlarmInfo.iGlobalIdentifier = iModel->GetEntryGuidL(*entry);
+		}	
+	
+	// Check the length of the Uid from the entry if it is less than the 
+	// the supported length assign it to the aAlarmInfo.
+	// as per the RFC we are supporting 256 chars most of  app UID is within this range
+	// in future if anyone supports more than this length we need to handle this here .
+	if (iModel->GetEntryGuidL(*entry).Length() <= KAgnEntryMaxGuidLength)	    
+	    aAlarmInfo.iGlobalIdentifier = iModel->GetEntryGuidL(*entry);
+	
 	CleanupStack::PopAndDestroy(entry);
 	}
 	
--- a/pimappservices/calendar/server/src/agsentrymodel.cpp	Fri Mar 12 15:42:35 2010 +0200
+++ b/pimappservices/calendar/server/src/agsentrymodel.cpp	Mon Mar 15 12:40:18 2010 +0200
@@ -511,9 +511,11 @@
 				_DBGLOG_VERBOSE(AgmDebug::DebugLog("StoreL: Existing entry types is different to incoming entry's type");)
 				_DBGLOG_VERBOSE(AgmDebug::DebugLog("StoreL: Delete the existing entry and add the incoming entry as a new one");)
 				
-				// if the entry is a different type, delete the old entry and add the new one 
+				// if the entry is a different type, add the new one first and delete only later
+                // This change is needed if the entry having attachments, it will be shared by two 
+                //entries, so that attachments will not be deleted, while deleting it later. 
+				returnId = AddEntryL(aEntry);
 				DeleteEntryL(*existingEntryToReplace, ETrue, iChangeFilter);
-				returnId = AddEntryL(aEntry);
 				}
 
 			CleanupStack::PopAndDestroy(existingEntryToReplace);
--- a/pimappsupport/chinesecalendaralg/group/cconoriginal.mmp	Fri Mar 12 15:42:35 2010 +0200
+++ b/pimappsupport/chinesecalendaralg/group/cconoriginal.mmp	Mon Mar 15 12:40:18 2010 +0200
@@ -23,6 +23,7 @@
 SOURCE ArithmeticalDate.cpp AstronomicalCal.cpp Chinese.cpp ChineseDate.cpp
 USERINCLUDE ../originalinc
 SYSTEMINCLUDE /epoc32/include
+APP_LAYER_SYSTEMINCLUDE_SYMBIAN
 
 LIBRARY euser.lib
 SMPSAFE
\ No newline at end of file
--- a/pimappsupport/chinesecalendaralg/test/group/calcontable.mmp	Fri Mar 12 15:42:35 2010 +0200
+++ b/pimappsupport/chinesecalendaralg/test/group/calcontable.mmp	Mon Mar 15 12:40:18 2010 +0200
@@ -23,6 +23,7 @@
 USERINCLUDE ../../calcontablesrc
 USERINCLUDE ../../originalinc
 SYSTEMINCLUDE /epoc32/include
+APP_LAYER_SYSTEMINCLUDE_SYMBIAN
 LIBRARY	euser.lib efsrv.lib cconoriginal.lib charconv.lib
 
 SMPSAFE
--- a/pimappsupport/chinesecalendaralg/test/group/cconoriginal.mmp	Fri Mar 12 15:42:35 2010 +0200
+++ b/pimappsupport/chinesecalendaralg/test/group/cconoriginal.mmp	Mon Mar 15 12:40:18 2010 +0200
@@ -23,6 +23,7 @@
 SOURCE ArithmeticalDate.cpp AstronomicalCal.cpp Chinese.cpp ChineseDate.cpp
 USERINCLUDE ../../OriginalInc
 SYSTEMINCLUDE /epoc32/include
+APP_LAYER_SYSTEMINCLUDE_SYMBIAN
 
 LIBRARY euser.lib
 
--- a/pimappsupport/vcardandvcal/tsrc/TJapaneseSoundProperty.mmp	Fri Mar 12 15:42:35 2010 +0200
+++ b/pimappsupport/vcardandvcal/tsrc/TJapaneseSoundProperty.mmp	Mon Mar 15 12:40:18 2010 +0200
@@ -23,6 +23,7 @@
 userinclude     .
 userinclude ../inc 
 systeminclude /epoc32/include 
+APP_LAYER_SYSTEMINCLUDE_SYMBIAN
 
 source	        TJapaneseSoundProperty.cpp
 
--- a/pimappsupport/vcardandvcal/tsrc/Test_saveloadbinoom.mmp	Fri Mar 12 15:42:35 2010 +0200
+++ b/pimappsupport/vcardandvcal/tsrc/Test_saveloadbinoom.mmp	Mon Mar 15 12:40:18 2010 +0200
@@ -24,6 +24,7 @@
 userinclude ../inc
 
 systeminclude /epoc32/include 
+APP_LAYER_SYSTEMINCLUDE_SYMBIAN
 source Test_saveloadbinoom.cpp
 library euser.lib estor.lib efsrv.lib
 library	versit.lib vcard.lib
--- a/pimappsupport/vcardandvcal/tsrc/UnitTest_PBAPSupport/group/TestExternalize.mmp	Fri Mar 12 15:42:35 2010 +0200
+++ b/pimappsupport/vcardandvcal/tsrc/UnitTest_PBAPSupport/group/TestExternalize.mmp	Mon Mar 15 12:40:18 2010 +0200
@@ -22,6 +22,7 @@
 USERINCLUDE		../inc
 USERINCLUDE		../../../inc
 SYSTEMINCLUDE		/epoc32/include
+APP_LAYER_SYSTEMINCLUDE_SYMBIAN
 
 SOURCE			TestExternalize.cpp
 SOURCE			TestUtils.cpp