Revision: 201023 RCL_3
authorDremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Mon, 21 Jun 2010 15:38:59 +0300
branchRCL_3
changeset 48 bf573002ff72
parent 36 9c5b1510919f
child 52 e3c9f8706792
child 59 aba12c885d83
Revision: 201023 Kit: 2010125
calendarengines/caleninterimutils/inc/CalenInterimUtils2Impl.h
calendarengines/caleninterimutils/src/CalenInterimUtils2Impl.cpp
calendarengines/calenlauncher/src/CalenLauncherImpl.cpp
calendarui/application/data/CalenSettings.ra
calendarui/application/data/Calendar.rss
calendarui/application/group/iconlist.txt
calendarui/cenrep/CalendarInternalCRKeys.h
calendarui/commonutils/bwins/calencommonutilsu.def
calendarui/commonutils/eabi/calencommonutilsu.def
calendarui/commonutils/group/commonutils.mmp
calendarui/commonutils/inc/CalenStatusPaneUtilsImpl.h
calendarui/commonutils/inc/calencustomnavilabel.h
calendarui/commonutils/src/CalenStatusPaneUtils.cpp
calendarui/commonutils/src/CalenStatusPaneUtilsImpl.cpp
calendarui/commonutils/src/calencustomnavilabel.cpp
calendarui/conf/calendarUI.confml
calendarui/conf/calendarUI_101F874B.crml
calendarui/controller/src/calenalarmmanager.cpp
calendarui/controller/src/calencmdlinelauncher.cpp
calendarui/controller/src/calencontroller.cpp
calendarui/controller/src/calenmultidbeditor.cpp
calendarui/controller/src/calenmultipledbui.cpp
calendarui/controller/src/calensettingsstate.cpp
calendarui/editors/inc/CalenEditorDataHandler.h
calendarui/editors/inc/calenreminderfield.h
calendarui/editors/src/calenreminderfield.cpp
calendarui/editors/src/calenunifiededitor.cpp
calendarui/editors/src/calenunifiededitorcontrol.cpp
calendarui/globaldata/src/calenglobaldata.cpp
calendarui/inc/calendar.hrh
calendarui/loc/calendar.loc
calendarui/organizerplugin/aiagendaplugin2/src/aicalendarplugin2.cpp
calendarui/settings/settingsui/BWINS/calensettingsuiu.def
calendarui/settings/settingsui/eabi/calensettingsuiu.def
calendarui/settings/settingsui/inc/calensetting.h
calendarui/settings/settingsui/inc/calensettingsuicontainer.h
calendarui/settings/settingsui/src/calensetting.cpp
calendarui/settings/settingsui/src/calensettingsuicontainer.cpp
calendarui/views/group/calenviews.mmp
calendarui/views/inc/calendaycontainer.h
calendarui/views/inc/caleneventview.h
calendarui/views/inc/caleneventviewcontainer.h
calendarui/views/inc/calenmonthcontainer.h
calendarui/views/inc/calenweekcontainer.h
calendarui/views/src/calendaycontainer.cpp
calendarui/views/src/caleneventview.cpp
calendarui/views/src/caleneventviewcontainer.cpp
calendarui/views/src/calenmissedalarmsview.cpp
calendarui/views/src/calenmissedeventview.cpp
calendarui/views/src/calenmonthcontainer.cpp
calendarui/views/src/calentodocontainer.cpp
calendarui/views/src/calentodoview.cpp
calendarui/views/src/calenweekcontainer.cpp
clock2/clockengines/utilities/clockecomlistener/group/clockecomlistener.mmp
clock2/clockui/alarmeditorapp/group/alarmeditorapp.mmp
clock2/clockui/uilayer/clockalarmeditor/group/clockalarmeditor.mmp
clock2/clockui/uilayer/clockalarmeditor/src/clockalarmeditorimpl.cpp
clock2/clockui/uilayer/clockmainview/src/clockmainview.cpp
clock2/clockui/uilayer/clockworldview/src/clockworldcontainer.cpp
clock2/clockui/uilayer/group/clock.mmp
clock2/clockui/uilayer/inc/clockdocument.h
clock2/clockui/uilayer/src/clockdocument.cpp
clock2/clockui/uimodel/group/clkuimodel.mmp
notepad/notepad1/LibData/NpdLib.rss
notepad/notepad1/LibSrc/NpdListDialog.cpp
notepad/notepad1/LibSrc/NpdLoadFileAO.cpp
notepad/notepad1/LibSrc/NpdViewerDialog.cpp
notepad/notepad1/group/NpdLib.mmp
notepad/notepad1/group/NpdViewer.mmp
notepad/notepad1/inc/MNpdLoadFileObserver.h
notepad/notepad1/inc/NpdLoadFileAO.h
notepad/notepad1/inc/NpdViewerDialog.h
organizer_plat/calendar_common_utils_api/inc/CalenStatusPaneUtils.h
organizer_plat/calendar_common_utils_api/inc/calenconstants.h
organizer_plat/calendar_custamization_api/inc/calennotificationhandler.h
organizer_plat/calendar_settings_keys_api/inc/CalendarInternalCRKeys.h
organizer_pub/calendar_interim_utils2_api/tsrc/stiff/src/caleninterimutils2testblocks.cpp
--- a/calendarengines/caleninterimutils/inc/CalenInterimUtils2Impl.h	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarengines/caleninterimutils/inc/CalenInterimUtils2Impl.h	Mon Jun 21 15:38:59 2010 +0300
@@ -35,6 +35,20 @@
 class CCalInstance;
 class CCalenEComWatcher;    // Watches for installed MR solutions
 
+
+/**
+* This structure contains UUID info
+*/
+typedef struct
+    {
+    TUint32 time_low; 
+    TUint16 time_mid;
+    TUint16 time_high_and_version;    
+    TUint8 clock_seq_hi_and_reserved;
+    TUint8 clock_seq_low;   
+    TUint8 node[6];
+    } SUuid;
+
 // CLASS DECLARATION
 
 /**
@@ -248,6 +262,9 @@
         
         // Just a wrapper for leaves
         void DoMRViewersEnabledL();
+        
+        // get system time
+        void GetSystemTime(TInt64& aTimeStamp);       
 	
 private: 
     //Default Constructor
@@ -268,6 +285,11 @@
     TInt64 iImeiNode;
     TBool iMrEnabled;
     TBool iMrEnabledCheck;
+    
+    TUint64 iTimeLast;    
+    TUint16 iThisTick;
+    TBool iInited ; 
+    
     };
 
 #endif // __CALENINTERIMUTILS2IMPL_H__
--- a/calendarengines/caleninterimutils/src/CalenInterimUtils2Impl.cpp	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarengines/caleninterimutils/src/CalenInterimUtils2Impl.cpp	Mon Jun 21 15:38:59 2010 +0300
@@ -45,6 +45,13 @@
 #include "CalenEcomWatcher.h"       // Watches for ECOM registry changes
 
 // CONSTANTS
+
+/* set the following to the number of 100ns ticks of the actual
+   resolution of your system's clock.
+   800MHZ means 1s->800*(10^6) clock cycles
+   100ns->80 clock cycles*/
+const TUint16 UUIDS_PER_TICK = 80;
+
 /// Unnamed namespace for local definitions
 namespace {
 
@@ -53,8 +60,7 @@
 #endif
 
     const TInt KImeiLength = 15; // 15 chars from left of imei
-
-    const TInt KAsciiFirstNumber = 48;             // ASCII character 48 = '0'.
+    const TInt KAsciiFirstNumber = 48;             // ASCII character 48 = '0'.  
     const TInt KAsciiFirstLowercaseLetter = 97;    // ASCII character 97 = 'a'.
 
 }  // namespace
@@ -91,8 +97,8 @@
     TRACE_ENTRY_POINT;
 
     iMrEnabledCheck = ETrue;
-    iMrEnabled = EFalse;
-    
+    iMrEnabled = EFalse;    
+    iInited = EFalse;
     TRACE_EXIT_POINT;
     }
 
@@ -279,15 +285,17 @@
     // http://www.webdav.org/specs/draft-leach-uuids-guids-01.txt
 
     // Number of 100ns ticks since Oct 15 1582.
-    TInt64 timeStamp = GetTicksFromGregorianCalendarStartL();
-
+    TInt64 timeStamp;
+    GetSystemTime(timeStamp);
+    
     // This differs slightly from the spec in that the clock sequence is just a pseudo-random number.
-       TUint32 clockSeq = Math::Random();
-       // IMEI is read the first time this is called, and stored for subsequent calls.
-       if(!iImeiNode)
-           {
-           iImeiNode = GetImeiAsNodeValueL();
-           }
+    TUint32 clockSeq = Math::Random();
+    
+    // IMEI is read the first time this is called, and stored for subsequent calls.
+    if(!iImeiNode)
+       {
+       iImeiNode = GetImeiAsNodeValueL();
+       }
 
     HBufC8* resultBuf = DoCreateUidLC(clockSeq, timeStamp, iImeiNode);
     CleanupStack::Pop(resultBuf);
@@ -313,7 +321,46 @@
     TTimeIntervalMicroSeconds msDifference = timeNow.MicroSecondsFrom(gregorianStart);
     
     TRACE_EXIT_POINT;
-    return msDifference.Int64() * 10; // * 10 to convert from micro sec (==1000 ns) count to 100ns count.
+    return ( timeNow.Int64() + msDifference.Int64() ) * 10; // * 10 to convert from micro sec (==1000 ns) count to 100ns count.
+    }
+
+// -----------------------------------------------------------------------------
+// CCalenInterimUtils2Impl::GetSystemTime()
+// This function returns the system time.
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+void CCalenInterimUtils2Impl::GetSystemTime(TInt64& aTimeStamp)
+    {  
+    TRACE_ENTRY_POINT;
+    
+    if (!iInited)
+        {
+        aTimeStamp = GetTicksFromGregorianCalendarStartL();
+        iThisTick = UUIDS_PER_TICK; 
+        iInited = ETrue;
+        }
+    for( ; ; )
+        {
+        aTimeStamp = GetTicksFromGregorianCalendarStartL();
+        //if clock reading changed since last UUID generated...
+        if( iTimeLast != aTimeStamp )
+            {
+            //reset count of uuids gen'd with this clock reading             
+            iThisTick = 0;
+            iTimeLast = aTimeStamp;
+            break;
+            }
+        if( iThisTick < UUIDS_PER_TICK )
+            {
+            iThisTick++;
+            break;
+            }        
+        }
+        //add the count of uuids to low order bits of the clock reading 
+        aTimeStamp += iThisTick;
+        
+    TRACE_EXIT_POINT;
     }
 
 // -----------------------------------------------------------------------------
@@ -370,104 +417,58 @@
     TRACE_ENTRY_POINT;
     
     // The roast beef of the algorithm. Does all the shifting about as described in the web draft.
-    TUint32 time_low = aTimeStamp & 0xFFFFFFFF;
-    TUint16 time_mid = (aTimeStamp >> 32) & 0xFFFF;
-    TUint16 time_high = (aTimeStamp >> 48) & 0x0FFF;
-    time_high |= (1 << 12);
-    TUint8 clock_seq_low = aClockSeq & 0xFF;
-    TUint8 clock_seq_high = (aClockSeq & 0x3F00) >> 8;
-    clock_seq_high |= 0x80;
-
-    // Can't use RArray as that's set up for minimum 4 bytes per item.
-    CArrayFixFlat<TUint8> *node = new (ELeave) CArrayFixFlat<TUint8>(6);
-    CleanupStack::PushL(node);
-
-    // The rest of the function is mapping the 64, 32 and 16 bit numbers to 8 bit numbers
-    // while losing as little data as possible.
-
+    SUuid uuid;   
+    TUint8 hash[16];
+    
+    uuid.time_low = aTimeStamp & 0xFFFFFFFF;
+    uuid.time_mid = (aTimeStamp >> 32) & 0xFFFF;
+    uuid.time_high_and_version = (aTimeStamp >> 48) & 0x0FFF;
+    uuid.time_high_and_version |= (1 << 12);  
+    uuid.clock_seq_low = aClockSeq & 0xFF;
+    uuid.clock_seq_hi_and_reserved = (aClockSeq & 0x3F00) >> 8;
+    uuid.clock_seq_hi_and_reserved |= 0x80;
+   
     TUint64 mask = 0xFF0000000000;
     for(TInt i=0; i<=6; ++i)
         {
         TInt64 temp = aNodeValue & mask;
         temp >>= ((5-i)*8);
-        node->AppendL(temp);
+        uuid.node[i] = temp;
         mask = mask >> 8;
         }
 
-    TBuf8<16> rawOutput;
-
-    rawOutput.Append( (time_low  & 0xFF000000) >> 24 );
-    rawOutput.Append( (time_low  & 0x00FF0000) >> 16 );
-    rawOutput.Append( (time_low  & 0x0000FF00) >> 8 );
-    rawOutput.Append( (time_low  & 0x000000FF) );
-
-    rawOutput.Append( (time_mid  & 0xFF00) >> 8 );
-    rawOutput.Append( (time_mid  & 0x00FF) );
-
-    rawOutput.Append( (time_high & 0xFF00) >> 8 );
-    rawOutput.Append( (time_high & 0x00FF) );
-
-    rawOutput.Append( clock_seq_low );
-    rawOutput.Append( clock_seq_high );
-
-    for(TInt i=0; i<6; ++i)
-        {
-        rawOutput.Append( node->At(i) );
-        }
-    CleanupStack::PopAndDestroy(); // node
-    
-    TUint8 digest[16];
-    HBufC8* resultBuf = rawOutput.AllocLC();
-    TPtr8 resultBufPtr = resultBuf->Des();
-    TUint length = resultBufPtr.Length();
-    
-    // Create a new buffer to provide space for '\0'
-    HBufC8* newBuf = HBufC8::NewLC( length + 1 );//+1 space for '\0'
-    TPtr8 newBufPtr = newBuf->Des();
-    newBufPtr.Copy(resultBufPtr);
-    
-    // Appends a zero terminator onto the end of this descriptor's data
-    // and returns a pointer to the data.
-    char* chPtrTemp = ( char*)newBufPtr.PtrZ();
-    char* chPtr = ( char*) User::AllocL( length + 1 );
-    strcpy( chPtr , chPtrTemp );
-    
-    //md5 context
-    MD5_CTX* context = new MD5_CTX();
+    //md5 context   
+    MD5_CTX context;
     //initialize the context
-    MD5_Init(context);
+    MD5_Init(&context);
     //Append a string to the message
-    MD5_Update(context, chPtr, length );
+    MD5_Update(&context, &uuid, sizeof(uuid) );
     //Finish the message and return the digest.
-    MD5_Final(digest, context );
-    
+    MD5_Final(hash, &context );
     // Add the version field in the msb 4 bits. The value of version is 3.
-    digest[6] = digest[6] & 0x0F;
-    digest[6] |= (3 << 4);
+    hash[6] = hash[6] & 0x0F;
+    hash[6] |= (3 << 4);
     
     //Add the variant field in the msb 2 bits. The value of variant is 2.
-    digest[9] = digest[9] & 0x3F;
-    digest[9] |= 0x80;
-    
-    delete chPtr;
-    delete context;
-    CleanupStack::PopAndDestroy( newBuf );
-    CleanupStack::PopAndDestroy( resultBuf );
+    hash[8] = hash[8] & 0x3F;
+    hash[8] |= 0x80;
+           
     TBuf8<36> output;
     TInt i;
     for(i=0; i<16; ++i)
-        {
-        output.Append( ConvertToCharacterL( FirstFourBits( digest[i] ) ) ); 
-        output.Append( ConvertToCharacterL( LastFourBits( digest[i] ) ) );
-        if(i == 3 || i == 5 || i == 7 ||i == 9)
-            {
-            output.Append( '-' );
-            }
-        }
-    HBufC8* md5ResultBuf = output.AllocLC();
+      {
+      output.Append( ConvertToCharacterL( FirstFourBits( hash[i] ) ) ); 
+      output.Append( ConvertToCharacterL( LastFourBits( hash[i] ) ) );
+      if(i == 3 || i == 5 || i == 7 ||i == 9)
+          {
+          output.Append( '-' );
+          }
+      }
+    HBufC8* retBuf = output.AllocLC();
     
     TRACE_EXIT_POINT;
-    return md5ResultBuf;
+    return retBuf;
+    
     }
 
 // -----------------------------------------------------------------------------
--- a/calendarengines/calenlauncher/src/CalenLauncherImpl.cpp	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarengines/calenlauncher/src/CalenLauncherImpl.cpp	Mon Jun 21 15:38:59 2010 +0300
@@ -448,7 +448,7 @@
         {
         const TUid dummyUID = { 0x0 };
         calenTask.SendMessage(dummyUID, *iLaunchParams);
-        calenTask.BringToForeground();
+        //calenTask.BringToForeground();
         }
 
     // If Calendar is not running we launch from the command line
--- a/calendarui/application/data/CalenSettings.ra	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/application/data/CalenSettings.ra	Mon Jun 21 15:38:59 2010 +0300
@@ -345,6 +345,64 @@
 
 
 // -------------------------
+// Week Number setting
+// -------------------------
+
+RESOURCE TBUF r_calen_setting_weeknumber_title
+    {
+    buf = qtn_cale_set_show_wk_number;
+    }
+
+RESOURCE AVKON_SETTING_PAGE r_calen_setting_weeknumber
+    {
+    label =  qtn_cale_set_show_wk_number;
+    softkey_resource = R_AVKON_SOFTKEYS_OK_CANCEL__OK;
+    type =  EAknCtPopupSettingList;
+    editor_resource_id= r_calen_setting_listbox;
+    }
+
+RESOURCE ARRAY r_calendar_weeknumber_choicelist
+    {
+    items =
+        {
+        LBUF
+            {
+            txt = qtn_cale_set_show_wk_number_no; 
+            },
+        LBUF
+            {
+            txt = qtn_cale_set_show_wk_number_yes;
+            }
+        };
+    }
+
+
+//    Defines list for setting page
+RESOURCE ARRAY r_calendar_weeknumber_array
+    {
+    items =
+        {
+        AVKON_ENUMERATED_TEXT
+            {
+            value = 0;
+            text = qtn_cale_set_show_wk_number_no;
+            },
+        AVKON_ENUMERATED_TEXT
+            {
+            value = 1;
+            text = qtn_cale_set_show_wk_number_yes;
+            }
+        };
+    }
+
+//    Defines list for setting page
+RESOURCE AVKON_POPUP_SETTING_TEXTS r_calen_weeknumber_texts
+    {
+    setting_texts_resource = r_calendar_weeknumber_array;
+    popped_up_texts_resource = r_calendar_weeknumber_choicelist;
+    }
+
+// -------------------------
 // Week title setting
 // -------------------------
 
--- a/calendarui/application/data/Calendar.rss	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/application/data/Calendar.rss	Mon Jun 21 15:38:59 2010 +0300
@@ -2499,31 +2499,7 @@
 		        // It's based on layout.
 		        max_view_height_in_lines = 0;
 		        };
-		    },
-		    DLG_LINE
-		        {
-		        type = EEikCtEdwin;
-	                prompt = qtn_cale_multidb_synchronization;
-	                id = ECalenMultiDbSyncStatus;
-		        itemflags = EEikDlgItemTakesEnterKey;
-		        control = EDWIN
-		            {
-		            flags = EEikEdwinNoHorizScrolling | EEikEdwinResizable |
-		            EEikEdwinNoAutoSelection | EEikEdwinReadOnly|
-		            EEikEdwinAvkonDisableCursor|EEikEdwinAvkonNotEditable |EEikEdwinDisplayOnly ;
-		            maxlength = 160;
-		            default_case = EAknEditorTextCase;
-		            allowed_case_modes = EAknEditorAllCaseModes;
-		            numeric_keymap = EAknEditorStandardNumberModeKeymap;
-		            special_character_table = R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG;
-		            avkon_flags = EAknEditorFlagUseSCTNumericCharmap |
-		            EAknEditorFlagDefault | 
-		            EAknEditorFlagEnablePictographInput;
-		            // let Avkon decide which is maximum number of lines
-		            // It's based on layout.
-		            max_view_height_in_lines = 0;
-		            };
-		        }
+		    }
         };
     }
 
@@ -3109,6 +3085,4 @@
     buf = qtn_cale_max_attachment_size;
     }
 
-
-
 // End of File
--- a/calendarui/application/group/iconlist.txt	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/application/group/iconlist.txt	Mon Jun 21 15:38:59 2010 +0300
@@ -32,3 +32,4 @@
 -c8,8  qgn_stat_sync.svg
 -c8,8  qgn_indi_cale_tb_today.svg
 -c8,8  qgn_indi_cale_tb_changeview.svg
+-c8,8  qgn_indi_navi_color.svg
--- a/calendarui/cenrep/CalendarInternalCRKeys.h	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/cenrep/CalendarInternalCRKeys.h	Mon Jun 21 15:38:59 2010 +0300
@@ -139,5 +139,10 @@
 */
 const TUint32 KCalendarAvailableValue = 0x00000010;
 
+/**
+* Boolean value containing week Number ON/OFF 
+* Default value:"0"
+*/
+const TUint32 KCalendarWeekViewNumber = 0x000000011;
 
 #endif  // CALENDARINTERNALCRKEYS_H
--- a/calendarui/commonutils/bwins/calencommonutilsu.def	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/commonutils/bwins/calencommonutilsu.def	Mon Jun 21 15:38:59 2010 +0300
@@ -137,3 +137,4 @@
 	?GetNextAvailableCalFileL@CCalenMultiCalUtil@@SAPAVHBufC16@@XZ @ 136 NONAME ; class HBufC16 * CCalenMultiCalUtil::GetNextAvailableCalFileL(void)
 	?AttachmentOpen@CCalenAttachmentModel@@QAEXAAH@Z @ 137 NONAME ; void CCalenAttachmentModel::AttachmentOpen(int &)
 	?IsAttachmentOpen@CCalenAttachmentModel@@QAEHXZ @ 138 NONAME ; int CCalenAttachmentModel::IsAttachmentOpen(void)
+	?ShowNaviPaneL@CCalenStatusPaneUtils@@QAEPAVCAknNavigationDecorator@@ABVTDesC16@@VTRgb@@@Z @ 139 NONAME ; class CAknNavigationDecorator * CCalenStatusPaneUtils::ShowNaviPaneL(class TDesC16 const &, class TRgb)
--- a/calendarui/commonutils/eabi/calencommonutilsu.def	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/commonutils/eabi/calencommonutilsu.def	Mon Jun 21 15:38:59 2010 +0300
@@ -150,4 +150,5 @@
 	_ZN18CCalenMultiCalUtil24GetNextAvailableCalFileLEv @ 149 NONAME
 	_ZN21CCalenAttachmentModel14AttachmentOpenERi @ 150 NONAME
 	_ZN21CCalenAttachmentModel16IsAttachmentOpenEv @ 151 NONAME
+	_ZN21CCalenStatusPaneUtils13ShowNaviPaneLERK7TDesC164TRgb @ 152 NONAME
 
--- a/calendarui/commonutils/group/commonutils.mmp	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/commonutils/group/commonutils.mmp	Mon Jun 21 15:38:59 2010 +0300
@@ -56,6 +56,7 @@
 SOURCE          calentitlepane.cpp
 
 SOURCE          calenmulticalutil.cpp
+SOURCE          calencustomnavilabel.cpp
 
 LIBRARY         caleninterimutils2.lib
 LIBRARY         avkon.lib
--- a/calendarui/commonutils/inc/CalenStatusPaneUtilsImpl.h	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/commonutils/inc/CalenStatusPaneUtilsImpl.h	Mon Jun 21 15:38:59 2010 +0300
@@ -25,6 +25,7 @@
 class CEikStatusPane;
 class CAknNavigationDecorator;
 class CCalenTitlePane;
+class TRgb;
 
 NONSHARABLE_CLASS( CCalenStatusPaneUtilsImpl ) : public CBase
     {
@@ -40,6 +41,7 @@
         void UnderLineTitleText( TBool aUnderline );
         
         CAknNavigationDecorator* ShowNaviPaneL( const TTime& aActiveDay );
+        CAknNavigationDecorator* ShowNaviPaneL( const TDesC& aName, const TRgb aColor );
 
         void HideNaviPane();
         
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/commonutils/inc/calencustomnavilabel.h	Mon Jun 21 15:38:59 2010 +0300
@@ -0,0 +1,95 @@
+/*
+* Copyright (c) 2002, 2003 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Navi control for eventview
+ *
+*/
+#ifndef CCALENCUSTOMNAVICONTROL_H
+#define CCALENCUSTOMNAVICONTROL_H
+
+//  INCLUDES
+#include <coecntrl.h>
+#include <AknsBasicBackgroundControlContext.h>
+
+
+
+// CLASS DECLARATION
+NONSHARABLE_CLASS( CCustomNaviControl ) : public CCoeControl
+    {
+public:
+	/**
+	* First phase constructor
+    * @param aName  Calendar name
+    * @param aColor Calendar color
+    */
+    static CCustomNaviControl* NewL(const TDesC& aName, const TRgb aColor);
+    
+    /**
+    * Destructor.
+    */
+    virtual ~CCustomNaviControl();
+    
+    /**
+    * Sets the Calendar name and color
+    * @param aName  Calendar name
+    * @param aColor Calendar color
+    */
+    void SetCalendarNameAndColor(const TDesC& aName, const TRgb aColor);
+    
+private: 
+	
+	/**
+    * From CCoeControl
+    */
+    void Draw(const TRect& /*aRect*/) const;
+    
+     /**
+     * From CCoeControl, child control was resized.
+     */
+    void SizeChanged();
+    
+     /**
+     * From CCoeControl, return child control count.
+     * @return Control count
+     */
+    TInt CountComponentControls() const;
+    
+     /**
+     * From CCoeControl, return child control pointer.
+     * @param aIndex Child control index
+     * @return Child control pointer.
+     */
+    CCoeControl* ComponentControl(TInt aIndex) const;
+    
+private: // own methods
+    /**
+    * C++ constructor.
+    */
+    CCustomNaviControl();
+    
+    /**
+    * Second phase constructor
+    */
+    void ConstructL(const TDesC& aName, const TRgb aColor);
+    
+private:
+    CFbsBitmap* iBitmap;
+    CFbsBitmap* iMask;
+    CAknsBasicBackgroundControlContext* iBgContext; // for skins support
+    HBufC *iCalendarName;
+    TRgb iCalendarColor;
+
+    };
+#endif  // CCALENCUSTOMNAVICONTROL_H
+
+// end of file
--- a/calendarui/commonutils/src/CalenStatusPaneUtils.cpp	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/commonutils/src/CalenStatusPaneUtils.cpp	Mon Jun 21 15:38:59 2010 +0300
@@ -18,6 +18,7 @@
  //debug
  #include "calendarui_debug.h"
  #include <CalenStatusPaneUtils.h>
+ #include <gdi.h>
  #include "CalenStatusPaneUtilsImpl.h"
  
  
@@ -49,6 +50,19 @@
     TRACE_EXIT_POINT;
     return iStatusPaneUtils->ShowNaviPaneL( aActiveDay );
     }
+ // -----------------------------------------------------------------------------
+ // CCalenStatusPaneUtils::ShowNaviPaneL
+ // Sets the calendar name and icon in the navi pane
+ // (other items were commented in a header).
+ // -----------------------------------------------------------------------------
+ //
+ EXPORT_C CAknNavigationDecorator* CCalenStatusPaneUtils::ShowNaviPaneL( const TDesC& aName, const TRgb aColor )
+     {
+     TRACE_ENTRY_POINT;
+
+     TRACE_EXIT_POINT;
+     return iStatusPaneUtils->ShowNaviPaneL( aName, aColor );
+     }
 
 // -----------------------------------------------------------------------------
 // ?classname::?member_function
--- a/calendarui/commonutils/src/CalenStatusPaneUtilsImpl.cpp	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/commonutils/src/CalenStatusPaneUtilsImpl.cpp	Mon Jun 21 15:38:59 2010 +0300
@@ -20,6 +20,7 @@
  #include "calencontext.h"
  #include "CalenStatusPaneUtilsImpl.h"
  #include "calentitlepane.h"
+ #include "calencustomnavilabel.h"
  #include <Calendar.rsg>
  
  #include <aknnavi.h>
@@ -102,7 +103,13 @@
     AknTextUtils::DisplayTextLanguageSpecificNumberConversion(naviDes);
 
     iNaviLabel = iNaviContainer->Top();
-    if(iNaviLabel != NULL)
+    if(iNaviLabel != NULL && iNaviLabel->ControlType() != CAknNavigationDecorator::ENaviLabel)
+        {
+        HideNaviPane();
+        }
+    // iNaviLabel should be of type CAknNavigationDecorator::ENaviLabel for
+    // displaying date in navi pane.
+    if(iNaviLabel != NULL && iNaviLabel->ControlType() == CAknNavigationDecorator::ENaviLabel)
         {
         CCoeControl* coeRes = iNaviLabel->DecoratedControl();
         CAknNaviLabel *actualLabel = static_cast<CAknNaviLabel*>(coeRes);
@@ -130,6 +137,48 @@
     TRACE_EXIT_POINT;
     return iNaviLabel;
     }
+ // -----------------------------------------------------------------------------
+ // ?classname::?member_function
+ // ?implementation_description
+ // (other items were commented in a header).
+ // -----------------------------------------------------------------------------
+ //
+  CAknNavigationDecorator* CCalenStatusPaneUtilsImpl::ShowNaviPaneL( const TDesC& aName, const TRgb aColor )
+     {
+     TRACE_ENTRY_POINT;
+     
+     iNaviLabel = iNaviContainer->Top();
+     if(iNaviLabel != NULL && iNaviLabel->ControlType() != CAknNavigationDecorator::ENotSpecified)
+         {
+         HideNaviPane();
+         }
+     // iNaviLabel should be of type CAknNavigationDecorator::ENotSpecified for
+     // displaying calendar name and icon in navi pane.
+     if(iNaviLabel != NULL && iNaviLabel->ControlType() == CAknNavigationDecorator::ENotSpecified)
+         {
+         CCoeControl* coeRes = iNaviLabel->DecoratedControl();
+         CCustomNaviControl *actualLabel = static_cast<CCustomNaviControl*>(coeRes);
+         actualLabel->SetCalendarNameAndColor(aName, aColor);
+         actualLabel->DrawDeferred();
+         iNaviContainer->ReplaceL(*iNaviLabel, *iNaviLabel);
+         }
+     else
+         {
+         CCustomNaviControl *customControl = CCustomNaviControl::NewL(aName, aColor);
+         CleanupStack::PushL(customControl);
+         customControl->SetContainerWindowL(*iNaviContainer);
+         CleanupStack::Pop( customControl ); // customControl
+         
+         iNaviLabel = CAknNavigationDecorator::NewL(iNaviContainer, customControl, CAknNavigationDecorator::ENotSpecified);
+         
+         iNaviLabel->SetContainerWindowL( *iNaviContainer );
+         iNaviLabel->SetControlContext( iNaviContainer );
+         iNaviLabel->MakeScrollButtonVisible(EFalse);
+         iNaviContainer->PushL(*iNaviLabel);
+         }
+    TRACE_EXIT_POINT;
+    return iNaviLabel;
+    }
 
 // -----------------------------------------------------------------------------
 // ?classname::?member_function
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/calendarui/commonutils/src/calencustomnavilabel.cpp	Mon Jun 21 15:38:59 2010 +0300
@@ -0,0 +1,209 @@
+/*
+* Copyright (c) 2002, 2003 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"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  Navi decorated control for eventview
+ *
+*/
+
+#include "calencustomnavilabel.h"
+#include "calendarui_debug.h"
+
+#include <aknlayoutscalable_apps.cdl.h>
+#include <eikapp.h>
+#include <eikappui.h>
+#include <AknUtils.h>
+#include <calendar.mbg>
+#include <AknIconUtils.h>
+#include <debug.h>
+#include <aknsutils.h>
+
+
+// ----------------------------------------------------------------------------
+// CCustomNaviControl::NewL
+// First stage construction
+// ----------------------------------------------------------------------------
+CCustomNaviControl* CCustomNaviControl::NewL(const TDesC& aName, const TRgb aColor)
+    {
+    TRACE_ENTRY_POINT;
+    CCustomNaviControl* self = new(ELeave)CCustomNaviControl();
+    CleanupStack::PushL(self);
+    self->ConstructL( aName, aColor );
+    CleanupStack::Pop(self);
+    TRACE_EXIT_POINT;
+    return self;
+    }
+
+// ----------------------------------------------------------------------------
+// CCustomNaviControl::~CCustomNaviControl
+// Destructor
+// ----------------------------------------------------------------------------
+CCustomNaviControl::~CCustomNaviControl()
+    {
+    TRACE_ENTRY_POINT;
+    if(iBitmap)
+        {
+        delete iBitmap;
+        iBitmap = NULL;
+        }
+    if(iMask)
+        {
+        delete iMask;
+        iMask = NULL;
+        }
+
+    if(iCalendarName)
+        {
+        delete iCalendarName;
+        }
+    TRACE_EXIT_POINT;
+    }
+    
+// ----------------------------------------------------------------------------
+// CCustomNaviControl::SetCalendarNameAndColor
+// Sets the Calendar name and Color.
+// ----------------------------------------------------------------------------    
+void CCustomNaviControl::SetCalendarNameAndColor(const TDesC& aName, const TRgb aColor)
+    {
+    TRACE_ENTRY_POINT;
+    delete iCalendarName;
+    iCalendarColor = aColor;
+    iCalendarName = aName.AllocL();
+    TRACE_EXIT_POINT;
+    }
+    
+// ----------------------------------------------------------------------------
+// CCustomNaviControl::CCustomNaviControl
+// Constructor
+// ----------------------------------------------------------------------------    
+CCustomNaviControl::CCustomNaviControl()
+    {
+    TRACE_ENTRY_POINT;
+    TRACE_EXIT_POINT;
+    }
+
+// ----------------------------------------------------------------------------
+// CCustomNaviControl::ConstructL
+// Second stage construction
+// ----------------------------------------------------------------------------
+void CCustomNaviControl::ConstructL(const TDesC& aName, const TRgb aColor)
+    {
+    TRACE_ENTRY_POINT;
+    iCalendarColor = aColor;
+    iCalendarName = aName.AllocL();
+    CreateWindowL();
+    iBgContext = CAknsBasicBackgroundControlContext::NewL( KAknsIIDQsnBgNavipaneSolid,
+                                                           Rect(),
+                                                           ETrue );
+    // Create an icon
+    TFileName IconFile;
+    IconFile = ((CEikAppUi*)CCoeEnv::Static()->AppUi())->Application()->BitmapStoreName();
+    AknIconUtils::CreateIconL(iBitmap, iMask,IconFile,
+            EMbmCalendarQgn_indi_navi_color,
+            EMbmCalendarQgn_indi_navi_color_mask);
+    TRect naviPane;
+    AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::ENaviPane, naviPane );
+    SetRect(naviPane);
+    ActivateL();
+    TRACE_EXIT_POINT;
+    }
+
+// ----------------------------------------------------------------------------
+// CCustomNaviControl::Draw
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+void CCustomNaviControl::Draw(const TRect& /*aRect*/) const
+    {
+    TRACE_ENTRY_POINT;
+    
+    TSize navi_pane_size;
+    AknLayoutUtils::LayoutMetricsSize (AknLayoutUtils::ENaviPane, navi_pane_size);
+    TRect navi_pane(navi_pane_size);
+    TAknLayoutRect navi_cale_icon_pane;
+    navi_cale_icon_pane.LayoutRect(navi_pane, 
+                        AknLayoutScalable_Apps::navi_pane_bcale_mc_g1().LayoutLine() );
+    TRect navi_cale_icon_ev2_pane = navi_cale_icon_pane.Rect();
+    
+    CWindowGc& gc = SystemGc();
+    AknIconUtils::SetSize(iBitmap, navi_cale_icon_ev2_pane.Size());
+    AknIconUtils::SetIconColor(iBitmap,iCalendarColor);
+    gc.BitBlt(navi_cale_icon_ev2_pane.iTl,iBitmap);
+    TAknTextLineLayout navi_cale_text_pane_t1 = 
+                        AknLayoutScalable_Apps::navi_pane_bcale_mc_t1(0).LayoutLine();
+
+    // Get heading layout properties
+    // from field_cale_ev2_pane_t1 with list_cale_ev2_pane as parent
+    TAknLayoutText headingTextLayout;
+    headingTextLayout.LayoutText(navi_pane, navi_cale_text_pane_t1);
+    
+    const CFont* font = CCoeEnv::Static()->NormalFont();
+    gc.UseFont(font);
+    // If you see bright red text, the skins api is broken!
+    TRgb textColourFromSkin(255,0,0);
+    // Does not transfer ownership.
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+    AknsUtils::GetCachedColor(skin, 
+                     textColourFromSkin, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG2);
+    TCharFormat charFormat;
+    TCharFormatMask charFormatMask;
+    // Set the text colour we found.
+    charFormat.iFontPresentation.iTextColor = TLogicalRgb(textColourFromSkin);
+    charFormatMask.SetAttrib(EAttColor);
+    gc.SetPenColor(charFormat.iFontPresentation.iTextColor);
+    gc.DrawText(*(iCalendarName),TPoint(headingTextLayout.TextRect().iTl.iX, 
+                                              headingTextLayout.TextRect().iBr.iY));
+    gc.DiscardFont();
+    TRACE_EXIT_POINT;
+    }
+
+// ----------------------------------------------------------------------------
+// CCustomNaviControl::Sizechanged
+// Child control was resized.
+// (other items were commented in a header)
+// ----------------------------------------------------------------------------
+//
+void CCustomNaviControl::SizeChanged()
+    {
+    TRACE_ENTRY_POINT;
+    TRACE_EXIT_POINT;
+    }
+
+// ----------------------------------------------------------------------------
+// CCustomNaviControl::CountComponentControls
+// Return child control count.
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+TInt CCustomNaviControl::CountComponentControls() const
+    {
+    TRACE_ENTRY_POINT;
+    TRACE_EXIT_POINT;
+    
+    return 0;
+    }
+
+// ----------------------------------------------------------------------------
+// CCustomNaviControl::ComponentControl
+// Return child control pointer.
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+CCoeControl* CCustomNaviControl::ComponentControl(TInt /*aIndex*/) const
+    {
+    TRACE_ENTRY_POINT;
+    TRACE_EXIT_POINT;
+    
+    return NULL;
+    }
+
+// end of file
Binary file calendarui/conf/calendarUI.confml has changed
Binary file calendarui/conf/calendarUI_101F874B.crml has changed
--- a/calendarui/controller/src/calenalarmmanager.cpp	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/controller/src/calenalarmmanager.cpp	Mon Jun 21 15:38:59 2010 +0300
@@ -49,6 +49,8 @@
 #include "calenattachmentmodel.h"
 
 static const TUint32 KMaxMissedAlarms = 10;
+// Order of calendar window(at front) after Stop/Snooze of alarm from event viewer.
+static const TInt KCalendarWindowOnFront(0);
 
 // ----------------------------------------------------------------------------
 // CCalenAlarmManager::NewL
@@ -103,10 +105,9 @@
         }
     delete iMissedAlarmStore;
     
-    if(iMissedAlarmList.Count())
-        {
-        iMissedAlarmList.Close();
-        }
+      
+	iMissedAlarmList.Close();
+     
  
     TRACE_EXIT_POINT;
     }
@@ -288,6 +289,16 @@
             HandleMissedAlarmViewClosedL();
             }
             break;
+        case ECalenNotifyClearMissedAlarms:
+            {
+            TVwsViewId activeView;
+            iController.AppUi().GetActiveViewId(activeView);
+            if(activeView.iViewUid == KUidCalenMissedAlarmsView)
+                {
+                OnCmdClearAllMissedAlarmsL();
+                }
+            }
+            break;
         case ECalenNotifyMissedEventViewClosed:
             {
             HandleMissedEventViewClosedL();
@@ -448,7 +459,7 @@
     
     // restore window group priority
     RWindowGroup& windowGroup = CCoeEnv::Static()->RootWin();
-    PIM_ASSERT( windowGroup.SetOrdinalPositionErr( iOrigWGPos, iOrigWGPrio ) );  
+	PIM_ASSERT( windowGroup.SetOrdinalPositionErr( KCalendarWindowOnFront, iOrigWGPrio ) );  
 
     //Close Event View
     if(aCloseEventView)
@@ -480,7 +491,7 @@
     
     // restore window group priority
     RWindowGroup& windowGroup = CCoeEnv::Static()->RootWin();
-    PIM_ASSERT( windowGroup.SetOrdinalPositionErr( iOrigWGPos, iOrigWGPrio ) );  
+	PIM_ASSERT( windowGroup.SetOrdinalPositionErr( KCalendarWindowOnFront, iOrigWGPrio ) );  
     
     // After auto snooze, stop the alarm and open the event viewer in normal mode.
     iController.BroadcastNotification( ECalenNotifyStopAlarm );    
@@ -607,8 +618,18 @@
     TRACE_ENTRY_POINT;
     
     // Clear all the missed alarm events from cenrep
-    iMissedAlarmStore->RemoveAllL();
-   
+    
+    RPointerArray<CMissedAlarm> missedAlarmArray;      
+    CleanupResetAndDestroyPushL( missedAlarmArray );   
+    iMissedAlarmStore->GetL(missedAlarmArray);
+    for(TInt index = 0;index < missedAlarmArray.Count();index++)
+        {
+        // remove from cenrep
+        iMissedAlarmStore->RemoveL(*missedAlarmArray[index]);
+        }
+    
+    CleanupStack::PopAndDestroy(); // aMissedAlarmArray
+    
     if(iMissedAlarmList.Count())
         {
         iMissedAlarmList.Close();
@@ -731,8 +752,8 @@
     {
     TRACE_ENTRY_POINT;
     
-    // remove all the viewed events
-    RemoveAllViewedEventsL();
+    // remove all the missed alarms
+   OnCmdClearAllMissedAlarmsL();
     
     if(iPreviousToMissedAlarmView.iViewUid!=KNullUid)
         {
@@ -916,20 +937,20 @@
     {
     TRACE_ENTRY_POINT;
     
-    RPointerArray<CMissedAlarm> aMissedAlarmArray;      
-    CleanupResetAndDestroyPushL( aMissedAlarmArray );   
-    iMissedAlarmStore->GetL(aMissedAlarmArray);
+    RPointerArray<CMissedAlarm> missedAlarmArray;      
+    CleanupResetAndDestroyPushL( missedAlarmArray );   
+    iMissedAlarmStore->GetL(missedAlarmArray);
     TBool retValue = EFalse;
-    for(TInt index = 0;index < aMissedAlarmArray.Count();index++)
+    for(TInt index = 0;index < missedAlarmArray.Count();index++)
         {
-        if( aEntryLocalUid == aMissedAlarmArray[index]->iLuid )
+        if( aEntryLocalUid == missedAlarmArray[index]->iLuid )
             {
-            CCalSession &session = iController.Services().SessionL( aMissedAlarmArray[index]->iCalFileName );
+            CCalSession &session = iController.Services().SessionL( missedAlarmArray[index]->iCalFileName );
            TCalCollectionId colid = session.CollectionIdL();
             if( colid == aColid)
                 {
                 // remove from cenrep
-                iMissedAlarmStore->RemoveL(*aMissedAlarmArray[index]);
+                iMissedAlarmStore->RemoveL(*missedAlarmArray[index]);
                 retValue = ETrue;
                 break;
                 }
--- a/calendarui/controller/src/calencmdlinelauncher.cpp	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/controller/src/calencmdlinelauncher.cpp	Mon Jun 21 15:38:59 2010 +0300
@@ -306,6 +306,7 @@
                     if( iController.ViewManager().ViewsActivated() )                    
                         {
                         iController.IssueCommandL( ECalenEventView );
+                        iController.SetLaunchFromExternalApp( ETrue );
                         }
                     else
                         {
--- a/calendarui/controller/src/calencontroller.cpp	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/controller/src/calencontroller.cpp	Mon Jun 21 15:38:59 2010 +0300
@@ -254,6 +254,7 @@
     
     notificationArray.Append(ECalenNotifyLostAlarms);
     notificationArray.Append(ECalenNotifyMissedAlarmViewClosed);
+    notificationArray.Append(ECalenNotifyClearMissedAlarms);
     notificationArray.Append(ECalenNotifyMissedEventViewClosed);
     notificationArray.Append(ECalenNotifyEntryDeleted);
     notificationArray.Append(ECalenNotifyInstanceDeleted);
--- a/calendarui/controller/src/calenmultidbeditor.cpp	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/controller/src/calenmultidbeditor.cpp	Mon Jun 21 15:38:59 2010 +0300
@@ -164,16 +164,7 @@
     iPicture = new( ELeave )CDbColorPicture( TSize( 0, 0 ) );
     iPicture->SetRgbColorsL(iChoosenColor);
     
-    //set sync value
-    // ESyncStatus
-    TBuf8<KBuffLength> keyBuff;    
-    keyBuff.AppendNum(ESyncStatus);
-    TPckgC<TBool> pkgSyncStatus(iSyncStatus);
-    TRAPD(err,pkgSyncStatus.Set(iCalendarInfo.PropertyValueL(keyBuff)));
-    if( KErrNone == err )
-        {
-        iSyncStatus = pkgSyncStatus();
-        }
+    
     
     LoadColorsL();
     
@@ -247,12 +238,7 @@
 			
 		case EAknSoftkeyChange:
 		    {
-	        if( ECalenMultiDbSyncStatus == IdOfFocusControl() )
-                  {
-                  SetSyncFieldL( !iSyncStatus ); 
-                  iSyncStatus = !iSyncStatus;
-                  }
-		    else if( ECalenMultiDbHiddenVisible == IdOfFocusControl() )
+			if( ECalenMultiDbHiddenVisible == IdOfFocusControl() )
 		        {
 		        iCalendarStatus = iCalendarInfo.Enabled();
 
@@ -375,13 +361,8 @@
         case EAknSoftkeyChange:
             {
             isExitForm=EFalse;
-	        if( ECalenMultiDbSyncStatus == IdOfFocusControl() )
-                  {
-                  SetSyncFieldL( !iSyncStatus ); 
-                  iSyncStatus = !iSyncStatus;
-                  }
-			else if( ECalenMultiDbHiddenVisible == IdOfFocusControl() )
-                {
+			if( ECalenMultiDbHiddenVisible == IdOfFocusControl() )
+				{
                 iCalendarStatus = iCalendarInfo.Enabled();
 
                 if( ECalenMultiDbHidden == iCalendarStatus )
@@ -483,25 +464,7 @@
     {
     TRACE_ENTRY_POINT;
     
-    if(iEditFlag)
-        {
-        TBuf8<KBuffLength> keyBuff;    
-        keyBuff.AppendNum(ESyncConfigEnabled);
-        TBool syncConfigEnabled = EFalse;
-        TPckgC<TBool> pkgSyncConfigEnabled(syncConfigEnabled);
-        
-        TRAPD(err,pkgSyncConfigEnabled.Set(iCalendarInfo.PropertyValueL(keyBuff)));
-        syncConfigEnabled = pkgSyncConfigEnabled();
-        
-        //If this sync property(ESyncConfigEnabled) is set and enabled , 
-        //then sync on/off should not be shown be to the user.
-        //This behaviour is only for certain calendars created 
-        //from device sync with this property set.
-        if(err == KErrNone && syncConfigEnabled)
-            {
-            DeleteLine(ECalenMultiDbSyncStatus);
-            }
-        }
+    
     
     // Set data to controls in the editor.
     SetDataToFormL();
@@ -581,8 +544,7 @@
 
     iCalendarStatus = iCalendarInfo.Enabled();
     
-    //Set the the sync status
-    SetSyncFieldL(iSyncStatus);
+  
         
     if( ECalenMultiDbHidden == iCalendarStatus )
         {
@@ -797,16 +759,7 @@
     		iCalendarInfo.SetColor(iColVal);
     		}
 
-        //Filling the sync value into metadata
-       	if(ControlOrNull(ECalenMultiDbSyncStatus))
-       	    {
-            TBuf8<KBuffLength> keyBuff;
-            keyBuff.Zero();
-            keyBuff.AppendNum(ESyncStatus);
-
-            TPckgC<TBool> pkgSyncStatus(iSyncStatus);
-            iCalendarInfo.SetPropertyL(keyBuff, pkgSyncStatus);
-       	    }
+        
 
         if( IsVisiblityFieldEditedL( iCalendarStatus ) )
             {
@@ -1007,12 +960,7 @@
                 }
                 break;
                     
-            case ECalenMultiDbSyncStatus:
-                {
-                SetSyncFieldL( !iSyncStatus ); 
-                iSyncStatus = !iSyncStatus;
-                }
-                break;
+
                 
             case ECalenMultiDbHiddenVisible:
                 {
@@ -1069,7 +1017,6 @@
 
         case ECalenMultiDbColor:
         case ECalenMultiDbHiddenVisible: 
-        case ECalenMultiDbSyncStatus:
             {
             resId = R_CALEN_MULTIDB_MSK_CHANGE_CBA;
             }
--- a/calendarui/controller/src/calenmultipledbui.cpp	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/controller/src/calenmultipledbui.cpp	Mon Jun 21 15:38:59 2010 +0300
@@ -766,12 +766,7 @@
     iCalendarInfoOriginal->SetColor(iCalendarInfoEdited->Color());
     iCalendarInfoOriginal->SetEnabled(iCalendarInfoEdited->Enabled());
     TBuf8<KBuffLength> keyBuff;
-    TBool syncstatus = EFalse;
-    keyBuff.Zero();
-    keyBuff.AppendNum( ESyncStatus ); 
-    TPckgC<TBool> pckgSyncStatusValue(syncstatus);
-    TRAP_IGNORE(pckgSyncStatusValue.Set(iCalendarInfoEdited->PropertyValueL( keyBuff ))); 
-    iCalendarInfoOriginal->SetPropertyL( keyBuff, pckgSyncStatusValue );                
+          
 
     iDbEditor = CCalenMultiDBEditor::NewL(*this,*iCalendarInfoEdited, iController,
             ETrue);
@@ -867,21 +862,10 @@
     TBool changed = EFalse;
     
     HBufC* editedName = aCalendarInfoModified.NameL().AllocLC();
-    TBool syncstatusOriginal;
-    TBool syncstatusModified;
-    TBuf8<KBuffLength> keyBuff;
-    keyBuff.Zero();
-    keyBuff.AppendNum( ESyncStatus ); 
-    TPckgC<TBool> pckgSyncStatusValueOriginal(syncstatusOriginal);
-    pckgSyncStatusValueOriginal.Set(aCalendarInfoOriginal.PropertyValueL( keyBuff ));
-    TPckgC<TBool> pckgSyncStatusValueModified(syncstatusModified);
-    TRAP_IGNORE(pckgSyncStatusValueModified.Set(aCalendarInfoModified.PropertyValueL( keyBuff )));
-    syncstatusOriginal = pckgSyncStatusValueOriginal();
-    syncstatusModified = pckgSyncStatusValueModified();
+
     if (editedName->Compare(aCalendarInfoOriginal.NameL())
             || aCalendarInfoModified.Color() != aCalendarInfoOriginal.Color()
-            || aCalendarInfoModified.Enabled()!= aCalendarInfoOriginal.Enabled()
-            || syncstatusOriginal != syncstatusModified) 
+            || aCalendarInfoModified.Enabled()!= aCalendarInfoOriginal.Enabled())
         {
         changed = ETrue;
         }
@@ -925,16 +909,16 @@
             CleanupClosePushL(calendarInfoList);
             if(calendarInfoList.Count())
                 {
-                TInt currentIndex =  iListBox->CurrentItemIndex();
+                TInt currentIndex =  iCurrentIndex = iListBox->CurrentItemIndex();
                 HBufC* calendarFileName = 
                         calendarInfoList[currentIndex]->FileNameL().AllocLC();
-                if (calendarFileName->CompareF(
-                        _L("c:Calendar1")))
+                if ((calendarFileName->CompareF(
+                                        iController.Services().SessionL().DefaultFileNameL())))
                     {
                     DeleteItemL();
                     }
                 CleanupStack::PopAndDestroy(calendarFileName);
-                }
+				}
             CleanupStack::PopAndDestroy(&calendarInfoList);
             exitCode =  EKeyWasConsumed;
             } 
@@ -1349,8 +1333,13 @@
         _LIT8( KCalendarOwnerName, "myself" );
         aCalendarInfo.SetPropertyL(keyBuff, KCalendarOwnerName);
         }
-
-
+    
+    TBool syncstatus = ETrue;
+    keyBuff.Zero();
+    keyBuff.AppendNum( ESyncStatus ); 
+    TPckgC<TBool> pckgSyncStatusValue(syncstatus); 
+    aCalendarInfo.SetPropertyL( keyBuff, pckgSyncStatusValue );
+        
     TRACE_EXIT_POINT    
     }
 
--- a/calendarui/controller/src/calensettingsstate.cpp	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/controller/src/calensettingsstate.cpp	Mon Jun 21 15:38:59 2010 +0300
@@ -153,8 +153,7 @@
             ActivateCurrentStateL(aStateMachine);
             }
             break;
-        case ECalenNotifySettingsChanged:
-            break;
+
         default:
             // default is defer all other notifications when we are in setting state
             iOutstandingNotifications.InsertL(aNotification);
--- a/calendarui/editors/inc/CalenEditorDataHandler.h	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/editors/inc/CalenEditorDataHandler.h	Mon Jun 21 15:38:59 2010 +0300
@@ -340,11 +340,6 @@
      */
     TBool LocationEnabledInUiL();
 
-    /**
-     * @brief Returns ETrue if the user is creating a new entry, EFalse if the user
-     *        is editing an existing entry.
-     */
-    TBool IsCreatingNew() const;
 
     /**
      * @brief Sets the default values when creating a new entry.
@@ -485,6 +480,11 @@
     
     
 public:
+    /**
+     * @brief Returns ETrue if the user is creating a new entry, EFalse if the user
+     *        is editing an existing entry.
+     */
+    TBool IsCreatingNew() const;
 
     /**
      * @brief Set if calendar is been edited or not with previous and current collection id
--- a/calendarui/editors/inc/calenreminderfield.h	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/editors/inc/calenreminderfield.h	Mon Jun 21 15:38:59 2010 +0300
@@ -192,6 +192,12 @@
      *        before start time
      */
     TTimeIntervalMinutes iAlarmOffset;
+    /**
+     * @var isAllDayInitialOffsetSet
+     * @brief To check if initial offset
+     * 		for all day event is set correctly
+     */
+    TBool isAllDayInitialOffsetSet;
     };
 
 #endif // CALENALARMFIELDS_H
--- a/calendarui/editors/src/calenreminderfield.cpp	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/editors/src/calenreminderfield.cpp	Mon Jun 21 15:38:59 2010 +0300
@@ -85,6 +85,7 @@
     TRACE_ENTRY_POINT;
     
     iIsAlarmOnOff = CCalenReminderField::EAlarmNoAlarm;
+    isAllDayInitialOffsetSet = EFalse;
     
     TRACE_EXIT_POINT;
     }
@@ -233,11 +234,23 @@
     {
     TRACE_ENTRY_POINT;
 
-    // Updating operation is executed only if alarm date/time field exists.
-    if( iUnifiedEditor.Edited().IsAlarmActivated() )
-        {
-        TTime start = iUnifiedEditor.Edited().EventDateTime();
-        TTime alarm = start + iAlarmOffset;
+        // Updating operation is executed only if alarm date/time field exists.
+       if( iUnifiedEditor.Edited().IsAlarmActivated() )
+            {
+            TTime start = iUnifiedEditor.Edited().EventDateTime();
+            TTime alarm;
+		//For a new allday event when the start time is changed for the first time
+		//alarm time must be updated correctly 
+            if(iUnifiedEditor.Edited().IsAllDayEvent() && !isAllDayInitialOffsetSet 
+                    && iUnifiedEditor.EditorDataHandler().IsCreatingNew())
+                {
+                alarm = CalenDateUtils::DefaultTime(start)+iAlarmOffset;
+                isAllDayInitialOffsetSet = ETrue;
+                }
+            else
+                {
+                alarm = start + iAlarmOffset;
+                }
         alarm = CalenDateUtils::LimitToValidTime( alarm );
         iUnifiedEditor.Edited().SetAlarmDateTimeL( alarm );
         SetDataToEditorL();
--- a/calendarui/editors/src/calenunifiededitor.cpp	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/editors/src/calenunifiededitor.cpp	Mon Jun 21 15:38:59 2010 +0300
@@ -1287,7 +1287,7 @@
             
             aMenuPane->AddMenuItemsL( R_CALEN_UNIFIED_EDITOR_DEFAULT_MENUPANE );
 
-            if(  !CCalenLocationUtil::IsMapProviderAvailableL() )   
+            if( (iEntryType == CCalEntry::ETodo) || !(CCalenLocationUtil::IsMapProviderAvailableL()) )   
                 {
                 aMenuPane->DeleteMenuItem( ECalenGetLocation );
                 }
--- a/calendarui/editors/src/calenunifiededitorcontrol.cpp	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/editors/src/calenunifiededitorcontrol.cpp	Mon Jun 21 15:38:59 2010 +0300
@@ -676,6 +676,12 @@
     TRACE_ENTRY_POINT;
     
     iAllDayField->SetAllDayEvent( aActive );
+    //set defalut alarmtime when allday field is activated/deactivated
+    if(iUnifiedEditor.EditorFields().IsAlarmActiveInForm())
+        {
+        iUnifiedEditor.EditorDataHandler().SetDefaultAlarmDateTimeL();
+        iReminderField->SetDataToEditorL();
+        }
     
     TRACE_EXIT_POINT
     }
--- a/calendarui/globaldata/src/calenglobaldata.cpp	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/globaldata/src/calenglobaldata.cpp	Mon Jun 21 15:38:59 2010 +0300
@@ -330,6 +330,11 @@
         delete iCalSession;
         }
     
+   if (iCalendarInfoList.Count())
+       {
+       iCalendarInfoList.ResetAndDestroy();
+       }
+   
     if( iFileMappingArray.Count() )
         {
         iFileMappingArray.ResetAndDestroy();
@@ -341,11 +346,6 @@
 
     Dll::SetTls(NULL);
 
-    if (iCalendarInfoList.Count())
-        {
-        iCalendarInfoList.ResetAndDestroy();
-        }
-
     if (iCalendarsSession)
         {
         delete iCalendarsSession;
--- a/calendarui/inc/calendar.hrh	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/inc/calendar.hrh	Mon Jun 21 15:38:59 2010 +0300
@@ -91,6 +91,7 @@
     ECalenSnoozeTimeItemId,
     ECalenDefaultViewItemId,
     ECalenWeekFormatItemId,
+    ECalenWeekNumberItemId,
     ECalenWeekTitleItemId,
     ECalenExtCalendarItemId,
     ECalenDefaultMailboxId,
--- a/calendarui/loc/calendar.loc	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/loc/calendar.loc	Mon Jun 21 15:38:59 2010 +0300
@@ -2639,5 +2639,23 @@
 //w:
 //r:9.2
 #define qtn_todo_all_task_updated  "All to-do notes updated"
+
+//d:Confirmation note shown, when tasks are updated
+//l:list_setting_pane_t1/opt1
+//w:
+//r:9.2
+#define qtn_cale_set_show_wk_number  "Show week number"
+
+//d:Confirmation note shown, when tasks are updated
+//l:list_set_graphic_pane_t1
+//w:
+//r:9.2
+#define qtn_cale_set_show_wk_number_yes  "Yes"
+
+//d:Confirmation note shown, when tasks are updated
+//l:list_set_graphic_pane_t1
+//w:
+//r:9.2
+#define qtn_cale_set_show_wk_number_no  "No"
         
 // End of File
--- a/calendarui/organizerplugin/aiagendaplugin2/src/aicalendarplugin2.cpp	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/organizerplugin/aiagendaplugin2/src/aicalendarplugin2.cpp	Mon Jun 21 15:38:59 2010 +0300
@@ -673,6 +673,7 @@
         Clean( EAICalendarPlugin2EventTimeStart, lineUsage + 1 );
         Clean( EAICalendarPlugin2EventTimeEnd, lineUsage + 1 );
         Clean( EAICalendarPlugin2EventTextSecondLine, lineUsage + 1 );
+		Clean( EAICalendarPlugin2TimeStartAndSubject, lineUsage + 1 );
 
         if( ( iEventData->TomorrowEventArray().Count() > 0 ) &&
             ( iConstantData->iDaysToHandleAsNotToday == KAIRangeTomorrowOnly ) )
@@ -804,8 +805,11 @@
                 // some languages needs two rows for publishing
                 cleanInfo = EFalse;
                 // display "Next event on: [day of the week] [date]"
-                PublishIconL( EAICalendarPlugin2NoMoreEventsForToday, 0, EAICalendarPlugin2InfoIcon );
-                iCurrentObserver->Publish( *this, EAICalendarPlugin2InfoText, nextOn, 0 );
+                
+				PublishIconL( EAICalendarPlugin2NoEventsForToday, publishIndex);
+				
+				iCurrentObserver->Publish( *this, EAICalendarPlugin2TimeStartAndSubject, nextOn, publishIndex);
+                
                 }
             ++lineUsage;
             ++publishIndex;
@@ -814,9 +818,22 @@
             focusItem.iType = EAI2CalOpenOnEventDay;
             focusItem.iEntryTime = eventTime;
             focusDataArray.Append( focusItem );
-            /**
-             * 5) Clean the rest
-             */
+            
+            PublishFutureItemsForArrayL(
+                    iEventData->TomorrowEventArray(),
+                    publishIndex, // reference passed and updated inside
+                    lineUsage, // reference passed and updated inside
+                    iActualLinesInUse);
+                    
+            
+            PublishFutureItemsForArrayL(
+                            iEventData->FutureItemArray(),
+                            publishIndex, // reference passed and updated inside
+                            lineUsage, // reference passed and updated inside
+                            iActualLinesInUse);
+            
+           // 5) Clean the rest
+             
             for( ; publishIndex <= iActualLinesInUse; ++publishIndex )
                 {
                 CleanAll( publishIndex );
--- a/calendarui/settings/settingsui/BWINS/calensettingsuiu.def	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/settings/settingsui/BWINS/calensettingsuiu.def	Mon Jun 21 15:38:59 2010 +0300
@@ -21,4 +21,6 @@
 	?SetSnoozeTime@CCalenSetting@@QAEXH@Z @ 20 NONAME ; void CCalenSetting::SetSnoozeTime(int)
 	?SnoozeTime@CCalenSetting@@QBEHXZ @ 21 NONAME ; int CCalenSetting::SnoozeTime(void) const
 	?WeekTitle@CCalenSetting@@QBE?AW4TCalenWeekTitle@@XZ @ 22 NONAME ; enum TCalenWeekTitle CCalenSetting::WeekTitle(void) const
+	?SetWeekNumber@CCalenSetting@@QAEXW4TCalenWeekNumber@@@Z @ 23 NONAME ; void CCalenSetting::SetWeekNumber(enum TCalenWeekNumber)
+	?WeekNumberEnable@CCalenSetting@@QBE?AW4TCalenWeekNumber@@XZ @ 24 NONAME ; enum TCalenWeekNumber CCalenSetting::WeekNumberEnable(void) const
 
--- a/calendarui/settings/settingsui/eabi/calensettingsuiu.def	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/settings/settingsui/eabi/calensettingsuiu.def	Mon Jun 21 15:38:59 2010 +0300
@@ -31,4 +31,6 @@
 	_ZTV25CCalenCheckboxSettingItem @ 30 NONAME
 	_ZTV25CCalenNestedSettingDialog @ 31 NONAME
 	_ZTV25CCalenSettingsUiContainer @ 32 NONAME
+	_ZN13CCalenSetting13SetWeekNumberE16TCalenWeekNumber @ 33 NONAME
+	_ZNK13CCalenSetting16WeekNumberEnableEv @ 34 NONAME
 
--- a/calendarui/settings/settingsui/inc/calensetting.h	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/settings/settingsui/inc/calensetting.h	Mon Jun 21 15:38:59 2010 +0300
@@ -74,7 +74,12 @@
      * @return Week title - EWeekTitleNumber | EWeekTitleDuration
      */
     IMPORT_C TCalenWeekTitle WeekTitle() const;
-
+ 	
+	/**
+     * Return week number   
+	 * @return TCalenWeekNumber 
+     */
+    IMPORT_C TCalenWeekNumber WeekNumberEnable() const;
     /**
      * Return setting for calendar alarm snooze time.
      * @return Minutes to snooze.
@@ -132,7 +137,12 @@
      * @param aTitle EWeekTitleNumber | EWeekTitleDuration
      */
     IMPORT_C void SetWeekTitle( TCalenWeekTitle aTitle );
-
+	
+ 	/**
+     * Set week number
+     * @param TCalenWeekNumber
+     */
+   IMPORT_C void SetWeekNumber( TCalenWeekNumber aNumber );
     /**
      * Set snooze time.
      * @param aSnoozeTime Snooze time in minutes.
@@ -215,6 +225,7 @@
     TUid                      iDefaultView;
     TDay                      iWeekFormat;
     TCalenWeekTitle           iWeekTitle;
+    TCalenWeekNumber          iWeekNumber;
     TInt                      iSnoozeTime;
     CCalenCustomisationManager::CCalenPluginStatusArray  iPluginAvailability;
 #ifdef RD_CALEN_EXTERNAL_CAL
--- a/calendarui/settings/settingsui/inc/calensettingsuicontainer.h	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/settings/settingsui/inc/calensettingsuicontainer.h	Mon Jun 21 15:38:59 2010 +0300
@@ -241,6 +241,8 @@
         TInt iDefView;
         // week format enumeration
         TInt iWeekFormat;
+		// week number enumeration
+        TInt iWeekNumberEnable;
         // week title enumeration
         TInt iWeekTitle;
         // Default mailbox enumeration
--- a/calendarui/settings/settingsui/src/calensetting.cpp	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/settings/settingsui/src/calensetting.cpp	Mon Jun 21 15:38:59 2010 +0300
@@ -88,6 +88,7 @@
 CCalenSetting::CCalenSetting()
     : iWeekFormat( EMonday ),
       iWeekTitle( EWeekTitleNumber ),
+      iWeekNumber( EWeekNumberOff ),
       iSnoozeTime( KDefaultSnoozeTime ),
       iToolbar(1)
 
@@ -187,6 +188,18 @@
     }
 
 // ---------------------------------------------------------
+// CCalenSetting::WeekTitle
+// Return setting type of week title
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+EXPORT_C TCalenWeekNumber CCalenSetting::WeekNumberEnable() const
+    {
+    TRACE_ENTRY_POINT;
+    TRACE_EXIT_POINT;
+    return iWeekNumber;
+    }
+// ---------------------------------------------------------
 // CCalenSetting::SnoozeTime
 // Return the snooze time setting.
 // (other items were commented in a header).
@@ -553,6 +566,21 @@
     }
 
 // ---------------------------------------------------------
+// CCalenSetting::SetWeekNumber
+// Set week title
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+EXPORT_C void CCalenSetting::SetWeekNumber( TCalenWeekNumber aNumber )
+    {
+    TRACE_ENTRY_POINT;
+
+    iWeekNumber = aNumber;
+
+    TRACE_EXIT_POINT;
+    }
+
+// ---------------------------------------------------------
 // CCalenSetting::SetSnoozeTime
 // Return the snooze time setting.
 // (other items were commented in a header).
@@ -649,6 +677,9 @@
     // Central Repository data matches.
     User::LeaveIfError( repository->Get( KCalendarWeekViewTitle, tmp ) );
     iWeekTitle = static_cast<TCalenWeekTitle>( tmp );
+    
+    User::LeaveIfError( repository->Get( KCalendarWeekViewNumber, tmp ) );
+    iWeekNumber = static_cast<TCalenWeekNumber>( tmp );
 
     User::LeaveIfError( repository->Get( KCalendarSnoozeTime, tmp ) );
     iSnoozeTime = tmp;
@@ -697,6 +728,9 @@
     // Central Repository data matches.
     tmp = static_cast<TCalenWeekTitle>( iWeekTitle );
     User::LeaveIfError( repository->Set( KCalendarWeekViewTitle, tmp ) );
+    
+    tmp = static_cast<TCalenWeekNumber>( iWeekNumber );
+    User::LeaveIfError( repository->Set( KCalendarWeekViewNumber, tmp ) );
 
     tmp = iSnoozeTime;
     User::LeaveIfError( repository->Set( KCalendarSnoozeTime, tmp ) );
--- a/calendarui/settings/settingsui/src/calensettingsuicontainer.cpp	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/settings/settingsui/src/calensettingsuicontainer.cpp	Mon Jun 21 15:38:59 2010 +0300
@@ -788,6 +788,12 @@
                          R_CALEN_WEEKFORMAT_TEXTS,
                          ordinal++ );
 
+    AddEnumerationItemL( iWeekNumberEnable,
+                         ECalenWeekNumberItemId,
+                         R_CALEN_SETTING_WEEKNUMBER_TITLE,
+                         R_CALEN_SETTING_WEEKNUMBER,
+                         R_CALEN_WEEKNUMBER_TEXTS,
+                         ordinal++ );
 
     // 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.
@@ -839,6 +845,7 @@
 
     // Hide the week title setting if the week start is anything other than Monday.
     Item( ECalenWeekTitleItemId )->SetHidden( !ShouldShowWeekTitleItem() );
+    Item( ECalenWeekNumberItemId )->SetHidden( !ShouldShowWeekTitleItem() );
 
     TRACE_EXIT_POINT;
     }
@@ -935,10 +942,12 @@
     if ( wasShown != doShow )
         {
         Item( ECalenWeekTitleItemId )->SetHidden( !doShow );
+        Item( ECalenWeekNumberItemId )->SetHidden( !doShow );
 
         if ( !doShow )
             {
             Item( ECalenWeekTitleItemId )->LoadL();
+            Item( ECalenWeekNumberItemId )->LoadL();            
             }
 
         iSettingItemArray->RecalculateVisibleIndicesL();
@@ -1012,7 +1021,7 @@
         iPageStatus = aPageStatus;
         // for week title only two options available
         // so let's toggle instead of opening setting page
-        if( item->Identifier() != ECalenWeekTitleItemId )
+        if( (item->Identifier() != ECalenWeekTitleItemId) && (item->Identifier() != ECalenWeekNumberItemId))
             {
             item->EditItemL( aCommand == EAknCmdOpen );
             }
@@ -1052,6 +1061,14 @@
                     item->LoadL();
                     item->UpdateListBoxTextL();
                     break;
+                case ECalenWeekNumberItemId:
+                    // toggling option done here
+                    iSetting->SetWeekNumber( static_cast<TCalenWeekNumber>( iWeekNumberEnable ) == EWeekNumberOn ?
+                        EWeekNumberOff : EWeekNumberOn );
+                    iWeekNumberEnable = iSetting->WeekNumberEnable();
+                    item->LoadL();
+                    item->UpdateListBoxTextL();
+                    break;
                 case ECalenDefaultMailboxId:
                     item->StoreL();
                     StoreMailboxSettingsL();
@@ -1267,6 +1284,7 @@
     iDefView = iSetting->DefaultView().iUid;
     iWeekFormat = iSetting->WeekFormat();
     iWeekTitle = iSetting->WeekTitle();
+    iWeekNumberEnable = iSetting->WeekNumberEnable();
     iSnoozeTime = iSetting->SnoozeTime();
 #ifdef RD_SCALABLE_UI_V2_NO_TOOLBAR_SETTING
     iToolbar = iSetting->Toolbar();
--- a/calendarui/views/group/calenviews.mmp	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/views/group/calenviews.mmp	Mon Jun 21 15:38:59 2010 +0300
@@ -155,7 +155,7 @@
 LIBRARY			apmime.lib
 LIBRARY         multicaluidialog.lib
 LIBRARY			touchfeedback.lib //MTouchFeedBack
-
+LIBRARY         gesturehelper.lib
 // File logging
 LIBRARY flogger.lib
 LIBRARY aknnotify.lib
--- a/calendarui/views/inc/calendaycontainer.h	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/views/inc/calendaycontainer.h	Mon Jun 21 15:38:59 2010 +0300
@@ -23,7 +23,7 @@
 //  INCLUDES
 #include <eiklbo.h>
 #include <caleninstanceid.h>            // TCalenInstanceId
-
+#include <gestureobserver.h>
 
 #include "calencontainer.h"
 #include "CalendarVariant.hrh"
@@ -39,12 +39,19 @@
 class CCalInstance;
 class CAknsFrameBackgroundControlContext;
 class TCalenInstanceId;
+
+namespace GestureHelper
+    {
+    class CGestureHelper;
+    }
+
 //  CLASS DEFINITIONS
 /**
  * CCalenDayContainer container control class for DayView.
  */
 NONSHARABLE_CLASS(  CCalenDayContainer ) : public CCalenContainer,
-                                                   public MEikListBoxObserver
+                                                   public MEikListBoxObserver,
+                                                   public GestureHelper::MGestureObserver
     {
 public: // Data
 
@@ -177,7 +184,13 @@
      */
     void HandleLongTapEventL( const TPoint& aPenEventLocation, 
                               const TPoint& aPenEventScreenLocation );
-
+    
+    /**From MGestureObserver
+     * Handle the gesture event
+     * @param aEvent event describing the gesture 
+     */
+    virtual void HandleGestureL( const GestureHelper::MGestureEvent& aEvent );
+    
     /**
      * Check whether entry exists or not
      */
@@ -386,6 +399,14 @@
     TTime& iDate;                   // Current day
     TInt& iHighlightedRowNumber;
     TInt& iFirstEntryOnScreenIndex;
+    
+    /**
+     * Gesture helper provides functionality to convert a stream of pointer 
+     * events into a logical gesture.
+     * Own.
+     */
+    GestureHelper::CGestureHelper* iGestureHelper;
+    TBool iGestureHandled;
     };
 
 #endif // CALENDAYCONTAINER_H
--- a/calendarui/views/inc/caleneventview.h	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/views/inc/caleneventview.h	Mon Jun 21 15:38:59 2010 +0300
@@ -157,6 +157,11 @@
      */
     void UpdateToolbarButtonsL();
     
+    /**
+     * Set date to Status pane. Default implementation does nothing.
+     * @param aTime it will be refrect to StatusPane
+     */
+    void SetStatusPaneFromActiveContextL();
 private:
     TVwsViewId iPreviousViewId;  
 
--- a/calendarui/views/inc/caleneventviewcontainer.h	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/views/inc/caleneventviewcontainer.h	Mon Jun 21 15:38:59 2010 +0300
@@ -27,7 +27,6 @@
 #include "calencontainer.h"
 #include <eikmenup.h>
 #include <cenrepnotifyhandler.h>
-#include <eiklabel.h>
 #include <AknServerApp.h>
 // forward declarations
 class CEikRichTextEditor;
@@ -465,14 +464,6 @@
      * viewer/editor.
      */
     RPointerArray<CCalEntry>& AllInstancesL();
-    /**
-      * Get the available label rect for this container
-      */
-     TRect GetLabelRectL( );    
-	 
-	 
-     void SetLabelContentL( CEikLabel& aLabel );
-
 
     /**
     * From MCenRepNotifyHandlerCallback
--- a/calendarui/views/inc/calenmonthcontainer.h	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/views/inc/calenmonthcontainer.h	Mon Jun 21 15:38:59 2010 +0300
@@ -23,11 +23,12 @@
 //  INCLUDES
 
 #include <eiklbo.h>
+#include <e32std.h>
+#include <gestureobserver.h>  //MGestureObserver
+
 #include "calencontainer.h"
 #include "calenmonthdata.h" // CMonthDataArray is typedef
 
-#include <e32std.h>
-
 // FORWARD DECLARATIONS
 class CAknGrid;
 class CAknIconArray;
@@ -39,6 +40,10 @@
 class TAknLayoutRect;
 class CCalenPreview;
 
+namespace GestureHelper
+    {
+    class CGestureHelper;
+    }
 
 //  CLASS DEFINITIONS
 
@@ -47,7 +52,8 @@
  */
 
 NONSHARABLE_CLASS( CCalenMonthContainer ) : public CCalenContainer,
-                                            public MEikListBoxObserver
+                                            public MEikListBoxObserver,
+                                            public GestureHelper::MGestureObserver
     {
 public:  // Constructors and destructor
     /**
@@ -124,6 +130,13 @@
     
     void HandleLongTapEventL( const TPoint& aPenEventLocation, 
                               const TPoint& aPenEventScreenLocation );
+
+    /**From MGestureObserver
+     * Handle the gesture event
+     * @param aEvent event describing the gesture 
+     */
+    virtual void HandleGestureL( const GestureHelper::MGestureEvent& aEvent );
+    
     void HidePopup();
     
     void RedrawPreviewPane();
@@ -371,6 +384,11 @@
     TTime iOldFirstDayOfGrid;
 	TBool iChangeMonth;
 	TBool iChangeDay;
+	
+    // Own: Gesture helper
+    GestureHelper::CGestureHelper* iGestureControl;
+    // Own: this variable indicates that gesture event was handled.
+    TBool iGestureHandled;
     };
 
 #endif //CALENMONTHCONT_H
--- a/calendarui/views/inc/calenweekcontainer.h	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/views/inc/calenweekcontainer.h	Mon Jun 21 15:38:59 2010 +0300
@@ -19,17 +19,19 @@
 #ifndef CALENWEEKCONT_H
 #define CALENWEEKCONT_H
 
-//  INCLUDES
-#include "calencontainer.h"
-#include "calenweekcallback.h"
-#include "calenweekdata.h"
 
-#include "calenglobaldata.h"
 #include <calsession.h>
 #include <calenconstants.h>
 #include <AknUtils.h>
 #include <calcommon.h>  // CalCommon::TCalViewFilter
 #include <caleninstanceid.h>            // TCalenInstanceId
+#include <gestureobserver.h>  //MGestureObserver
+
+//  INCLUDES
+#include "calencontainer.h"
+#include "calenweekcallback.h"
+#include "calenweekdata.h"
+#include "calenglobaldata.h"
 
 // FORWARD DECLARATIONS
 class CAknsFrameBackgroundControlContext;
@@ -43,6 +45,11 @@
 class CCalInstanceView;
 class MCalenPreview;
 
+namespace GestureHelper
+    {
+    class CGestureHelper;
+    }
+
 typedef CArrayFixFlat<CCalHourItem*>* CWeekSlotArrayPtr;
 
 NONSHARABLE_CLASS (CCalHourItem):public CBase
@@ -79,7 +86,8 @@
  *  Container control for Week View.
  */
 NONSHARABLE_CLASS( CCalenWeekContainer ) : public CCalenContainer,
-                                           public MCalenWeekCursorObserver
+                                           public MCalenWeekCursorObserver,
+                                           public GestureHelper::MGestureObserver
     {
 public:
     enum TLocaleChangeRedraw
@@ -108,6 +116,7 @@
      * Create icon indices
      */
     void CreateIconIndicesL( RArray<MCalenServices::TCalenIcons>& aIndexArray );
+    
 public:  // New Function
     /**
      * Check with the layoutmanager for any layout chnanges
@@ -194,6 +203,12 @@
     void HandleLongTapEventL( const TPoint& aPenEventLocation, 
                               const TPoint& aPenEventScreenLocation );
     
+    /**
+     * Handle the gesture event
+     * @param aEvent event describing the gesture 
+     */
+    virtual void HandleGestureL( const GestureHelper::MGestureEvent& aEvent );
+    
 private:    // New Function
     TInt HighlightRowFromActiveContextL(TInt aColumn);
 
@@ -441,6 +456,15 @@
     TBool iRow;
     TBool iValidDay;
     TBool iHourChange;
+    
+    /**
+     * Gesture helper provides functionality to convert a stream of pointer 
+     * events into a logical gesture.
+     * Own.
+     */
+    // Own: Gesture helper
+    GestureHelper::CGestureHelper* iGestureControl;
+    TBool iGestureHandled;
     };
 
 #endif //CALENWEEKCONT_H
--- a/calendarui/views/src/calendaycontainer.cpp	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/views/src/calendaycontainer.cpp	Mon Jun 21 15:38:59 2010 +0300
@@ -16,30 +16,12 @@
  *
 */
 
-
-//debug
-#include "calendarui_debug.h"
-
-// INCLUDE FILES
-#include "calendaycontainer.h"
-#include "calencontainerlayoutmanager.h"
-#include "calencontroller.h"
-
+#include <Calendar.rsg>
 #include <calenconstants.h>
 #include <calendateutils.h>
-#include "calendaylistboxmodel.h"
-#include "calendaylistboxview.h"
-#include "calendaylistbox.h"
-#include "calendayview.h"
-#include "CalenUid.h"
 #include <calenagendautils.h>
 #include <calenservices.h>
-#include "calenlocationutil.h"
-
-#include "calendar.hrh"
-#include <Calendar.rsg>
 #include <csxhelp/cale.hlp.hrh>
-
 #include <AknsDrawUtils.h>
 #include <AknsFrameBackgroundControlContext.h>
 #include <AknUtils.h>
@@ -50,17 +32,30 @@
 #include <StringLoader.h>
 #include <calenviewutils.h>
 #include <aknlayoutscalable_apps.cdl.h>
-
 #include <calinstance.h>
 #include <calentry.h>
 #include <calinstanceview.h>
 #include <caltime.h>
-
 #include <AknDef.h>
 #include <calencontext.h>
 #include <akntoolbar.h>
 #include <aknstyluspopupmenu.h>
 #include <barsread.h>
+#include <gesturehelper.h> //CGestureHelper
+
+// INCLUDE FILES
+#include "calendaycontainer.h"
+#include "calencontainerlayoutmanager.h"
+#include "calencontroller.h"
+#include "calenlocationutil.h"
+#include "calendaylistboxmodel.h"
+#include "calendaylistboxview.h"
+#include "calendaylistbox.h"
+#include "calendayview.h"
+#include "CalenUid.h"
+#include "calendar.hrh"
+//debug
+#include "calendarui_debug.h"
 
 //  LOCAL CONSTANTS AND MACROS
 const TInt KLayoutTableGranularity(10);
@@ -105,6 +100,7 @@
     delete iLayoutTable;
     // Skin contexts
     delete iBackgroundSkinContext;
+    delete iGestureHelper;
 
     TRACE_EXIT_POINT;
     }
@@ -123,14 +119,37 @@
         // Single click integration
         case EEventItemSingleClicked:
             {
-            //Handle listbox item selection event
-            //iListBox->HandlePointerEventL(aPointerEvent);
-            if(iView->MenuBar()->IsDisplayed() == EFalse)
+            // left/right gestures (touch down, drag, touch release) are treated
+             // by CEikListBox as single click, probably this should be fixed by AVKON team
+             if ( !iGestureHandled )
+                 {
+                 if(iView->MenuBar()->IsDisplayed() == EFalse)
+                     {
+                     iView->HandleCommandL( ECalenViewCurrentEntry );
+                     }
+                 }
+            break;
+            }
+        case EEventEmptyListClicked:
+            {
+            // left/right gestures (touch down, drag, touch release) are treated
+            // by CEikListBox as single click, probably this should be fixed by AVKON team
+            if ( !iGestureHandled )
                 {
-                iView->HandleCommandL( ECalenViewCurrentEntry );
+                if (iListBox->Model()->NumberOfItems() <= 0)
+                    {
+                    iView->HandleCommandL(ECalenCmdOpenMskDialog);
+                    }
                 }
             break;
             }
+            
+        case EEventEmptyAreaClicked:
+            {
+            // left/right gestures (touch down, drag, touch release) are treated
+            // by CEikListBox as single click, probably this should be fixed by AVKON team
+			break;
+            }
 			
         // Single click integration
         case EEventEnterKeyPressed:
@@ -1228,6 +1247,10 @@
     CAknIconArray* iconList = CreateIconsL( iIconIndices );
     iListBox->ItemDrawer()->ColumnData()->SetIconArray( iconList );
     
+    iGestureHelper = GestureHelper::CGestureHelper::NewL( *this );
+    iGestureHelper->SetHoldingEnabled( EFalse );
+    iGestureHelper->SetDoubleTapEnabled( EFalse );
+    
     TRACE_EXIT_POINT;
     }
 
@@ -1450,13 +1473,18 @@
                 return;
                 }
             }
-        if (iListBox->Model()->NumberOfItems() <= 0)
+        }
+		if(iGestureHelper)
+        {
+        iGestureHelper->HandlePointerEventL( aPointerEvent );
+        if (  iGestureHandled )
             {
-            iView->HandleCommandL(ECalenCmdOpenMskDialog);
+            TRACE_EXIT_POINT;
             return;
             }
         }
 	        	
+	        	
     TInt pointerIndex(-1);    
      // Single click integration
     if ( aPointerEvent.iType == TPointerEvent::EButton1Down
@@ -1479,6 +1507,42 @@
     TRACE_EXIT_POINT;
     }
 
+// ---------------------------------------------------------------------------
+// CCalenDayContainer::HandleGestureL
+// Handle the gesture event
+// ---------------------------------------------------------------------------
+//
+void CCalenDayContainer::HandleGestureL( const GestureHelper::MGestureEvent& aEvent )
+    {
+    TRACE_ENTRY_POINT;
+    GestureHelper::TGestureCode code = aEvent.Code( GestureHelper::MGestureEvent::EAxisBoth );
+    
+    switch ( code )
+        {
+        case GestureHelper::EGestureStart:
+            {
+            iGestureHandled = EFalse;
+            break;
+            }
+        case GestureHelper::EGestureSwipeRight:
+            {
+            HandleNaviDecoratorEventL( EAknNaviDecoratorEventLeftTabArrow );
+            iGestureHandled = ETrue;
+            break;
+            }
+        case GestureHelper::EGestureSwipeLeft:
+            {
+            HandleNaviDecoratorEventL( EAknNaviDecoratorEventRightTabArrow );
+            iGestureHandled = ETrue;
+            break;
+            }
+        default:
+            // Other gestures are not handled here
+            break;
+        }
+    
+    TRACE_EXIT_POINT;
+    }
 // ----------------------------------------------------------------------------
 // CCalenDayContainer::HandleNaviDecoratorEventL
 // ?implementation_description
--- a/calendarui/views/src/caleneventview.cpp	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/views/src/caleneventview.cpp	Mon Jun 21 15:38:59 2010 +0300
@@ -41,6 +41,7 @@
 #include <finditemmenu.h>
 #include "calenattachmentmodel.h" 
 
+#include <aknappui.h>
 // Button position of the MSK CBA button
 const TInt KSK2CBAPosition = 2;
 
@@ -158,8 +159,11 @@
         default:    
         	{
         	cnt->CompletePopulationL();
-        	RedrawStatusPaneL();
-        	UpdateToolbarButtonsL();
+        	if(!iAvkonAppUi->IsDisplayingMenuOrDialog())
+        	    {
+                RedrawStatusPaneL();
+                UpdateToolbarButtonsL();
+        	    }
         	nextStep = CCalenView::EDone;
         	}
         	break;
@@ -291,7 +295,10 @@
         iServices.GetAttachmentData()->Reset();
         }
     iPreviousViewId.iViewUid = KNullUid;
-
+    if (!iAvkonAppUi->IsDisplayingMenuOrDialog())
+        {
+        iSPUtils->HideNaviPane();
+        }
     // Remove the toolbar buttons for event viewer before exiting from event view
     TRAP_IGNORE(RemoveToolbarButtonsL());
     
@@ -340,6 +347,7 @@
     iSPUtils->UnderLineTitleText( EFalse );
     iSPUtils->SetTitleText( titleText );    // ownership passed
     CleanupStack::Pop( titleText );
+    SetStatusPaneFromActiveContextL();
     iSPUtils->RefreshStatusPane();
 
     TRACE_EXIT_POINT;
@@ -407,7 +415,7 @@
                 }
             else
                 {
-                if(cnt->GetFindItemMenu()->CommandIsValidL(aCommand))
+                if(cnt->GetFindItemMenu()->CommandIsValidL(aCommand) && toolbarImpl)
                     {
                     CAknToolbar& toolbar = toolbarImpl->Toolbar();
                     toolbar.SetToolbarVisibility( EFalse );
@@ -440,7 +448,7 @@
            }
            break;
         default:
-            if(cnt->GetFindItemMenu()->CommandIsValidL(aCommand))
+            if(cnt->GetFindItemMenu()->CommandIsValidL(aCommand) && toolbarImpl)
                 {
                 CAknToolbar& toolbar = toolbarImpl->Toolbar();
                 toolbar.SetToolbarVisibility( EFalse );
@@ -810,7 +818,7 @@
     {
     // Get the existing toolbar from MCalenservices
     MCalenToolbar* toolbarImpl = iServices.ToolbarOrNull();
-    CAknToolbar& toolbar = toolbarImpl->Toolbar();
+    
     TCalCollectionId colId = iServices.Context().InstanceId().iColId;
       
     // get multiple db data from services
@@ -822,20 +830,57 @@
     TInt index = calendarInfoList.Find( *calendarFileName, 
     CCalenEventViewContainer::CalendarInfoIdentifierL);
     CleanupStack::PopAndDestroy(calendarFileName);
-    
-    
-    if(!(calendarInfoList[index]->Enabled()))
+    if(toolbarImpl)
         {
-        toolbar.SetItemDimmed( ECalenSend, ETrue, ETrue );
-        toolbar.SetItemDimmed( ECalenDeleteCurrentEntry, ETrue, ETrue );
-        toolbar.SetItemDimmed( ECalenEditCurrentEntry, ETrue, ETrue );
-        }
-    else
-        {
-        toolbar.SetItemDimmed( ECalenSend, EFalse, ETrue );
-        toolbar.SetItemDimmed( ECalenDeleteCurrentEntry, EFalse, ETrue );
-        toolbar.SetItemDimmed( ECalenEditCurrentEntry, EFalse, ETrue );
+        CAknToolbar& toolbar = toolbarImpl->Toolbar();
+        if(!(calendarInfoList[index]->Enabled()))
+            {
+            toolbar.SetItemDimmed( ECalenSend, ETrue, ETrue );
+            toolbar.SetItemDimmed( ECalenDeleteCurrentEntry, ETrue, ETrue );
+            toolbar.SetItemDimmed( ECalenEditCurrentEntry, ETrue, ETrue );
+            }
+        else
+            {
+            toolbar.SetItemDimmed( ECalenSend, EFalse, ETrue );
+            toolbar.SetItemDimmed( ECalenDeleteCurrentEntry, EFalse, ETrue );
+            toolbar.SetItemDimmed( ECalenEditCurrentEntry, EFalse, ETrue );
+            }
         }
     CleanupStack::PopAndDestroy(&calendarInfoList);
     }
+// ----------------------------------------------------------------------------
+// CCalenEventView::SetStatusPaneFromActiveContextL
+// Set the calendar name to status pane
+// (other items were commented in a header).
+// ----------------------------------------------------------------------------
+//
+void CCalenEventView::SetStatusPaneFromActiveContextL()
+    {
+    TRACE_ENTRY_POINT;
+    
+    RPointerArray<CCalCalendarInfo> calendarInfoList;
+    iServices.GetAllCalendarInfoL(calendarInfoList);
+    CleanupClosePushL(calendarInfoList);
+
+    TCalCollectionId colId; 
+    colId = iServices.Context().InstanceId().iColId;
+
+    HBufC* calendarFileName = iServices.GetCalFileNameForCollectionId(colId).AllocLC();
+    TInt calIndex = calendarInfoList.Find( *calendarFileName, 
+            CCalenEventViewContainer::CalendarInfoIdentifierL);
+    CleanupStack::PopAndDestroy(calendarFileName);
+    if(calIndex != KErrNotFound)
+        {
+        HBufC* calendarName = calendarInfoList[calIndex]->NameL().AllocLC();
+        TRgb calendarColor = calendarInfoList[calIndex]->Color();
+        // navi pane
+        CAknNavigationDecorator* naviLabel = iSPUtils->ShowNaviPaneL( *calendarName, calendarColor );
+        CleanupStack::PopAndDestroy(calendarName);
+        }
+    CleanupStack::PopAndDestroy(&calendarInfoList);
+    
+
+    iSPUtils->RefreshStatusPane();
+    TRACE_EXIT_POINT;
+    }
 //end of file
--- a/calendarui/views/src/caleneventviewcontainer.cpp	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/views/src/caleneventviewcontainer.cpp	Mon Jun 21 15:38:59 2010 +0300
@@ -18,7 +18,6 @@
 // system includes
 #include <AknLayoutFont.h>
 #include <aknnavide.h>      // CAknNavigationDecorator
-#include <aknnavilabel.h>   // CAknNaviLabel
 #include <AknsBasicBackgroundControlContext.h>
 #include <AknBidiTextUtils.h>
 #include <AknsDrawUtils.h>
@@ -158,8 +157,6 @@
         };
         
     delete iCenRepSession;	
-    if(iLabel)
-    delete iLabel;
     
     //Reset the attachment posiitons array
     iAttachmentPosInfoArray.Reset();
@@ -200,10 +197,6 @@
     iTextEditor->SetMopParent(this);
     iTextEditor->SetRect( Rect() );
 	
-    iLabel = new (ELeave) CEikLabel;
-    iLabel->SetContainerWindowL(*this);
-    iLabel->SetTextL(_L(""));
-    iLabel->SetRect(Rect());
         
     iDocHandler->SetExitObserver( this );
     iTextEditor->EnableKineticScrollingL(ETrue);
@@ -342,7 +335,7 @@
     {
     TRACE_ENTRY_POINT;
     TRACE_EXIT_POINT;
-    return 2;
+    return 1;
     }
 
 // ----------------------------------------------------------------------------
@@ -361,10 +354,6 @@
             control = iTextEditor;
             break;
             
-        case 1:
-            control = iLabel;
-            break;
-            
         default:
             __ASSERT_DEBUG( 0, User::Invariant() );
             break;
@@ -783,7 +772,6 @@
 	// Initialize icon drawer
 	CCalenIconDrawer* iconDrawer = CreateAndInitializeIconsDrawerL();
 	
-	SetLabelContentL(*iLabel);
 	// add subject field
 	AddSubjectFieldL();	
 	
@@ -1007,7 +995,6 @@
      listscroll_cale_day_pane.LayoutRect( main_cale_day_pane.Rect(), 
              AknLayoutScalable_Apps::listscroll_cale_day_pane( 0 ).LayoutLine() );
 
-     iLabel->SetRect(GetLabelRectL());
    
       // Listbox layout
       TAknLayoutRect list_cale_pane;
@@ -2458,82 +2445,6 @@
     }
 
 // ----------------------------------------------------------------------------
-// CCalenEventViewContainer::LabelRectL
-// Returns the available label rect for this container
-// ----------------------------------------------------------------------------
-TRect CCalenEventViewContainer::GetLabelRectL()
-    {
-    TRACE_ENTRY_POINT;
-   
-    // Get the main pane
-    TAknLayoutRect main_cale_day_pane;
-    main_cale_day_pane.LayoutRect( Rect(), 
-                    AknLayoutScalable_Apps::main_cale_day_pane().LayoutLine() );
-        
-    TAknLayoutRect listscroll_cale_day_pane;
-    listscroll_cale_day_pane.LayoutRect( main_cale_day_pane.Rect(), 
-            AknLayoutScalable_Apps::listscroll_cale_day_pane(1).LayoutLine() );
-
-    // Create a dummy label to find the layout rect
-    CEikLabel* dummyLabel = new( ELeave ) CEikLabel;
-    CleanupStack::PushL( dummyLabel );
-
-           
-    AknLayoutUtils::LayoutLabel( dummyLabel, listscroll_cale_day_pane.Rect(),
-        AknLayoutScalable_Apps::listscroll_cale_day_pane_t1( 0 ).LayoutLine() );        
-              
-    TRect labelRect = dummyLabel->Rect();
-
-    // Discard the label
-    CleanupStack::PopAndDestroy( dummyLabel );
-    
-    TRACE_EXIT_POINT;
-    return labelRect;
-    }
-// ----------------------------------------------------------------------------
-// CCalenEventViewContainer::SetLabelContentL
-// ----------------------------------------------------------------------------
-//
-void CCalenEventViewContainer::SetLabelContentL( CEikLabel& aLabel ) 
-    {
-    TRACE_ENTRY_POINT;
-    const CFont*  labelFont = NULL;
-    labelFont = AknLayoutUtils::FontFromId(EAknLogicalFontPrimarySmallFont,NULL);
-    aLabel.SetFont( labelFont );
-    aLabel.SetLabelAlignment(ELayoutAlignLeft);
-    aLabel.OverrideColorL( EColorLabelTextEmphasis, KRgbBlack );
-    
-    // get the multiple db data from services
-    RPointerArray<CCalCalendarInfo> calendarInfoList;
-    iServices.GetAllCalendarInfoL(calendarInfoList);
-    CleanupClosePushL(calendarInfoList);
-
-    TCalCollectionId colId; 
-        colId = iServices.Context().InstanceId().iColId;
-  
-    HBufC* calendarFileName = iServices.GetCalFileNameForCollectionId(colId).AllocLC();
-    TInt calIndex = calendarInfoList.Find( *calendarFileName, 
-            CCalenEventViewContainer::CalendarInfoIdentifierL);
-    CleanupStack::PopAndDestroy(calendarFileName);
-    
-    if(calIndex != KErrNotFound)
-        {
-        // add the calendar info's text field
-        aLabel.SetTextL(calendarInfoList[calIndex]->NameL());
-        
-        TInt calendarColor = calendarInfoList[calIndex]->Color().Value();
-        aLabel.OverrideColorL( EColorLabelHighlightFullEmphasis, calendarColor );
-        
-        // Increment the iNumOfLinesBeforeLocField so that map icon is drwan at proper place
-        iNumOfLinesBeforeLocField = 1;
-        }
-    CleanupStack::PopAndDestroy(&calendarInfoList);
-
-    aLabel.CropText();
-    aLabel.SetEmphasis( CEikLabel::EFullEmphasis );  
-    TRACE_EXIT_POINT;
-    }
-
 // ----------------------------------------------------------------------------
 // CCalenEventViewContainer::AddAttachmentFieldL
 // Adds attachment field
--- a/calendarui/views/src/calenmissedalarmsview.cpp	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/views/src/calenmissedalarmsview.cpp	Mon Jun 21 15:38:59 2010 +0300
@@ -246,8 +246,9 @@
         case ECalenCmdGotoCalendar:            
             {
             iHighlightedRowNumber = 0;
+            iServices.IssueNotificationL(ECalenNotifyClearMissedAlarms);
 			iServices.IssueCommandL(aCommand);
-            }
+			}
             break;
         case EAknSoftkeyBack:
         case EAknSoftkeyClose:
@@ -258,7 +259,7 @@
             break;
         case EAknSoftkeyExit:
             {
-         
+            iServices.IssueNotificationL(ECalenNotifyClearMissedAlarms);
             CCalenNativeView::HandleCommandL(aCommand);
             }
             break;
--- a/calendarui/views/src/calenmissedeventview.cpp	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/views/src/calenmissedeventview.cpp	Mon Jun 21 15:38:59 2010 +0300
@@ -33,6 +33,7 @@
 #include <calencontext.h>
 #include <CalenStatusPaneUtils.h>
 #include <caleninstanceid.h>            // TCalenInstanceId
+#include <aknappui.h>
 
 // user includes
 #include "calenmissedeventview.h"
@@ -150,7 +151,10 @@
         default:    
         	{
         	cnt->CompletePopulationL();
-        	RedrawStatusPaneL();
+        	if(!iAvkonAppUi->IsDisplayingMenuOrDialog())
+        	    {
+                RedrawStatusPaneL();
+        	    }
         	
         	//no tool bar in missed event view
         	MCalenToolbar* toolbar = iServices.ToolbarOrNull(); 
--- a/calendarui/views/src/calenmonthcontainer.cpp	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/views/src/calenmonthcontainer.cpp	Mon Jun 21 15:38:59 2010 +0300
@@ -16,28 +16,13 @@
 */
 
 
-//debug
-#include "calendarui_debug.h"
+
 
-// INCLUDE FILES
-#include "calenmonthcontainer.h"
-#include "calencontroller.h"
-#include "calencontainerlayoutmanager.h"
-
+#include <Calendar.rsg>
 #include <calenconstants.h>
 #include <calendateutils.h>
-#include "calendrawutils.h"
-#include "calenmonthconst.h"
-#include "calenmonthgrid.h"
-#include "calenmonthview.h"
-#include "calenpreview.h"
 #include <calenagendautils.h>
-#include "CalenUid.h"
-#include "CleanupResetAndDestroy.h"
-#include "CalenUid.h"
-#include "calendar.hrh"
 #include <calendar.mbg>
-#include <Calendar.rsg>
 #include <csxhelp/cale.hlp.hrh>
 #include <calencontext.h>
 #include <aknlists.h>
@@ -49,11 +34,25 @@
 #include <calinstanceview.h>
 #include <calenservices.h>
 #include <calenviewutils.h>
-
-
 // Layouts
 #include <aknlayoutscalable_apps.cdl.h>
+#include <gesturehelper.h> //CGestureHelper
 
+// INCLUDE FILES
+#include "calenmonthcontainer.h"
+#include "calencontroller.h"
+#include "calencontainerlayoutmanager.h"
+#include "calendrawutils.h"
+#include "calenmonthconst.h"
+#include "calenmonthgrid.h"
+#include "calenmonthview.h"
+#include "calenpreview.h"
+#include "CalenUid.h"
+#include "CleanupResetAndDestroy.h"
+#include "CalenUid.h"
+#include "calendar.hrh"
+//debug
+#include "calendarui_debug.h"
 
 // LOCAL CONSTANTS AND MACROS
 _LIT(KMonthCellFormat, "%F%*D\t");
@@ -116,7 +115,8 @@
 
     delete iGrid;
     delete iMonthDataArray;
-    delete iBackgroundSkinContext;    
+    delete iBackgroundSkinContext;  
+    delete iGestureControl;  
 
     TRACE_EXIT_POINT;
     }
@@ -1094,6 +1094,12 @@
 
     iGrid->ItemDrawer()->FormattedCellData()->SetIconArray( CreateIconsL( iIconIndices ));
     iGrid->View()->SetDisableRedraw(ETrue);
+    
+
+    iGestureControl = GestureHelper::CGestureHelper::NewL( *this );
+    iGestureControl->SetDoubleTapEnabled( EFalse );
+    iGestureControl->SetHoldingEnabled( EFalse );
+
 
     PIM_TRAPD_HANDLE( ConstructBackgroundContextL() );
 
@@ -1222,7 +1228,7 @@
  
         CleanupReleasePushL( *setting ) ;
 
-        if( setting->WeekFormat() == EMonday )
+        if( setting->WeekFormat() == EMonday && setting->WeekNumberEnable() )
             {
             useWeeks = ETrue;
             }
@@ -1684,6 +1690,16 @@
 
         if(gridModel->NumberOfData() <= 0)
             return;
+       
+        if ( iGestureControl )
+            {
+            iGestureControl->HandlePointerEventL( aPointerEvent );
+            if (  iGestureHandled )
+                {
+                TRACE_EXIT_POINT;
+                return;
+                }
+            }
 
         if(isItem == EFalse)
             /* Handle pointer event in week number area */
@@ -1808,7 +1824,7 @@
         {
         case ( MEikListBoxObserver::EEventItemClicked ): 
             {
-            if ( !iView->MenuBar()->IsDisplayed() )
+            if ( !iView->MenuBar()->IsDisplayed() && !iGestureHandled )
                 {
                 iServices.IssueCommandL( ECalenForwardsToDayView );
                 }
@@ -1817,6 +1833,45 @@
         }
     }
 
+// ----------------------------------------------------------------------------
+// CCalenMonthContainer::HandleGestureL
+// 
+// ----------------------------------------------------------------------------
+void CCalenMonthContainer::HandleGestureL( const GestureHelper::MGestureEvent& aEvent )
+    {
+    GestureHelper::TGestureCode code = aEvent.Code( GestureHelper::MGestureEvent::EAxisBoth );  
+    
+    switch ( code )
+        {
+        case GestureHelper::EGestureStart:
+            {
+            iGestureHandled = EFalse;
+            break;
+            }
+        case GestureHelper::EGestureSwipeRight:
+            {
+            if(!iChangeMonth)
+                {
+                HandleNaviDecoratorEventL( EAknNaviDecoratorEventLeftTabArrow );
+                }
+            
+            iGestureHandled = ETrue;
+            break;
+            }
+        case GestureHelper::EGestureSwipeLeft:
+            {
+            if(!iChangeMonth)
+                {
+                HandleNaviDecoratorEventL( EAknNaviDecoratorEventRightTabArrow );
+                }
+            iGestureHandled = ETrue;
+            break;
+            }
+        default:
+            // Other gestures are not handled here
+            break;
+        }
+    }
 
 // ----------------------------------------------------------------------------
 // CCalenMonthContainer::HidePopup
--- a/calendarui/views/src/calentodocontainer.cpp	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/views/src/calentodocontainer.cpp	Mon Jun 21 15:38:59 2010 +0300
@@ -304,10 +304,10 @@
                 if( MarkedCount() )
                     {
                     // display the context sensitive menu
-                    /*CEikMenuBar* menuBar = iView->MenuBar();
+                    CEikMenuBar* menuBar = iView->MenuBar();
                     menuBar->SetContextMenuTitleResourceId(
                             R_TODO_LIST_SELECTION_CONTEXT_MENUBAR );
-                    menuBar->TryDisplayContextMenuBarL();*/
+                    menuBar->TryDisplayContextMenuBarL();
                     }
                 else
                     {
--- a/calendarui/views/src/calentodoview.cpp	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/views/src/calentodoview.cpp	Mon Jun 21 15:38:59 2010 +0300
@@ -584,7 +584,7 @@
                 {
                 if( Container()->MarkedCount() )
                     {
-                    aMenuPane->SetItemSpecific( ECalenDeleteCurrentEntry, EFalse );
+                    aMenuPane->SetItemSpecific( ECalenDeleteCurrentEntry, ETrue );
                     if(Container()->IsCurrentItemSelected()) // If focused list item is marked
                         {
                         aMenuPane->DeleteMenuItem( ECalenViewCurrentEntry );
@@ -593,25 +593,23 @@
                     aMenuPane->DeleteMenuItem( ECalenCompleteTodo );
                     aMenuPane->DeleteMenuItem( ECalenRestoreTodo );
                     aMenuPane->DeleteMenuItem( ECalenSend );
-
+                    aMenuPane->DeleteMenuItem(ECalenCopyToCalendars);
+                    
+                    TBool crossout( EFalse );
+                    //When mark as done, crossout is ETrue.
+                    crossout = CheckMarkedItemCompletedL();
+                    if( crossout )
+                        {
+                        aMenuPane->SetItemSpecific(ECalenMarkUnDone, ETrue);
+                        }
+                    else
+                        {
+                        aMenuPane->SetItemSpecific(ECalenMarkDone, ETrue);
+                        }
+                    
                     if(Container()->MarkedCount() == 1)
                         {
                         aMenuPane->DeleteMenuItem( ECalenCmdComplete );
-                        TBool crossout( EFalse );
-                        crossout = CheckMarkedItemCompletedL();
-                        if( crossout )
-                            {
-                            aMenuPane->DeleteMenuItem( ECalenMarkDone );
-                            }
-                        else
-                            {
-                            aMenuPane->DeleteMenuItem( ECalenMarkUnDone );
-                            }
-                        }
-                    else
-                        {
-                        aMenuPane->DeleteMenuItem( ECalenMarkDone );
-                        aMenuPane->DeleteMenuItem( ECalenMarkUnDone );
                         }
                     }
                 else
--- a/calendarui/views/src/calenweekcontainer.cpp	Wed Jun 09 09:40:23 2010 +0300
+++ b/calendarui/views/src/calenweekcontainer.cpp	Mon Jun 21 15:38:59 2010 +0300
@@ -43,6 +43,7 @@
 #include <mcalenpreview.h>
 #include <Calendar.rsg>
 #include <csxhelp/cale.hlp.hrh>
+#include <gesturehelper.h> //CGestureHelper
 
 #include "calendarui_debug.h"
 #include "calenweekcontainer.h"
@@ -218,6 +219,7 @@
 
     ResetSlotTable();
     delete iBackgroundSkinContext;
+    delete iGestureControl;
 
     TRACE_EXIT_POINT;
     }
@@ -424,7 +426,7 @@
         //    * Focus on instanceId and datetime
         // 2. Timed item, 1-n for each cell, on same/ different day
         //    * Focus on datetime
-        if( itemInfo.HasInstance() && aInstAvailable)
+        if( itemInfo.HasInstance() && aInstAvailable && iViewPopulationComplete)
             {
             TCalenInstanceId instId = TCalenInstanceId::CreateL( *itemInfo.iInstance );
             if( !itemInfo.IsTimed() )       // todo/anniv/memo
@@ -1285,6 +1287,10 @@
     iRow = EFalse;
     iTopRowDefault =  EFalse;
 
+    iGestureControl = GestureHelper::CGestureHelper::NewL( *this );
+    iGestureControl->SetDoubleTapEnabled( EFalse );
+    iGestureControl->SetHoldingEnabled( EFalse );
+
     TRACE_EXIT_POINT;
     }
 
@@ -2014,6 +2020,39 @@
     return iTimedNote;
     }
 
+// ----------------------------------------------------------------------------
+// CCalenMonthContainer::HandleGestureL
+// 
+// ----------------------------------------------------------------------------
+void CCalenWeekContainer::HandleGestureL( const GestureHelper::MGestureEvent& aEvent )
+    {
+    GestureHelper::TGestureCode code = aEvent.Code( GestureHelper::MGestureEvent::EAxisBoth ); 
+    
+    switch ( code )
+        {
+        case GestureHelper::EGestureStart:
+            {
+            iGestureHandled = EFalse;
+            break;
+            }
+        case GestureHelper::EGestureSwipeRight:
+            {
+            HandleNaviDecoratorEventL( EAknNaviDecoratorEventLeftTabArrow );
+            }
+            iGestureHandled = ETrue;
+            break;
+            
+        case GestureHelper::EGestureSwipeLeft:
+            {
+            HandleNaviDecoratorEventL( EAknNaviDecoratorEventRightTabArrow );
+            }
+            iGestureHandled = ETrue;
+            break;
+         default:
+            // Other gestures are not handled here
+            break;
+        }
+    }
 
 // ----------------------------------------------------------------------------
 // CCalenWeekContainer::HorizontalWeekMoveL
@@ -2186,6 +2225,16 @@
             return;
             }
         
+        if ( iGestureControl )
+            {
+            iGestureControl->HandlePointerEventL( aPointerEvent );
+            if ( iGestureHandled )
+                {
+                TRACE_EXIT_POINT;
+                return;
+                }
+            }
+        
         switch(aPointerEvent.iType)
             {
             case TPointerEvent::EButton1Down:
--- a/clock2/clockengines/utilities/clockecomlistener/group/clockecomlistener.mmp	Wed Jun 09 09:40:23 2010 +0300
+++ b/clock2/clockengines/utilities/clockecomlistener/group/clockecomlistener.mmp	Mon Jun 21 15:38:59 2010 +0300
@@ -24,7 +24,7 @@
 UID				0x1000008d 0x20019525
 
 // Capability and vendor info
-CAPABILITY		ALL -TCB
+CAPABILITY		CAP_GENERAL_DLL
 VENDORID		VID_DEFAULT
 
 // Source files
--- a/clock2/clockui/alarmeditorapp/group/alarmeditorapp.mmp	Wed Jun 09 09:40:23 2010 +0300
+++ b/clock2/clockui/alarmeditorapp/group/alarmeditorapp.mmp	Mon Jun 21 15:38:59 2010 +0300
@@ -26,7 +26,7 @@
 
 // Uid and Capability information
 UID					0x100039CE 0x2001CC11
-CAPABILITY			ALL -TCB
+CAPABILITY			CAP_APPLICATION
 
 // Source information
 SOURCEPATH			../src
--- a/clock2/clockui/uilayer/clockalarmeditor/group/clockalarmeditor.mmp	Wed Jun 09 09:40:23 2010 +0300
+++ b/clock2/clockui/uilayer/clockalarmeditor/group/clockalarmeditor.mmp	Mon Jun 21 15:38:59 2010 +0300
@@ -24,7 +24,7 @@
 UID				0x1000008d 0x2001CC10
 
 // Capability and vendor info
-CAPABILITY		ALL -TCB
+CAPABILITY		CAP_GENERAL_DLL
 VENDORID		VID_DEFAULT
 
 // Source files
--- a/clock2/clockui/uilayer/clockalarmeditor/src/clockalarmeditorimpl.cpp	Wed Jun 09 09:40:23 2010 +0300
+++ b/clock2/clockui/uilayer/clockalarmeditor/src/clockalarmeditorimpl.cpp	Mon Jun 21 15:38:59 2010 +0300
@@ -43,6 +43,7 @@
 
 // Constants
 const TInt KZerothDay( 0 );
+const TInt KNextDayIndex( 1 );
 const TInt KDaysInWeek( 7 );
 const TInt KFirstLine( 1 );
 const TInt KRepeatOnceIndex( 0 );
@@ -410,8 +411,7 @@
     
     // We don't display the alarm day selection item for repeated alarms of type daily, next 24 hours and
     // workdays. So when this functions is called, we check for the type and update the form accordingly.
-    if( KDailyIndex == iOccuranceIndex ||
-        KWorkdaysIndex == iOccuranceIndex )
+    if( KWeeklyIndex != iOccuranceIndex )
         {
         DeleteAlmDayCtrlL();
         }
@@ -666,8 +666,7 @@
     
     // We don't display the alarm day selection item for repeated alarms of type daily, next 24 hours and
     // workdays. So when this functions is called, we check for the type and update the form accordingly.
-    if( KDailyIndex == iOccuranceIndex ||
-        KWorkdaysIndex == iOccuranceIndex )
+    if( KWeeklyIndex != iOccuranceIndex )
         {
         DeleteAlmDayCtrlL();
         }
@@ -952,8 +951,7 @@
     // Get the current day of the week.
     TInt currentDay( aHomeTime.DayNoInWeek() );
         
-    if( ( KRepeatOnceIndex == iOccuranceIndex ) ||
-        ( KWeeklyIndex == iOccuranceIndex ) )
+    if( KWeeklyIndex == iOccuranceIndex )
         {
         TInt dateOffset( KZerothDay );
 
@@ -980,6 +978,13 @@
             }
         aTimeFromForm += TTimeIntervalDays( dateOffset );
         }
+        else if( KRepeatOnceIndex == iOccuranceIndex )  
+            {            
+            if( aTimeFromForm < aHomeTime )
+                {                  
+                aTimeFromForm += TTimeIntervalDays( KNextDayIndex );
+                }            
+            }
     __PRINTS( "CClockAlarmEditorImpl::GetActualAlarmTime - Exit" );
     }
 
--- a/clock2/clockui/uilayer/clockmainview/src/clockmainview.cpp	Wed Jun 09 09:40:23 2010 +0300
+++ b/clock2/clockui/uilayer/clockmainview/src/clockmainview.cpp	Mon Jun 21 15:38:59 2010 +0300
@@ -656,7 +656,7 @@
 	
 	// Ask the document to save the user data in the document file.
 	CClockDocument* clockDocument = static_cast< CClockDocument* > ( AppUi()->Document() );
-	TRAP_IGNORE( clockDocument->StoreDataL() );
+
 	
 	if( iContainer )
 		{
--- a/clock2/clockui/uilayer/clockworldview/src/clockworldcontainer.cpp	Wed Jun 09 09:40:23 2010 +0300
+++ b/clock2/clockui/uilayer/clockworldview/src/clockworldcontainer.cpp	Mon Jun 21 15:38:59 2010 +0300
@@ -246,7 +246,7 @@
 // rest of the details are commented in the header
 // ---------------------------------------------------------
 //
-void CClockWorldContainer::HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType )
+void CClockWorldContainer::HandleListBoxEventL( CEikListBox* /*aListBox*/, TListBoxEvent/* aEventType*/ )
     {
     __PRINTS( "CClockWorldContainer::HandleListBoxEventL - Entry" );
 
--- a/clock2/clockui/uilayer/group/clock.mmp	Wed Jun 09 09:40:23 2010 +0300
+++ b/clock2/clockui/uilayer/group/clock.mmp	Mon Jun 21 15:38:59 2010 +0300
@@ -26,7 +26,7 @@
 
 // Uid and Capability information
 UID				0x100039CE 0x10005903
-CAPABILITY			ALL -TCB
+CAPABILITY			CAP_APPLICATION PowerMgmt  
 
 // Stack and heap options
 EPOCSTACKSIZE   	0x5000
--- a/clock2/clockui/uilayer/inc/clockdocument.h	Wed Jun 09 09:40:23 2010 +0300
+++ b/clock2/clockui/uilayer/inc/clockdocument.h	Mon Jun 21 15:38:59 2010 +0300
@@ -78,13 +78,13 @@
         * @brief Returns the previous alarm time.
         * @return TTime The previous alarm time.
         */
-	    TTime GetPrevAlarmTime();
+	    //TTime GetPrevAlarmTime();
 	    
 	    /**
 	    * @brief Sets the new alarm time value as the previous alarm time.
 	    * @param aPrevAlarmTime The new alarm time.
 	    */
-	    void SetPrevAlarmTime( TTime aPrevAlarmTime );
+	    //void SetPrevAlarmTime( TTime aPrevAlarmTime );
 	    
 	    /**
 	    * @brief Retrieves list of cities shown in world clock view.
--- a/clock2/clockui/uilayer/src/clockdocument.cpp	Wed Jun 09 09:40:23 2010 +0300
+++ b/clock2/clockui/uilayer/src/clockdocument.cpp	Mon Jun 21 15:38:59 2010 +0300
@@ -205,7 +205,7 @@
     return iAlarmModel;
     }
 
-// ---------------------------------------------------------
+/*// ---------------------------------------------------------
 // CClockDocument::GetPrevAlarmTime
 // rest of the details are commented in the header
 // ---------------------------------------------------------
@@ -223,7 +223,7 @@
 void CClockDocument::SetPrevAlarmTime( TTime aPrevAlarmTime )
     {
     iPrevAlarmTime = aPrevAlarmTime.Int64();
-    }
+    }*/
 
 // ---------------------------------------------------------
 // CClockDocument::GetWorldClockList
--- a/clock2/clockui/uimodel/group/clkuimodel.mmp	Wed Jun 09 09:40:23 2010 +0300
+++ b/clock2/clockui/uimodel/group/clkuimodel.mmp	Mon Jun 21 15:38:59 2010 +0300
@@ -25,7 +25,7 @@
 
 // Uid and Capability information
 UID					0x1000008d 0x10005904
-CAPABILITY			ALL -TCB
+CAPABILITY			CAP_GENERAL_DLL
 
 // Source information
 SOURCEPATH			../src
--- a/notepad/notepad1/LibData/NpdLib.rss	Wed Jun 09 09:40:23 2010 +0300
+++ b/notepad/notepad1/LibData/NpdLib.rss	Mon Jun 21 15:38:59 2010 +0300
@@ -1636,6 +1636,35 @@
   {
      buf = qtn_nmake_no_memos_secondary_text_nontouch ;
   } 
+ 
+ // -----------------------------------------------------------------------------
+ //
+ // r_notepad_loadfile_progress_dialog
+ // progress dialog for load file
+ //
+ // -----------------------------------------------------------------------------
+ //
+
+ RESOURCE DIALOG r_notepad_loadfile_progress_dialog
+     {
+     flags = EAknWaitNoteFlags;
+     buttons = R_AVKON_SOFTKEYS_CANCEL;
+     items=
+         {
+         DLG_LINE
+             {
+             type = EAknCtNote;
+             id = EGeneralQuery;
+             control= AVKON_NOTE 
+                 { 
+                 layout = EWaitLayout;
+                 singular_label = qtn_nmake_om_open_memo;
+                 animation = R_QGN_GRAF_WAIT_BAR_ANIM;
+                 };
+             }
+         };
+     }
+ 
 // Default templates
 //
 #include "NpdDefaultTemplates.ra"
--- a/notepad/notepad1/LibSrc/NpdListDialog.cpp	Wed Jun 09 09:40:23 2010 +0300
+++ b/notepad/notepad1/LibSrc/NpdListDialog.cpp	Mon Jun 21 15:38:59 2010 +0300
@@ -873,9 +873,18 @@
 		{
 		return;
 		}
+	
+    ClearSavedCurrentAndSelections();
+    SaveCurrentAndSelectionsL();
     iModel->SyncL(EFalse);
     CNotepadDialogBase::DynInitMenuPaneL( aResourceId, aMenuPane );
-    const TInt memoCount( iModel->MdcaCount() - KNumberOfFixedItem );
+    
+    TInt memoCount = iModel->MdcaCount();
+    if ( IsNoteListDialog() )
+        {
+        memoCount = memoCount - KNumberOfFixedItem;
+        }
+    
    	const TInt markCount(iListBox->SelectionIndexes()->Count());
 	TInt index;
 	switch (aResourceId )
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/notepad/notepad1/LibSrc/NpdLoadFileAO.cpp	Mon Jun 21 15:38:59 2010 +0300
@@ -0,0 +1,267 @@
+/*
+* Copyright (c) 2006-2007 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""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  The class implements a long task wrapper for load file
+*
+*/
+
+
+
+// INCLUDE FILES
+#include <coemain.h>
+#include <s32file.h>
+#include <charconv.h>
+#include "NpdLoadFileAO.h"
+#include "NpdUtil.h"
+
+// CONSTANTS
+
+// the max length of the sample text which attempts to determine the character set
+static const TInt KMaxSampleLengthForAutoDetection = 1024;
+
+// the file length load in one step
+static const TInt KLengthOneStepLoad = 1024 * 10;
+
+// when the value is large than this, the auto detect result is available 
+static const TInt KValueAutoDetectCharacterSetAvailable = 50;
+
+// ============================= MEMBER FUNCTIONS =============================
+
+// ----------------------------------------------------------------------------
+// CNotepadLoadFileAO::CNotepadLoadFileAO()
+//
+// ----------------------------------------------------------------------------
+CNotepadLoadFileAO::CNotepadLoadFileAO( MNotepadLoadFileObserver* aObserver,
+                                        CCoeEnv& aCoeEnv,
+                                        RFile& aFile, 
+                                        TBool aGuessEncoding,
+                                        TUint aEncoding, 
+                                        CPlainText& aText ):
+    CActive( CActive::EPriorityLow ),
+    iObserver( aObserver ),
+    iCoeEnv( aCoeEnv ),
+    iGuessEncoding( aGuessEncoding ),
+    iEncoding( aEncoding ),
+    iText( aText )
+    {
+    iFile.Duplicate( aFile );
+    }
+
+// ----------------------------------------------------------------------------
+// CNotepadLoadFileAO::~CNotepadLoadFileAO()
+//
+// ----------------------------------------------------------------------------
+CNotepadLoadFileAO::~CNotepadLoadFileAO()
+    {
+    iFile.Close();
+    Cancel();
+    }
+
+// ----------------------------------------------------------------------------
+// CNotepadLoadFileAO::NewL()
+//
+// ----------------------------------------------------------------------------
+CNotepadLoadFileAO* CNotepadLoadFileAO::NewL( MNotepadLoadFileObserver* aObserver,
+                                              CCoeEnv& aCoeEnv,
+                                              RFile& aFile, 
+                                              TBool aGuessEncoding,
+                                              TUint aEncoding, 
+                                              CPlainText& aText )
+    {
+    CNotepadLoadFileAO* self = new (ELeave) CNotepadLoadFileAO(aObserver,
+            aCoeEnv, aFile, aGuessEncoding, aEncoding, aText);
+
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ----------------------------------------------------------------------------
+// CNotepadLoadFileAO::ConstructL()
+//
+// ----------------------------------------------------------------------------
+void CNotepadLoadFileAO::ConstructL()
+    {
+    CActiveScheduler::Add( this );
+    }
+
+// ----------------------------------------------------------------------------
+// CNotepadLoadFileAO::StartLoadFile()
+//
+// ----------------------------------------------------------------------------
+TInt CNotepadLoadFileAO::StartLoadFile()
+    {
+    TInt err( KErrAlreadyExists );
+    if ( !IsActive() )
+      {
+        err = KErrNone;
+        TRAP ( err, InitImportExportParamL() )
+        if ( err == KErrNone )
+            {
+            TRequestStatus *statue = &iStatus;
+            User::RequestComplete( statue, KErrStep );
+            SetActive();
+            }
+      }
+    return err;
+    }
+
+// ----------------------------------------------------------------------------
+// CNotepadLoadFileAO::CancelLoadFile()
+//
+// ----------------------------------------------------------------------------
+void CNotepadLoadFileAO::CancelLoadFile()
+    {
+    iCancel = ETrue;
+    }
+
+
+// ----------------------------------------------------------------------------
+// CNotepadLoadFileAO::RunL()
+//
+// ----------------------------------------------------------------------------
+void CNotepadLoadFileAO::RunL()
+    {
+    TInt status = iStatus.Int();
+    if ( status == KErrStep )
+        {
+        DoStepL();
+        }
+    iObserver->NotifyCompletedL( status );
+    }
+
+// ----------------------------------------------------------------------------
+// CNotepadLoadFileAO::DoCancel()
+//
+// ----------------------------------------------------------------------------
+void CNotepadLoadFileAO::DoCancel()
+    {
+    iCancel = ETrue;
+    }
+
+// ----------------------------------------------------------------------------
+// CNotepadLoadFileAO::DoStepL()
+//
+// ----------------------------------------------------------------------------
+void CNotepadLoadFileAO::DoStepL()
+    {  
+    TInt completeCode = KErrStep;
+    // if the load file completed 
+    if ( iReadPos >= iFileSize )
+        {
+        completeCode = KErrNone;
+        }
+    // if the load file canceled
+    else if ( iCancel )
+        {
+        completeCode = KErrCancel;
+        }
+    // load file for one step
+    else
+        {
+        CPlainText::TImportExportResult result;
+        TInt leaveSize = iFileSize - iReadPos ;
+        iParam.iMaxInputChars =  leaveSize > KLengthOneStepLoad ? KLengthOneStepLoad: leaveSize;
+        TInt err = KErrNone;
+        RFile tempFile;
+        tempFile.Duplicate( iFile );
+        RFileReadStream stream( tempFile,iReadPos );
+        CleanupClosePushL(stream);
+        TRAP( err, iText.ImportTextL( iText.DocumentLength(), stream, iParam, result) );
+        stream.Release();// closing of tempfile
+        CleanupStack::PopAndDestroy(); // stream
+        if ( err != KErrNone )
+            {
+            completeCode = err;
+            }
+        iReadPos += result.iInputChars;
+        }
+    
+    TRequestStatus *statue = &iStatus;
+    User::RequestComplete( statue,completeCode );
+    SetActive();
+    }
+
+// ----------------------------------------------------------------------------
+// CNotepadLoadFileAO::InitImportExportParamL()
+//
+// ----------------------------------------------------------------------------
+void CNotepadLoadFileAO::InitImportExportParamL()
+    {
+    User::LeaveIfError( iFile.Size( iFileSize ) );
+    
+    // need to guess the foreign encoding for this file or not 
+    if ( !iGuessEncoding )
+        {
+        iParam.iForeignEncoding = iEncoding;
+        }
+    else
+        {
+        TBuf8<KMaxSampleLengthForAutoDetection> sample;
+        User::LeaveIfError( iFile.Read( sample, iFileSize > KMaxSampleLengthForAutoDetection ? 
+             KMaxSampleLengthForAutoDetection : iFileSize ) );
+         
+        // Creates an array identifying all the character sets for which conversion is available 
+        CArrayFix<CCnvCharacterSetConverter::SCharacterSet>* 
+        lists = CCnvCharacterSetConverter::CreateArrayOfCharacterSetsAvailableLC(
+                                         iCoeEnv.FsSession() );
+        
+        // Attempts to determine the character set of the sample text from those supported on the phone
+        TInt confidence(0);
+        TUint charset(0);
+        CCnvCharacterSetConverter::AutoDetectCharacterSetL( confidence, charset, *lists, sample );
+        CleanupStack::PopAndDestroy();
+        
+        // the auto detect result is available 
+        if ( confidence > KValueAutoDetectCharacterSetAvailable )
+             {
+             iParam.iForeignEncoding = charset;
+             }
+        else 
+             {   
+             // Checks wether the descriptor contains big endian unicode text
+             if ( NotepadUtil::IsBigEndianUnicodeText( sample ) )
+                 {
+                 iParam.iForeignEncoding = KCharacterSetIdentifierUnicodeBig; 
+                 }
+             // Checks wether the descriptor contains little endian unicode text
+             else if ( NotepadUtil::IsLittleEndianUnicodeText( sample ) )
+                 {
+                 iParam.iForeignEncoding = KCharacterSetIdentifierUnicodeLittle;
+                 }
+             // Checks wether the descriptor contains UTF8 text
+             else if ( NotepadUtil::IsUTF8Text( sample ) )
+                 {
+                 iParam.iForeignEncoding = KCharacterSetIdentifierUtf8;
+                 }
+             // Checks wether the descriptor contains SHIFT-JIS encoded text
+             else if ( NotepadUtil::IsShiftJisText( sample ) )
+                 {
+                 iParam.iForeignEncoding = KCharacterSetIdentifierShiftJis;
+                 }
+             // Guess the encoding from the language
+             else
+                 {
+                 iParam.iForeignEncoding = NotepadUtil::GuessEncodingFromLanguage();
+                 if ( iParam.iForeignEncoding == 0 ) // Variant not found
+                     {
+                     iParam.iForeignEncoding = KCharacterSetIdentifierAscii;
+                     }
+                 }
+             }
+        } 
+    }
+
+
+// End of File  
--- a/notepad/notepad1/LibSrc/NpdViewerDialog.cpp	Wed Jun 09 09:40:23 2010 +0300
+++ b/notepad/notepad1/LibSrc/NpdViewerDialog.cpp	Mon Jun 21 15:38:59 2010 +0300
@@ -50,8 +50,16 @@
 #include "NpdUtil.h"
 #include "NpdRichTextEditor.h"
 #include "NpdLibPanic.h"
+#include <csxhelp/nmake.hlp.hrh>
 
-#include <csxhelp/nmake.hlp.hrh>
+// CONSTANTS
+
+// when the file length is larger than this value, that need to load by steps 
+static const TInt KFileLengthNeedLoadBySteps = 1024 * 100;
+// the time value for interval to start the timer for close the notepad dialog 
+static const TUint KCloseNotepadDialogInterval = 500000; //microseconds
+// the time value for delay to start the timer for close the notepad dialog 
+static const TUint KCloseNotepadDialogDelay = 1; // microseconds
 
 // ============================ MEMBER FUNCTIONS ===============================
 
@@ -117,6 +125,8 @@
         }
     delete iCenRepSession;
     iCenRepSession = NULL;
+    delete iLoadFileAO;
+    iLoadFileAO = NULL;
     }
 
 // -----------------------------------------------------------------------------
@@ -230,7 +240,7 @@
     {
     __ASSERT_DEBUG( iEditor, Panic(ENotepadLibraryPanicNoEdwin) );
     __ASSERT_DEBUG( iFilename, Panic(ENotepadLibraryPanicNoFileSpecified) );
-    iEditor->SetTextL(NULL);
+    iEditor->SetTextL(NULL); 
     NotepadUtil::LoadFileL( *iCoeEnv, *iFilename, iGuessEncoding,
         iEncoding, *(iEditor->Text()) );
     iEditor->SetAmountToFormat(iEditor->Text()->DocumentLength());
@@ -248,8 +258,17 @@
     {
     __ASSERT_DEBUG( iEditor, Panic(ENotepadLibraryPanicNoEdwin) );
     //__ASSERT_DEBUG( iFilename, Panic(ENotepadLibraryPanicNoFileSpecified) );
+   
+    TInt fileSize(0);
+    User::LeaveIfError( aFile.Size( fileSize ) );  
+    if ( fileSize >= KFileLengthNeedLoadBySteps )
+       {
+       LoadFileByStepsL( aFile );
+       return;
+       }
+    
     iEditor->SetTextL(NULL);
-   TBool error = NotepadUtil::LoadFileL( *iCoeEnv, aFile, iGuessEncoding,
+    TBool error = NotepadUtil::LoadFileL( *iCoeEnv, aFile, iGuessEncoding,
         iEncoding, *(iEditor->Text()) );
     iEditor->SetAmountToFormat(iEditor->Text()->DocumentLength()); 
     iEditor->HandleTextChangedL();
@@ -257,8 +276,7 @@
     iAutoFinder->SetItemFinderObserverL( this );
     RefreshTitleL();
     if( error != KErrNone)
-        {
-        
+        {     
         HBufC* text = StringLoader::LoadLC(R_NOTEPAD_QTN_FILE_CORRUPTED);
         CAknErrorNote* mErrorNote;
         mErrorNote = new (ELeave) CAknErrorNote( ETrue );
@@ -268,12 +286,13 @@
         iPeriodicTimer = CPeriodic::NewL( CActive::EPriorityStandard );    
         if( !iPeriodicTimer->IsActive() )
             {
-              iPeriodicTimer->Start( 1, 1000000/2, 
-                               TCallBack( CNotepadViewerDialog::TimerCallbackL, this ) );
-	        }
+            iPeriodicTimer->Start( KCloseNotepadDialogDelay, KCloseNotepadDialogInterval, 
+                           TCallBack( CNotepadViewerDialog::TimerCallbackL, this ) );
+            }
         }
     }
 
+
 // -----------------------------------------------------------------------------
 // CNotepadViewerDialog::OpenFileL
 // -----------------------------------------------------------------------------
@@ -831,11 +850,9 @@
                 	    aMenuPane->AddMenuItemL(item, EFindItemMenuPlaceHolder);
                         }
                     }
-
                 }
-
             iFindMenu->AddItemFindMenuL(iAutoFinder,aMenuPane,EFindItemMenuPlaceHolder,KNullDesC);
-
+            
    			if(!FeatureManager::FeatureSupported(KFeatureIdHelp))
 				{
 				aMenuPane->DeleteMenuItem(EAknCmdHelp);
@@ -901,4 +918,111 @@
     {
     }
 
+// -----------------------------------------------------------------------------
+// CNotepadViewerDialog::LoadFileByStepsL 
+// -----------------------------------------------------------------------------
+//
+void CNotepadViewerDialog::LoadFileByStepsL(RFile& aFile)
+    {
+    __ASSERT_DEBUG( iEditor, Panic(ENotepadLibraryPanicNoEdwin) );
+    //__ASSERT_DEBUG( iFilename, Panic(ENotepadLibraryPanicNoFileSpecified) );
+    iEditor->SetTextL(NULL); 
+    
+    // lanuch the progress bar
+    CleanProgressDialogL();  
+    iProgressDialogLoadfile = new( ELeave ) CAknProgressDialog(
+      reinterpret_cast< CEikDialog** >( &iProgressDialogLoadfile ),
+      EFalse );
+    iProgressDialogLoadfile->SetCallback( this );
+    iProgressDialogLoadfile->ExecuteLD( R_NOTEPAD_LOADFILE_PROGRESS_DIALOG );
+    
+    // start a active object to load file
+    if ( iLoadFileAO ) 
+        {
+        delete iLoadFileAO;
+        iLoadFileAO = NULL;
+        }
+    iLoadFileAO = CNotepadLoadFileAO::NewL( this,  *iCoeEnv, aFile, iGuessEncoding,
+            iEncoding, *(iEditor->Text()) );
+    
+    if ( KErrNone != iLoadFileAO->StartLoadFile() )
+        {
+        ExitDialogOnTimerExpireL();
+        }
+    }
+
+
+// -----------------------------------------------------------------------------
+// CNotepadViewerDialog::CleanProgressDialogL()
+// -----------------------------------------------------------------------------
+//
+void CNotepadViewerDialog::CleanProgressDialogL()
+    {
+    if ( iProgressDialogLoadfile )
+        {
+        iProgressDialogLoadfile->ProcessFinishedL();
+        iProgressDialogLoadfile = NULL;
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CNotepadViewerDialog::DialogDismissedL
+// -----------------------------------------------------------------------------
+//
+void CNotepadViewerDialog::DialogDismissedL( TInt aButtonId )
+    {
+    if ( ( EAknSoftkeyCancel == aButtonId ) && iLoadFileAO )
+        {
+        iLoadFileAO->CancelLoadFile();
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CNotepadViewerDialog::NotifyCompletedL
+// -----------------------------------------------------------------------------
+//
+void CNotepadViewerDialog::NotifyCompletedL( TInt aErrCode )
+    {  
+ 
+    // load file is completed for one step
+    if ( KErrStep == aErrCode )
+        {
+        iEditor->SetAmountToFormat(iEditor->Text()->DocumentLength());
+        iEditor->HandleTextChangedL();
+        }
+    // load file is completed 
+    else if ( KErrNone == aErrCode ) 
+        {
+        CleanProgressDialogL(); 
+        iEditor->SetAmountToFormat(iEditor->Text()->DocumentLength());
+        iEditor->HandleTextChangedL();
+        iAutoFinder->SetEditor((CEikRichTextEditor**)&iEditor);
+        iAutoFinder->SetItemFinderObserverL( this );
+        RefreshTitleL();
+        }
+    // load file cancel
+    else if ( KErrCancel == aErrCode )
+        {
+        ExitDialogOnTimerExpireL();
+        }
+    // that occur error during load file
+    else
+        {
+        CleanProgressDialogL(); 
+        HBufC* text = StringLoader::LoadLC(R_NOTEPAD_QTN_FILE_CORRUPTED);
+        CAknErrorNote* mErrorNote;
+        mErrorNote = new (ELeave) CAknErrorNote( ETrue );
+        mErrorNote->ExecuteLD(*text);
+        CleanupStack::PopAndDestroy( text );
+        iPeriodicTimer = CPeriodic::NewL( CActive::EPriorityStandard );        
+        if ( !iPeriodicTimer->IsActive() )
+            {
+            iPeriodicTimer->Start( KCloseNotepadDialogDelay, KCloseNotepadDialogInterval, 
+                               TCallBack( CNotepadViewerDialog::TimerCallbackL, this ) );
+            }
+        }
+  
+    }
+        
+
 // End of File  
--- a/notepad/notepad1/group/NpdLib.mmp	Wed Jun 09 09:40:23 2010 +0300
+++ b/notepad/notepad1/group/NpdLib.mmp	Mon Jun 21 15:38:59 2010 +0300
@@ -47,7 +47,8 @@
 SOURCE		../LibSrc/NpdEdwinBase.cpp
 SOURCE		../LibSrc/NpdEditorLaf.cpp
 SOURCE		../LibSrc/NpdViewerLaf.cpp
-SOURCE      ../LibSrc/NpdTemplateListBox.cpp
+SOURCE          ../LibSrc/NpdTemplateListBox.cpp
+SOURCE          ../LibSrc/NpdLoadFileAO.cpp
 
 // Include paths
 USERINCLUDE     ../inc
--- a/notepad/notepad1/group/NpdViewer.mmp	Wed Jun 09 09:40:23 2010 +0300
+++ b/notepad/notepad1/group/NpdViewer.mmp	Mon Jun 21 15:38:59 2010 +0300
@@ -66,4 +66,4 @@
 LIBRARY         eikcore.lib 
 LIBRARY         avkon.lib 
 LIBRARY         npdlib.lib
-
+LIBRARY         efsrv.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/notepad/notepad1/inc/MNpdLoadFileObserver.h	Mon Jun 21 15:38:59 2010 +0300
@@ -0,0 +1,47 @@
+/*
+* Copyright (c) 2006-2007 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""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:   Notepad load file observer abstraction
+*
+*/
+
+
+#ifndef MNOTEPADLOADFILEOBSERVER_H
+#define MNOTEPADLOADFILEOBSERVER_H
+
+
+// INCLUDES
+#include <e32base.h>
+
+// CLASS DECLARATION
+/**
+*  Defines an interface for notepad load file observer.
+*
+*  @since 5.2
+*/
+class MNotepadLoadFileObserver
+    {
+    public:    
+        /**
+        * Notify the observer that load file completed.
+        * @param aErrCode the result of load file completed.
+        * @since 5.2
+        */
+        virtual void NotifyCompletedL( TInt aErrCode ) = 0;
+
+    };
+
+
+#endif // MNOTEPADLOADFILEOBSERVER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/notepad/notepad1/inc/NpdLoadFileAO.h	Mon Jun 21 15:38:59 2010 +0300
@@ -0,0 +1,141 @@
+/*
+* Copyright (c) 2006-2007 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""
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:  A long task wrapper for load file
+*
+*/
+
+
+
+#ifndef CNOTEPADLOADFILEAO_H
+#define CNOTEPADLOADFILEAO_H
+
+
+// INCLUDES
+#include <e32base.h>
+#include <txtetext.h>
+#include <f32file.h>
+#include "MNpdLoadFileObserver.h"
+
+// FORWARD DECLARATIONS
+class CCoeEnv;
+class RFile;
+class CPlainText;
+class RFileReadStream;
+
+// CONSTANTS
+// the completed code for load file in one step
+static const TInt KErrStep = 10000;
+
+// CLASS DECLARATION
+/**
+*  The class implements a long task wrapper for load file
+*
+*  @lib NpdLib.lib
+*  @since 5.2
+*/
+NONSHARABLE_CLASS(CNotepadLoadFileAO) : public CActive
+    {
+    public:
+        static CNotepadLoadFileAO* NewL( MNotepadLoadFileObserver* aObserver,
+                                         CCoeEnv& aCoeEnv,
+                                         RFile& aFile, 
+                                         TBool aGuessEncoding,
+                                         TUint aEncoding, 
+                                         CPlainText& aText );
+
+        ~CNotepadLoadFileAO();
+
+    public: // New functions
+       
+        /**
+        * Starts load file .
+        * @return start load file successful or not, KErrNone is sucessed, other failed
+        * @since 5.2
+        */
+        TInt StartLoadFile( );
+
+        /**
+        * Cancels load file .
+        * @since 5.2
+        */
+        void CancelLoadFile();
+
+   
+
+    private: // From CActive
+        void RunL();
+        
+        void DoCancel();
+        
+    private:
+        CNotepadLoadFileAO( MNotepadLoadFileObserver* aObserver,
+                            CCoeEnv& aCoeEnv,
+                            RFile& aFile, 
+                            TBool aGuessEncoding,
+                            TUint aEncoding, 
+                            CPlainText& aText );
+
+        void ConstructL();
+        
+        /**
+        * Initialize import export param for CPlianText.
+        * @since 5.2
+        */
+        void InitImportExportParamL();
+        
+        
+        /**
+        * Run step for load file.
+        * @since 5.2
+        */
+        void DoStepL();
+        
+
+    private: // Data
+        
+        // Ref: Pointer to thread function observer
+        MNotepadLoadFileObserver* iObserver;
+          
+        // Ref: refrence to Control environment
+        CCoeEnv& iCoeEnv;
+        
+        // Own: the file object to load
+        RFile iFile;
+        
+        // indicate guess encoding or not
+        TBool iGuessEncoding;
+        
+        // aEncoding encoding of the File
+        TUint iEncoding;
+        
+        // Ref: refrence to CPlainText object
+        CPlainText& iText;
+        
+        // the size of the file to load
+        TInt iFileSize;
+        
+        // the current pos of the file 
+        TInt iReadPos;
+        
+        // indicate cancel load file or not
+        TBool iCancel;
+        
+        // Own: the import export param for CPlianText
+        CPlainText::TImportExportParam iParam;
+              
+    };
+
+#endif // CNOTEPADLOADFILEAO_H
+
+// End of File
--- a/notepad/notepad1/inc/NpdViewerDialog.h	Wed Jun 09 09:40:23 2010 +0300
+++ b/notepad/notepad1/inc/NpdViewerDialog.h	Mon Jun 21 15:38:59 2010 +0300
@@ -21,10 +21,11 @@
 
 // INCLUDES
 #include <charconv.h>
-#include "NpdDialogBase.h"
 #include <centralrepository.h>
 #include <cenrepnotifyhandler.h>
 #include <itemfinderobserver.h>
+#include "NpdDialogBase.h"
+#include "NpdLoadFileAO.h"
 
 // FORWARD DECLARATIONS
 class CNotepadRichTextEditor;
@@ -43,7 +44,9 @@
 */
 class CNotepadViewerDialog : public CNotepadDialogBase,
                              public MCenRepNotifyHandlerCallback,
-                             public MAknItemFinderObserver
+                             public MAknItemFinderObserver,
+                             public MProgressDialogCallback,
+                             public MNotepadLoadFileObserver
 
     {
     public: // Constructor and destructor
@@ -222,7 +225,17 @@
                 const CItemFinder::CFindItemExt& aItem,
                 MAknItemFinderObserver::TEventFlag aEvent,
                 TUint aFlags );
-
+    
+    public: // From MProgressDialogCallback       
+        void DialogDismissedL( TInt aButtonId );
+        
+    public: // From MNotepadLoadFileObserver   
+        /**
+        * Notify the observer that load file completed.
+        * @param aErrCode the result of load file completed.
+        * @since 5.2
+        */
+        void NotifyCompletedL( TInt aErrCode );
 
     private: // New function
 
@@ -311,6 +324,19 @@
         * Called in callback function to exit the dialog
         */
         void ExitDialogOnTimerExpireL();
+        
+        /**
+        * Clean the progress dialog
+        * @since 5.2
+        */
+        void CleanProgressDialogL(); 
+        
+        /**
+        * load the file step by step
+        * @param aFile  the file object to load
+        * @since 5.2
+        */
+        void LoadFileByStepsL(RFile& aFile);
 
     private: // Data
 
@@ -356,6 +382,13 @@
         // Notifier to listen changes of offline state
         CCenRepNotifyHandler* iNotifier;
         CPeriodic*  iPeriodicTimer;
+        
+        // Own: Active object for load file asynchronous
+        CNotepadLoadFileAO* iLoadFileAO;
+               
+        // Own: Progress dialog for load file
+        CAknProgressDialog* iProgressDialogLoadfile;
+        
     };
 
 #endif // NPDVIEWERDIALOG_H
--- a/organizer_plat/calendar_common_utils_api/inc/CalenStatusPaneUtils.h	Wed Jun 09 09:40:23 2010 +0300
+++ b/organizer_plat/calendar_common_utils_api/inc/CalenStatusPaneUtils.h	Mon Jun 21 15:38:59 2010 +0300
@@ -25,6 +25,7 @@
 class CCalenStatusPaneUtilsImpl;
 class CEikStatusPane;
 class CAknNavigationDecorator;
+class TRgb;
 
 /**
  * @class CCalenStatusPaneUtils 
@@ -78,6 +79,15 @@
 		 * @return CAknNavigationDecorator* The navi pane decorator
 		 */
         IMPORT_C CAknNavigationDecorator* ShowNaviPaneL( const TTime& aActiveDay );
+        /**
+         * @brief Sets the calendar name and icon in the navi pane 
+         * and returns the decorator that can be set to the navi pane control
+         *
+         * @param aName The calendar name to be displayed in the navi pane
+         * @param aColor The color of the icon to be displayed.
+         * @return CAknNavigationDecorator* The navi pane decorator
+         */
+        IMPORT_C CAknNavigationDecorator* ShowNaviPaneL( const TDesC& aName, const TRgb aColor );
 
 		/**
 		 * @brief Hides the navi pane
--- a/organizer_plat/calendar_common_utils_api/inc/calenconstants.h	Wed Jun 09 09:40:23 2010 +0300
+++ b/organizer_plat/calendar_common_utils_api/inc/calenconstants.h	Mon Jun 21 15:38:59 2010 +0300
@@ -77,6 +77,17 @@
     EWeekTitleDuration
     };
 
+/**
+* TCalenWeekNumber
+* The week Number
+*/
+enum TCalenWeekNumber
+{
+EWeekNumberOn,
+EWeekNumberOff
+};
+
+
 #endif // CALENCONSTANTS_H
 
 // End of File
--- a/organizer_plat/calendar_custamization_api/inc/calennotificationhandler.h	Wed Jun 09 09:40:23 2010 +0300
+++ b/organizer_plat/calendar_custamization_api/inc/calennotificationhandler.h	Mon Jun 21 15:38:59 2010 +0300
@@ -66,6 +66,7 @@
 	ECalenNotifyCancelMapLaunch,
     ECalenNotifyMissedAlarmViewClosed,
     ECalenNotifyMissedEventViewClosed,
+    ECalenNotifyClearMissedAlarms,
     ECalenNotifyCalendarFieldChanged,
     ECalenNotifyCancelStatusUpdation,
     ECalenNotifyMarkedEntryCompleted,
--- a/organizer_plat/calendar_settings_keys_api/inc/CalendarInternalCRKeys.h	Wed Jun 09 09:40:23 2010 +0300
+++ b/organizer_plat/calendar_settings_keys_api/inc/CalendarInternalCRKeys.h	Mon Jun 21 15:38:59 2010 +0300
@@ -139,5 +139,10 @@
 */
 const TUint32 KCalendarAvailableValue = 0x00000010;
 
+/**
+* Boolean value containing week Number ON/OFF 
+* Default value:"0"
+*/
+const TUint32 KCalendarWeekViewNumber = 0x000000011;
 
 #endif  // CALENDARINTERNALCRKEYS_H
--- a/organizer_pub/calendar_interim_utils2_api/tsrc/stiff/src/caleninterimutils2testblocks.cpp	Wed Jun 09 09:40:23 2010 +0300
+++ b/organizer_pub/calendar_interim_utils2_api/tsrc/stiff/src/caleninterimutils2testblocks.cpp	Mon Jun 21 15:38:59 2010 +0300
@@ -79,6 +79,7 @@
 //
 TInt CCalenInterimUtils2Test::TestGlobalUUIDL( CStifItemParser& aItem )
     {
+    CDesC8ArrayFlat* uidArray = new ( ELeave ) CDesC8ArrayFlat( KTestMax );
     TInt retValue = KErrNone;
     // Print to UI
     _LIT( KCalenInterimUtils2Test, "CalenInterimUtils2Test" );
@@ -95,33 +96,31 @@
     callBack = CCalProgressCallBackListener::NewL();
     CCalenGlobalData* globalData = CCalenGlobalData::NewL( *callBack );
     // Make the call to the API.
-    // Create unique ID.
-    RPointerArray<HBufC8> guids;
-
+    // Create unique ID.   
+    TBuf8<100> outputBuffer;
     TInt i = 0;
     
-    for( ; i<20; i++ )
+    for( ; i<2000; i++ )
         {
         HBufC8* guid = globalData->InterimUtilsL().GlobalUidL();
-        iLog->Log( *guid );
-        guids.AppendL(guid);
-        }
-    
-    for(i=1; i < 20; i++)
-        {
-        for(TInt j = 0; j < i; j++)
+        CleanupStack::PushL(guid);
+        iLog->Log( *guid );       
+        TRAPD( err, uidArray->InsertIsqL( *guid ) );
+        
+        if ( err == KErrAlreadyExists )
             {
-            if( guids[j] == guids[i] )
-                {
-                iLog->Log( KDuplicateUids );
-                retValue = KErrNotFound;
-                break;
-                }
+            outputBuffer.Zero();
+            outputBuffer.Append( _L8( "\n err == KErrAlreadyExists\n" ) );
+            iLog->Log( outputBuffer );
+            RDebug::Print(_L("failed %d"),i);
+            retValue = KErrNotFound;            
             }
+
+        CleanupStack::PopAndDestroy( guid );
         }
-    guids.ResetAndDestroy();
+   
     globalData->Release();
-
+    delete uidArray; //cleanup uid array
     // Validate the result.
 
     return retValue;