# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1272375382 -10800 # Node ID 9711e452b5e9736a49fc9d976c00706e417ac5d2 # Parent 21239b3bcd781df8664d84c10ef3f4d047fd5ec3 Revision: 201015 Kit: 201017 diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/commonutils/bwins/calencommonutilsu.def --- a/calendarui/commonutils/bwins/calencommonutilsu.def Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/commonutils/bwins/calencommonutilsu.def Tue Apr 27 16:36:22 2010 +0300 @@ -135,4 +135,5 @@ ?SynchType@CCalenEntryUtil@@QBE?AW4TSynchType@1@XZ @ 134 NONAME ; enum CCalenEntryUtil::TSynchType CCalenEntryUtil::SynchType(void) const ?GetNextAvailableOffsetL@CCalenMultiCalUtil@@SAIXZ @ 135 NONAME ; unsigned int CCalenMultiCalUtil::GetNextAvailableOffsetL(void) ?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) diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/commonutils/eabi/calencommonutilsu.def --- a/calendarui/commonutils/eabi/calencommonutilsu.def Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/commonutils/eabi/calencommonutilsu.def Tue Apr 27 16:36:22 2010 +0300 @@ -148,4 +148,6 @@ _ZTV21CCalenAttachmentModel @ 147 NONAME _ZN18CCalenMultiCalUtil23GetNextAvailableOffsetLEv @ 148 NONAME _ZN18CCalenMultiCalUtil24GetNextAvailableCalFileLEv @ 149 NONAME + _ZN21CCalenAttachmentModel14AttachmentOpenERi @ 150 NONAME + _ZN21CCalenAttachmentModel16IsAttachmentOpenEv @ 151 NONAME diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/commonutils/inc/calenattachmentmodel.h --- a/calendarui/commonutils/inc/calenattachmentmodel.h Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/commonutils/inc/calenattachmentmodel.h Tue Apr 27 16:36:22 2010 +0300 @@ -185,6 +185,22 @@ */ IMPORT_C void CheckForExistingAttachmentsL(CCalEntry* entry); + /** + * Set the flag to ETrue if the attachment(Photo, audio and vedio files) is open. + * + * @param aEmbeddedFileOpened, set to ETrue when attachment(Photo, audio and vedio files) is Open + * @return None + */ + IMPORT_C void AttachmentOpen(TBool& aEmbeddedFileOpened); + + /** + * return ETrue if the atacchment is opened. + * + * @param None + * @return None + */ + IMPORT_C TBool IsAttachmentOpen(); + private: /** @@ -230,6 +246,7 @@ RApaLsSession iAppList; TSize iIconSize; TBool isAttachmentModelCleared; // Flag to tell if attachment model is reset. If yes, then only it will be populated again + TBool iEmbeddedFileOpened; }; #endif // CALENATTACHMENTMODEL_H diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/commonutils/src/calenattachmentmodel.cpp --- a/calendarui/commonutils/src/calenattachmentmodel.cpp Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/commonutils/src/calenattachmentmodel.cpp Tue Apr 27 16:36:22 2010 +0300 @@ -95,6 +95,7 @@ { TRACE_ENTRY_POINT; isAttachmentModelCleared = ETrue; + iEmbeddedFileOpened = EFalse; TRACE_EXIT_POINT; } @@ -612,8 +613,29 @@ } } - TRACE_EXIT_POINT; - + TRACE_EXIT_POINT; } +// ---------------------------------------------------------------------------- +// CCalenAttachmentModel::AttachmentOpen +// Set the flag if the attachment(Photo, audio and vedio files) is open. +// ---------------------------------------------------------------------------- +// +EXPORT_C void CCalenAttachmentModel::AttachmentOpen(TBool& aEmbeddedFileOpened) + { + TRACE_ENTRY_POINT + iEmbeddedFileOpened = aEmbeddedFileOpened; + TRACE_EXIT_POINT + } +// ---------------------------------------------------------------------------- +// CCalenAttachmentModel::IsAttachmentOpen +// return True if the atacchment is opened. +// ---------------------------------------------------------------------------- +// +EXPORT_C TBool CCalenAttachmentModel::IsAttachmentOpen() + { + TRACE_ENTRY_POINT + TRACE_EXIT_POINT + return iEmbeddedFileOpened; + } // End of file --Don't remove this. diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/controller/BWINS/calencontrolleru.def --- a/calendarui/controller/BWINS/calencontrolleru.def Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/controller/BWINS/calencontrolleru.def Tue Apr 27 16:36:22 2010 +0300 @@ -17,7 +17,7 @@ ?RegisterForNotificationsL@CCalenController@@QAEXPAVMCalenNotificationHandler@@W4TCalenNotification@@@Z @ 16 NONAME ; void CCalenController::RegisterForNotificationsL(class MCalenNotificationHandler *, enum TCalenNotification) ?CreateOutOfRangeIconsL@CCalenIcons@@QBEPAVCAknIconArray@@XZ @ 17 NONAME ; class CAknIconArray * CCalenIcons::CreateOutOfRangeIconsL(void) const ?CreateMonthViewIconsL@CCalenIcons@@QBEPAVCAknIconArray@@XZ @ 18 NONAME ; class CAknIconArray * CCalenIcons::CreateMonthViewIconsL(void) const - ?GetIconL@CCalenIcons@@QBEPAVCGulIcon@@W4TCalenIcons@MCalenServices@@@Z @ 19 NONAME ; class CGulIcon * CCalenIcons::GetIconL(enum MCalenServices::TCalenIcons) const + ?GetIconL@CCalenIcons@@QBEPAVCGulIcon@@W4TCalenIcons@MCalenServices@@H@Z @ 19 NONAME ; class CGulIcon * CCalenIcons::GetIconL(enum MCalenServices::TCalenIcons, int) const ?CreateItemNotShownIconL@CCalenIcons@@QBEPAVCGulIcon@@XZ @ 20 NONAME ; class CGulIcon * CCalenIcons::CreateItemNotShownIconL(void) const ?RegisterForNotificationsL@CCalenController@@QAEXPAVMCalenNotificationHandler@@AAV?$RArray@W4TCalenNotification@@@@@Z @ 21 NONAME ; void CCalenController::RegisterForNotificationsL(class MCalenNotificationHandler *, class RArray &) ?NewServicesL@CCalenController@@UAEPAVMCalenServices@@XZ @ 22 NONAME ; class MCalenServices * CCalenController::NewServicesL(void) diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/controller/eabi/calencontrolleru.def --- a/calendarui/controller/eabi/calencontrolleru.def Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/controller/eabi/calencontrolleru.def Tue Apr 27 16:36:22 2010 +0300 @@ -20,7 +20,7 @@ _ZNK11CCalenIcons22CreateOutOfRangeIconsLEv @ 19 NONAME _ZNK11CCalenIcons23CreateItemNotShownIconLEv @ 20 NONAME _ZNK11CCalenIcons27CreateDayWeekToDoViewIconsLEv @ 21 NONAME - _ZNK11CCalenIcons8GetIconLEN14MCalenServices11TCalenIconsE @ 22 NONAME + _ZNK11CCalenIcons8GetIconLEN14MCalenServices11TCalenIconsEi @ 22 NONAME _ZTI11CCalenState @ 23 NONAME _ZTI14CCalenActionUi @ 24 NONAME _ZTI14CCalenMapState @ 25 NONAME diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/controller/inc/calencontroller.h --- a/calendarui/controller/inc/calencontroller.h Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/controller/inc/calencontroller.h Tue Apr 27 16:36:22 2010 +0300 @@ -254,7 +254,7 @@ * Get calendar icon of specific type * @return CGulIcon* */ - CGulIcon* GetIconL(MCalenServices::TCalenIcons aIndex); + CGulIcon* GetIconL(MCalenServices::TCalenIcons aIndex, const TInt aViewId = 0 ); /* Get multipledb manager * @return reference to CCalenMultipleDbManager diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/controller/inc/calenicons.h --- a/calendarui/controller/inc/calenicons.h Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/controller/inc/calenicons.h Tue Apr 27 16:36:22 2010 +0300 @@ -94,7 +94,7 @@ * @param aIndex An index to the enum TCalenIcons * @return a pointer to CGulIcon */ - IMPORT_C CGulIcon* GetIconL( MCalenServices::TCalenIcons aIndex) const; + IMPORT_C CGulIcon* GetIconL( MCalenServices::TCalenIcons aIndex, const TInt aViewId = 0 ) const; private: /** diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/controller/inc/calenservicesimpl.h --- a/calendarui/controller/inc/calenservicesimpl.h Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/controller/inc/calenservicesimpl.h Tue Apr 27 16:36:22 2010 +0300 @@ -117,7 +117,7 @@ * Get calendar icon of specific type * @return CGulIcon* */ - CGulIcon* GetIconL( MCalenServices::TCalenIcons aIndex ); + CGulIcon* GetIconL( MCalenServices::TCalenIcons aIndex, const TInt aViewId = 0 ); /** * Register for notifications of Calendar events diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/controller/src/calenalarmmanager.cpp --- a/calendarui/controller/src/calenalarmmanager.cpp Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/controller/src/calenalarmmanager.cpp Tue Apr 27 16:36:22 2010 +0300 @@ -46,6 +46,7 @@ #include "calensetting.h" #include "calencontextfwlistener.h" #include "CleanupResetAndDestroy.h" +#include "CalenAttachmentModel.h" static const TUint32 KMaxMissedAlarms = 10; @@ -190,9 +191,13 @@ break; case ECalenEventViewFromAlarm: { - LaunchEventViewerL(); - iViewManager.SetRepopulation(EFalse); - iController.ViewManager().RequestActivationL( KUidCalenEventView, KUidCalenShowAlarmCba ); + TBool attachmentOpened = iController.Services().GetAttachmentData()->IsAttachmentOpen(); + if(!attachmentOpened) + { + LaunchEventViewerL(); + iViewManager.SetRepopulation(EFalse); + iController.ViewManager().RequestActivationL( KUidCalenEventView, KUidCalenShowAlarmCba ); + } } break; case ECalenEventViewFromAlarmStopOnly: diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/controller/src/calenbackgroundstate.cpp --- a/calendarui/controller/src/calenbackgroundstate.cpp Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/controller/src/calenbackgroundstate.cpp Tue Apr 27 16:36:22 2010 +0300 @@ -136,7 +136,8 @@ || iPreviousState == CCalenStateMachine::ECalenEditingState || iPreviousState == CCalenStateMachine::ECalenSendingState || iPreviousState == CCalenStateMachine::ECalenIdleState - || iPreviousState == CCalenStateMachine::ECalenViewingState) + || iPreviousState == CCalenStateMachine::ECalenViewingState + || iPreviousState == CCalenStateMachine::ECalenAttachmentState) { SetCurrentState( aStateMachine, CCalenStateMachine::ECalenIdleState ); ActivateCurrentStateL(aStateMachine); diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/controller/src/calencontroller.cpp --- a/calendarui/controller/src/calencontroller.cpp Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/controller/src/calencontroller.cpp Tue Apr 27 16:36:22 2010 +0300 @@ -982,7 +982,7 @@ // Get icon of specific type // ---------------------------------------------------------------------------- // -CGulIcon* CCalenController::GetIconL( MCalenServices::TCalenIcons aIndex ) +CGulIcon* CCalenController::GetIconL( MCalenServices::TCalenIcons aIndex, const TInt aViewId ) { TRACE_ENTRY_POINT; @@ -993,7 +993,7 @@ } TRACE_EXIT_POINT; - return iViewManager->IconsL().GetIconL(aIndex); + return iViewManager->IconsL().GetIconL(aIndex,aViewId); } // ---------------------------------------------------------------------------- diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/controller/src/calendeleteui.cpp --- a/calendarui/controller/src/calendeleteui.cpp Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/controller/src/calendeleteui.cpp Tue Apr 27 16:36:22 2010 +0300 @@ -41,6 +41,7 @@ #include #include #include +#include #include "calendarui_debug.h" // Debug #include "calendeleteui.h" @@ -586,13 +587,13 @@ // void CCalenDeleteUi::HandleDeleteMultipleEventsL( const TTime& aFirstDay, const TTime& aLastDay, - TInt aConfNoteId ) + TInt /*aConfNoteId */) { TRACE_ENTRY_POINT; ASSERT( !iWaitDialog ); ASSERT( !iIsDeleting ); - iConfirmationNoteId = aConfNoteId; + //iConfirmationNoteId = aConfNoteId; iWaitDialog = new( ELeave ) CAknWaitDialog( REINTERPRET_CAST( CEikDialog**, &iWaitDialog ) ); @@ -690,10 +691,10 @@ if( aFirstPassError == KErrNone ) { // Show confirmation note - HBufC* buf = StringLoader::LoadLC( iConfirmationNoteId, iEikEnv ); - CAknConfirmationNote* dialog = new( ELeave ) CAknConfirmationNote(); - dialog->ExecuteLD(*buf); - CleanupStack::PopAndDestroy( buf ); +// HBufC* buf = StringLoader::LoadLC( iConfirmationNoteId, iEikEnv ); +// CAknConfirmationNote* dialog = new( ELeave ) CAknConfirmationNote(); +// dialog->ExecuteLD(*buf); +// CleanupStack::PopAndDestroy( buf ); } else { @@ -891,6 +892,12 @@ if( doDelete ) { + //Before deleteing the entry reset the attachment model + if(iController.Services().GetAttachmentData()->NumberOfItems()) + { + iController.Services().GetAttachmentData()->Reset(); + } + if( !TryDeleteWithMrUtilsL( aInstance, aRepeatType ) ) { if( !child || aRepeatType == CalCommon::EThisOnly ) diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/controller/src/caleneditui.cpp --- a/calendarui/controller/src/caleneditui.cpp Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/controller/src/caleneditui.cpp Tue Apr 27 16:36:22 2010 +0300 @@ -152,7 +152,14 @@ TUid currentView = iController.ViewManager().CurrentView(); if( KUidCalenTodoView == currentView ) { - // Open NewEntry as "To-Do", if editor is launched from To-Do view. + // Open NewEntry as "To-Do", if editor is launched from To-Do view. + MCalenContext& context = iController.Services().Context(); + // Set the date on the context to today. + TTime homeTime; + homeTime.HomeTime(); + TCalTime today; + today.SetTimeLocalL( homeTime ); + context.SetFocusDateL( today, TVwsViewId( KUidCalendar, KUidCalenTodoView ) ); EditNewEntryL( CCalEntry::ETodo ); } else diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/controller/src/calenicons.cpp --- a/calendarui/controller/src/calenicons.cpp Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/controller/src/calenicons.cpp Tue Apr 27 16:36:22 2010 +0300 @@ -20,6 +20,7 @@ #include "calenicons.h" #include "calendar.hrh" +#include #include #include #include @@ -309,7 +310,7 @@ // (other items were commented in a header). // --------------------------------------------------------- // -EXPORT_C CGulIcon* CCalenIcons::GetIconL( MCalenServices::TCalenIcons aIndex ) const +EXPORT_C CGulIcon* CCalenIcons::GetIconL( MCalenServices::TCalenIcons aIndex, const TInt aViewId ) const { TRACE_ENTRY_POINT; CGulIcon* icon; @@ -318,6 +319,7 @@ // When Avkon suplies some method to do that, change these TAknsItemID colorGroup = KAknsIIDQsnIconColors; TInt colorIndex = EAknsCIQsnIconColorsCG19; + TInt colorIndexToDo = EAknsCIQsnIconColorsCG13; TRgb nonSkinColor = AKN_LAF_COLOR(215); CFbsBitmap* bitmap = NULL; CFbsBitmap* mask = NULL; @@ -370,79 +372,188 @@ break; case MCalenServices::ECalenAlarmIcon: { - AknsUtils::CreateColorIconLC( AknsUtils::SkinInstance(), - KAknsIIDQgnIndiAlarmAdd, - colorGroup, - colorIndex, - bitmap, mask, - AknIconUtils::AvkonIconFileName(), - EMbmAvkonQgn_indi_alarm_add, - EMbmAvkonQgn_indi_alarm_add_mask, - nonSkinColor); - icon = CGulIcon::NewL( bitmap, mask ); - CleanupStack::Pop( 2 ); // bitmap, mask + if(aViewId == KCalenTodoViewUidValue || + aViewId == KCalenEventViewUidValue || + aViewId == KCalenMissedAlarmsViewUidValue || + aViewId == KCalenMissedEventViewUidValue ) + { + AknsUtils::CreateColorIconLC( AknsUtils::SkinInstance(), + KAknsIIDQgnIndiAlarmAdd, + colorGroup, + colorIndexToDo, + bitmap, mask, + AknIconUtils::AvkonIconFileName(), + EMbmAvkonQgn_indi_alarm_add, + EMbmAvkonQgn_indi_alarm_add_mask, + nonSkinColor); + icon = CGulIcon::NewL( bitmap, mask ); + CleanupStack::Pop( 2 ); // bitmap, mask + break; + } + else + { + AknsUtils::CreateColorIconLC( AknsUtils::SkinInstance(), + KAknsIIDQgnIndiAlarmAdd, + colorGroup, + colorIndex, + bitmap, mask, + AknIconUtils::AvkonIconFileName(), + EMbmAvkonQgn_indi_alarm_add, + EMbmAvkonQgn_indi_alarm_add_mask, + nonSkinColor); + icon = CGulIcon::NewL( bitmap, mask ); + CleanupStack::Pop( 2 ); // bitmap, mask + break; + } } - break; + case MCalenServices::ECalenRepeatIcon: { - AknsUtils::CreateColorIconLC( AknsUtils::SkinInstance(), - KAknsIIDQgnIndiRepeatAdd, - colorGroup, - colorIndex, - bitmap, mask, - iIconFile, - EMbmCalendarQgn_indi_repeat_add, - EMbmCalendarQgn_indi_repeat_add_mask, - nonSkinColor); - icon = CGulIcon::NewL(bitmap, mask); - CleanupStack::Pop( 2 ); + if(aViewId == KCalenTodoViewUidValue || + aViewId == KCalenEventViewUidValue || + aViewId == KCalenMissedAlarmsViewUidValue || + aViewId == KCalenMissedEventViewUidValue ) + { + AknsUtils::CreateColorIconLC( AknsUtils::SkinInstance(), + KAknsIIDQgnIndiRepeatAdd, + colorGroup, + colorIndexToDo, + bitmap, mask, + iIconFile, + EMbmCalendarQgn_indi_repeat_add, + EMbmCalendarQgn_indi_repeat_add_mask, + nonSkinColor); + icon = CGulIcon::NewL(bitmap, mask); + CleanupStack::Pop( 2 ); + break; + } + else + { + AknsUtils::CreateColorIconLC( AknsUtils::SkinInstance(), + KAknsIIDQgnIndiRepeatAdd, + colorGroup, + colorIndex, + bitmap, mask, + iIconFile, + EMbmCalendarQgn_indi_repeat_add, + EMbmCalendarQgn_indi_repeat_add_mask, + nonSkinColor); + icon = CGulIcon::NewL(bitmap, mask); + CleanupStack::Pop( 2 ); + break; + } } - break; + case MCalenServices::ECalenRepeatExceptionIcon: { - AknsUtils::CreateColorIconLC(AknsUtils::SkinInstance(), - KAknsIIDQgnIndiRepeatExceptionAdd, - colorGroup, - colorIndex, - bitmap, mask, - iIconFile, - EMbmCalendarQgn_indi_repeat_exception_add, - EMbmCalendarQgn_indi_repeat_exception_add_mask, - nonSkinColor); - icon = CGulIcon::NewL(bitmap, mask); - CleanupStack::Pop(2); // bitmap, mask; + if(aViewId == KCalenTodoViewUidValue || + aViewId == KCalenEventViewUidValue || + aViewId == KCalenMissedAlarmsViewUidValue || + aViewId == KCalenMissedEventViewUidValue ) + { + AknsUtils::CreateColorIconLC(AknsUtils::SkinInstance(), + KAknsIIDQgnIndiRepeatExceptionAdd, + colorGroup, + colorIndexToDo, + bitmap, mask, + iIconFile, + EMbmCalendarQgn_indi_repeat_exception_add, + EMbmCalendarQgn_indi_repeat_exception_add_mask, + nonSkinColor); + icon = CGulIcon::NewL(bitmap, mask); + CleanupStack::Pop(2); // bitmap, mask; + break; + } + else + { + AknsUtils::CreateColorIconLC(AknsUtils::SkinInstance(), + KAknsIIDQgnIndiRepeatExceptionAdd, + colorGroup, + colorIndex, + bitmap, mask, + iIconFile, + EMbmCalendarQgn_indi_repeat_exception_add, + EMbmCalendarQgn_indi_repeat_exception_add_mask, + nonSkinColor); + icon = CGulIcon::NewL(bitmap, mask); + CleanupStack::Pop(2); // bitmap, mask; + break; + } + } - break; case MCalenServices::ECalenNotePriorityLow: { - AknsUtils::CreateColorIconLC(AknsUtils::SkinInstance(), - KAknsIIDQgnIndiTodoLowAdd, - colorGroup, - colorIndex, - bitmap, mask, - iIconFile, - EMbmCalendarQgn_indi_todo_low_add, - EMbmCalendarQgn_indi_todo_low_add_mask, - nonSkinColor); - icon = CGulIcon::NewL(bitmap, mask); - CleanupStack::Pop(2); // bitmap, mask; + if(aViewId == KCalenTodoViewUidValue || + aViewId == KCalenEventViewUidValue || + aViewId == KCalenMissedAlarmsViewUidValue || + aViewId == KCalenMissedEventViewUidValue ) + { + AknsUtils::CreateColorIconLC(AknsUtils::SkinInstance(), + KAknsIIDQgnIndiTodoLowAdd, + colorGroup, + colorIndexToDo, + bitmap, mask, + iIconFile, + EMbmCalendarQgn_indi_todo_low_add, + EMbmCalendarQgn_indi_todo_low_add_mask, + nonSkinColor); + icon = CGulIcon::NewL(bitmap, mask); + CleanupStack::Pop(2); // bitmap, mask; + break; + } + else + { + AknsUtils::CreateColorIconLC(AknsUtils::SkinInstance(), + KAknsIIDQgnIndiTodoLowAdd, + colorGroup, + colorIndex, + bitmap, mask, + iIconFile, + EMbmCalendarQgn_indi_todo_low_add, + EMbmCalendarQgn_indi_todo_low_add_mask, + nonSkinColor); + icon = CGulIcon::NewL(bitmap, mask); + CleanupStack::Pop(2); // bitmap, mask; + break; + } } - break; + case MCalenServices::ECalenNotePriorityHigh: { - AknsUtils::CreateColorIconLC(AknsUtils::SkinInstance(), - KAknsIIDQgnIndiTodoHighAdd, - colorGroup, - colorIndex, - bitmap, mask, - iIconFile, - EMbmCalendarQgn_indi_todo_high_add, - EMbmCalendarQgn_indi_todo_high_add_mask, - nonSkinColor ); - icon = CGulIcon::NewL(bitmap, mask); - CleanupStack::Pop(2); // bitmap, mask; + if(aViewId == KCalenTodoViewUidValue || + aViewId == KCalenEventViewUidValue || + aViewId == KCalenMissedAlarmsViewUidValue || + aViewId == KCalenMissedEventViewUidValue ) + { + AknsUtils::CreateColorIconLC(AknsUtils::SkinInstance(), + KAknsIIDQgnIndiTodoHighAdd, + colorGroup, + colorIndexToDo, + bitmap, mask, + iIconFile, + EMbmCalendarQgn_indi_todo_high_add, + EMbmCalendarQgn_indi_todo_high_add_mask, + nonSkinColor ); + icon = CGulIcon::NewL(bitmap, mask); + CleanupStack::Pop(2); // bitmap, mask; + break; + } + else + { + AknsUtils::CreateColorIconLC(AknsUtils::SkinInstance(), + KAknsIIDQgnIndiTodoHighAdd, + colorGroup, + colorIndex, + bitmap, mask, + iIconFile, + EMbmCalendarQgn_indi_todo_high_add, + EMbmCalendarQgn_indi_todo_high_add_mask, + nonSkinColor ); + icon = CGulIcon::NewL(bitmap, mask); + CleanupStack::Pop(2); // bitmap, mask; + break; + } } - break; case MCalenServices::ECalenTodoIconUndone: { icon = CreateBitmapSkinnedIconL( KAknsIIDQgnPropTodoUndone, diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/controller/src/calenmultidbeditor.cpp --- a/calendarui/controller/src/calenmultidbeditor.cpp Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/controller/src/calenmultidbeditor.cpp Tue Apr 27 16:36:22 2010 +0300 @@ -1265,10 +1265,10 @@ TSize pixelsize; pixelsize.iWidth = 225; - pixelsize.iHeight = 25; + pixelsize.iHeight = 16; TPoint aPoint; TRect area = TRect(aTopLeft, pixelsize); - area.Move(0,-20); + area.Move(0,-11); // Draw a datbase color rectangle aGc.SetBrushColor(iColors); aGc.SetBrushStyle(CGraphicsContext::ESolidBrush); diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/controller/src/calenmultipledbui.cpp --- a/calendarui/controller/src/calenmultipledbui.cpp Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/controller/src/calenmultipledbui.cpp Tue Apr 27 16:36:22 2010 +0300 @@ -115,11 +115,10 @@ iGc->Reset(); - TAknWindowComponentLayout tempLayout = - AknLayoutScalable_Apps::list_cale_time_pane_g6( aItemIndex - iListBox->TopItemIndex()) ; + TAknWindowComponentLayout tempLayout = AknLayoutScalable_Apps::list_cale_time_pane_g6(0); - TAknLayoutRect colourstrips; - colourstrips.LayoutRect( actualItemRect, tempLayout.LayoutLine() ); + TAknLayoutRect colourstrips; + colourstrips.LayoutRect( actualItemRect, tempLayout.LayoutLine() ); iGc->SetPenColor( CGraphicsContext::ENullPen ); iGc->DrawRect( colourstrips.Rect() ); @@ -521,7 +520,7 @@ HBufC* calendarFileName = calendarInfoList[currentIndex]->FileNameL().AllocLC(); if (!(calendarFileName->CompareF( - _L("c:Calendar1")))) + iController.Services().SessionL().DefaultFileNameL()))) { aMenuPane->DeleteMenuItem(ECalenCmdDelete); } @@ -591,7 +590,7 @@ } break; case EAknCmdHelp: - if (FeatureManager::FeatureSupported(KFeatureIdHelp)) //ravi + if (FeatureManager::FeatureSupported(KFeatureIdHelp)) { HlpLauncher::LaunchHelpApplicationL( iCoeEnv->WsSession(),iAvkonAppUi->AppHelpContextL()); diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/controller/src/calennotifier.cpp --- a/calendarui/controller/src/calennotifier.cpp Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/controller/src/calennotifier.cpp Tue Apr 27 16:36:22 2010 +0300 @@ -639,7 +639,10 @@ ); // Exit application - iAvkonAppUi->Exit(); + if (iAvkonAppUi) + { + iAvkonAppUi->Exit(); + } } TRACE_EXIT_POINT; diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/controller/src/calenservicesimpl.cpp --- a/calendarui/controller/src/calenservicesimpl.cpp Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/controller/src/calenservicesimpl.cpp Tue Apr 27 16:36:22 2010 +0300 @@ -418,12 +418,12 @@ // (other items were commented in a header). // ---------------------------------------------------------------------------- // -CGulIcon* CCalenServicesImpl::GetIconL( MCalenServices::TCalenIcons aIndex ) +CGulIcon* CCalenServicesImpl::GetIconL( MCalenServices::TCalenIcons aIndex, const TInt aViewId ) { TRACE_ENTRY_POINT; TRACE_EXIT_POINT; - return iController->GetIconL( aIndex ); + return iController->GetIconL( aIndex, aViewId ); } // ---------------------------------------------------------------------------- diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/globaldata/src/calenglobaldata.cpp --- a/calendarui/globaldata/src/calenglobaldata.cpp Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/globaldata/src/calenglobaldata.cpp Tue Apr 27 16:36:22 2010 +0300 @@ -48,13 +48,19 @@ #include #include +#include +#include // Default Calendar database path _LIT( KCalendarDatabaseFilePath, "c:calendar" ); _LIT( KPhoneCalendar,"Personal" ); _LIT( KExtCalendar,"Ext calendar" ); const TInt KBuffLength = 24; -_LIT(KPhoneCalendarName,"PhoneCalendar"); + +_LIT(KPersonal,"Personal"); +_LIT(KFamily,"Family"); +_LIT(KFriends,"Friends"); +_LIT( KMissedAlarmResourceFile, "z:\\resource\\CalenSvrMissedAlarmManagerResource.rsc"); // changes done // ============================ MEMBER FUNCTIONS =============================== @@ -1493,20 +1499,52 @@ RPointerArray& aCalendarInfoList ) { TRACE_ENTRY_POINT; + RFs fsSession; + CleanupClosePushL( fsSession ); + RResourceFile resourceFile; + CleanupClosePushL( resourceFile ); + User::LeaveIfError( fsSession.Connect() ); + TFileName resourceFileName( KMissedAlarmResourceFile ); + BaflUtils::NearestLanguageFile( fsSession, resourceFileName ); + resourceFile.OpenL(fsSession, resourceFileName ); + resourceFile.ConfirmSignatureL( 0 ); for(TInt index=0;index < iCalendarInfoList.Count();index++) { - TPtrC fileNamePtr = iCalendarInfoList[index]->FileNameL(); + TPtrC calendarNamePtr = iCalendarInfoList[index]->NameL(); + if(calendarNamePtr.Compare(KPersonal) == 0) + { + HBufC8* personalBuffer = resourceFile.AllocReadLC( R_CALE_DB_PERSONAL ); + const TPtrC16 ptrPBuffer(( TText16*) personalBuffer->Ptr(), + ( personalBuffer->Length()+1 )>>1 ); + HBufC *personalCalendar = ptrPBuffer.AllocL(); + iCalendarInfoList[index]->SetNameL(*personalCalendar); + CleanupStack::PopAndDestroy( personalBuffer ); + } + else if(calendarNamePtr.Compare(KFamily) == 0) + { + HBufC8* familyBuffer=resourceFile.AllocReadLC( R_CALE_DB_FAMILY ); + const TPtrC16 ptrFBuffer(( TText16*) familyBuffer->Ptr(), + ( familyBuffer->Length()+1 )>>1 ); + HBufC *familyCalendar = ptrFBuffer.AllocL(); + iCalendarInfoList[index]->SetNameL(*familyCalendar); + CleanupStack::PopAndDestroy( familyBuffer ); + } + else if(calendarNamePtr.Compare(KFriends) == 0) + { + HBufC8* friendsBuffer = resourceFile.AllocReadLC( R_CALE_DB_FRIENDS ); + const TPtrC16 ptrFrBuffer(( TText16*) friendsBuffer->Ptr(), + ( friendsBuffer->Length()+1 )>>1 ); + HBufC *friendsCalendar = ptrFrBuffer.AllocL(); + iCalendarInfoList[index]->SetNameL(*friendsCalendar); + CleanupStack::PopAndDestroy( friendsBuffer ); + } + + aCalendarInfoList.AppendL(iCalendarInfoList[index]); - //We dont want default calendar PhoneCalendar tobe shown in calendarui. - if(fileNamePtr.CompareF(KCalendarDatabaseFilePath) - && calendarNamePtr.CompareF(KPhoneCalendarName)) - { - aCalendarInfoList.AppendL(iCalendarInfoList[index]); - } } - + CleanupStack::PopAndDestroy(2); TRACE_EXIT_POINT; } diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/loc/calendar.loc --- a/calendarui/loc/calendar.loc Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/loc/calendar.loc Tue Apr 27 16:36:22 2010 +0300 @@ -2633,5 +2633,11 @@ //l:popup_note_window // #define qtn_calen_db_change_del_exeptions "Exceptions will be deleted, Want to continue?" + +//d:Confirmation note shown, when tasks are updated +//l:popup_note_window +//w: +//r:9.2 +#define qtn_todo_all_task_updated "All to-do notes updated" // End of File diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/multicaluidialog/src/caldblistboxitemdrawer.cpp --- a/calendarui/multicaluidialog/src/caldblistboxitemdrawer.cpp Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/multicaluidialog/src/caldblistboxitemdrawer.cpp Tue Apr 27 16:36:22 2010 +0300 @@ -103,9 +103,8 @@ iGc->Reset(); - // Ggetting the layout for clolourstrips for list dialog - TAknWindowComponentLayout tempLayout = - AknLayoutScalable_Apps::list_cale_time_pane_g6( aItemIndex - iListBox->TopItemIndex() ) ; + // Ggetting the layout for clolourstrips for list dialog + TAknWindowComponentLayout tempLayout = AknLayoutScalable_Apps::list_cale_time_pane_g6(0); TAknLayoutRect colourstrips; colourstrips.LayoutRect( actualItemRect, tempLayout.LayoutLine() ); diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/multicaluidialog/src/multicaluidialogmodel.cpp --- a/calendarui/multicaluidialog/src/multicaluidialogmodel.cpp Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/multicaluidialog/src/multicaluidialogmodel.cpp Tue Apr 27 16:36:22 2010 +0300 @@ -26,8 +26,6 @@ #include "multicaluidialogmodel.h" #include "calendarui_debug.h" -_LIT( KCalendarDatabaseFilePath, "c:calendar" ); - // ---------------------------------------------------------------------------- // CMultiCalUiDialogModel::CMultiCalUiDialogModel // Constructor @@ -150,7 +148,7 @@ { iCalendarStatus.Append(0); - /* if (!index) //First create the default session + if (!index) //First create the default session { const TPtrC name = iCalendarInfoList[index]->FileNameL(); defaultSession->OpenL(name); @@ -160,7 +158,7 @@ iCalEntryViewArray.Append(entryView); CleanupStack::Pop(entryView); } - else*/ + else { CCalSession* session = CCalSession::NewL(*defaultSession); CleanupStack::PushL(session); @@ -307,15 +305,7 @@ CCalCalendarInfo* calendarInfo = calIter->FirstL(); while (calendarInfo) { - TPtrC fileNamePtr = calendarInfo->FileNameL(); - if(fileNamePtr.CompareF(KCalendarDatabaseFilePath)) - { - aCalendarInfoList.AppendL(calendarInfo); - } - else - { - delete calendarInfo; - } + aCalendarInfoList.AppendL(calendarInfo); calendarInfo = calIter->NextL(); } CleanupStack::PopAndDestroy(calIter); diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/organizerplugin/aiagendapluginengine/src/CalenAsyncCommands.cpp --- a/calendarui/organizerplugin/aiagendapluginengine/src/CalenAsyncCommands.cpp Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/organizerplugin/aiagendapluginengine/src/CalenAsyncCommands.cpp Tue Apr 27 16:36:22 2010 +0300 @@ -167,6 +167,11 @@ { TRACE_ENTRY_POINT; + if (iStatus.Int()) + { + return; + } + switch( iState ) { case ECreateSession: @@ -367,6 +372,11 @@ { TRACE_ENTRY_POINT; + if (iStatus.Int()) + { + return; + } + switch( iState ) { case EFetch: @@ -554,6 +564,11 @@ { TRACE_ENTRY_POINT; + if (iStatus.Int()) + { + return; + } + switch( iState ) { case EFetch: @@ -731,6 +746,11 @@ { TRACE_ENTRY_POINT; + if (iStatus.Int()) + { + return; + } + switch( iState ) { case EFetchInstances: @@ -890,6 +910,11 @@ { TRACE_ENTRY_POINT; + if (iStatus.Int()) + { + return; + } + switch( iState ) { case EFetch: diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/organizerplugin/aiagendapluginengine/src/CalenEngine.cpp --- a/calendarui/organizerplugin/aiagendapluginengine/src/CalenEngine.cpp Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/organizerplugin/aiagendapluginengine/src/CalenEngine.cpp Tue Apr 27 16:36:22 2010 +0300 @@ -188,7 +188,7 @@ for(CCalCalendarInfo* calendarInfo = calIter->FirstL() ; calendarInfo != NULL ; calendarInfo = calIter->NextL() ) { - if(calendarInfo->Enabled() && calendarInfo->FileNameL().CompareF(_L("c:Calendar"))) + if(calendarInfo->Enabled()) { TCalInfo calInfo; calInfo.iFileName = calendarInfo->FileNameL(); diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/server/CalenSvr/src/CalenServer.cpp --- a/calendarui/server/CalenSvr/src/CalenServer.cpp Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/server/CalenSvr/src/CalenServer.cpp Tue Apr 27 16:36:22 2010 +0300 @@ -51,7 +51,10 @@ const TInt KComma( ',' ); -_LIT(KPhoneCalendarName,"PhoneCalendar"); + +_LIT(KPersonal,"Personal"); +_LIT(KFamily,"Family"); +_LIT(KFriends,"Friends"); // ================= MEMBER FUNCTIONS ======================= // @@ -338,7 +341,6 @@ { TBuf calendarFileName; calendarFileName.Append(KCalendarDatabaseFilePath); - calendarInfo->SetEnabled(EFalse); TRAPD(error,session->CreateCalFileL(calendarFileName,*calendarInfo)); User::LeaveIfError(error); } @@ -370,49 +372,26 @@ { TRACE_ENTRY_POINT; - RFs fsSession; - CleanupClosePushL( fsSession ); - RResourceFile resourceFile; - CleanupClosePushL( resourceFile ); - User::LeaveIfError( fsSession.Connect() ); - TFileName resourceFileName( KMissedAlarmResourceFile ); + - BaflUtils::NearestLanguageFile( fsSession, resourceFileName ); - - resourceFile.OpenL(fsSession, resourceFileName ); - resourceFile.ConfirmSignatureL( 0 ); - //Phone calendar - HBufC* phoneCalendarBuffer = KPhoneCalendarName().AllocLC(); - aCalendarNames.AppendL(phoneCalendarBuffer->Des()); - CleanupStack::PopAndDestroy( phoneCalendarBuffer ); + // personal - HBufC8* personalBuffer = resourceFile.AllocReadLC( R_CALE_DB_PERSONAL ); - const TPtrC16 ptrPBuffer(( TText16*) personalBuffer->Ptr(), - ( personalBuffer->Length()+1 )>>1 ); - HBufC *personalCalendar = ptrPBuffer.AllocL(); - aCalendarNames.AppendL( personalCalendar->Des() ); + HBufC* personalBuffer = KPersonal().AllocLC(); + aCalendarNames.AppendL( personalBuffer->Des() ); CleanupStack::PopAndDestroy( personalBuffer ); // famliy - HBufC8* familyBuffer=resourceFile.AllocReadLC( R_CALE_DB_FAMILY ); - const TPtrC16 ptrFBuffer(( TText16*) familyBuffer->Ptr(), - ( familyBuffer->Length()+1 )>>1 ); - HBufC *familyCalendar = ptrFBuffer.AllocL(); - aCalendarNames.AppendL( familyCalendar->Des() ); + HBufC* familyBuffer = KFamily().AllocLC(); + aCalendarNames.AppendL( familyBuffer->Des() ); CleanupStack::PopAndDestroy( familyBuffer ); //friends - HBufC8* friendsBuffer = resourceFile.AllocReadLC( R_CALE_DB_FRIENDS ); - const TPtrC16 ptrFrBuffer(( TText16*) friendsBuffer->Ptr(), - ( friendsBuffer->Length()+1 )>>1 ); - HBufC *friendsCalendar = ptrFrBuffer.AllocL(); - aCalendarNames.AppendL( friendsCalendar->Des() ); - CleanupStack::PopAndDestroy( friendsBuffer ); + HBufC* friendBuffer = KFriends().AllocLC(); + aCalendarNames.AppendL( friendBuffer->Des() ); + CleanupStack::PopAndDestroy( friendBuffer ); - CleanupStack::PopAndDestroy(&resourceFile); - CleanupStack::PopAndDestroy(&fsSession); TRACE_EXIT_POINT; } @@ -472,8 +451,7 @@ TPtrC marker = aRepositoryBuffer; TInt calendarColorOffset; - //For phone calendar - aCalendarColors.Append(KRgbRed.Value()); + while ((calendarColorOffset = marker.Locate(TChar(KComma))) != KErrNotFound) diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/settings/GsPlugin/inc/calendummyservices.h --- a/calendarui/settings/GsPlugin/inc/calendummyservices.h Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/settings/GsPlugin/inc/calendummyservices.h Tue Apr 27 16:36:22 2010 +0300 @@ -104,7 +104,7 @@ * Get calendar icon of specific type * @return CGulIcon* */ - CGulIcon* GetIconL( MCalenServices::TCalenIcons aIndex ); + CGulIcon* GetIconL( MCalenServices::TCalenIcons aIndex, const TInt aViewId = 0 ); /** * Register for notifications of Calendar events diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/settings/GsPlugin/src/calendummyservices.cpp --- a/calendarui/settings/GsPlugin/src/calendummyservices.cpp Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/settings/GsPlugin/src/calendummyservices.cpp Tue Apr 27 16:36:22 2010 +0300 @@ -331,7 +331,7 @@ // (other items were commented in a header). // ---------------------------------------------------------------------------- // -CGulIcon* CCalenDummyServices::GetIconL( MCalenServices::TCalenIcons /*aIndex*/ ) +CGulIcon* CCalenDummyServices::GetIconL( MCalenServices::TCalenIcons /*aIndex*/, const TInt /*aViewId*/ ) { TRACE_ENTRY_POINT; TRACE_EXIT_POINT; diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/views/inc/calencontainer.h --- a/calendarui/views/inc/calencontainer.h Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/views/inc/calencontainer.h Tue Apr 27 16:36:22 2010 +0300 @@ -166,7 +166,7 @@ /** * Creates icon array according to icon index array passed in */ - CAknIconArray* CreateIconsL( const RArray& aIndexArray ); + CAknIconArray* CreateIconsL( const RArray& aIndexArray, const TInt aViewId = 0 ); /** * Creates icon index array diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/views/inc/calenmonthcontainer.h --- a/calendarui/views/inc/calenmonthcontainer.h Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/views/inc/calenmonthcontainer.h Tue Apr 27 16:36:22 2010 +0300 @@ -369,7 +369,8 @@ // View specific data, references to views data TTime& iDate; TTime iOldFirstDayOfGrid; - TBool iChangeMonth; + TBool iChangeMonth; + TBool iChangeDay; }; #endif //CALENMONTHCONT_H diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/views/inc/calenweekcontainer.h --- a/calendarui/views/inc/calenweekcontainer.h Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/views/inc/calenweekcontainer.h Tue Apr 27 16:36:22 2010 +0300 @@ -438,7 +438,8 @@ TBool iTopRowDefault; TBool iRow; - TBool iValidDay; + TBool iValidDay; + TBool iHourChange; }; #endif //CALENWEEKCONT_H diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/views/inc/calenweeklistbox.h --- a/calendarui/views/inc/calenweeklistbox.h Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/views/inc/calenweeklistbox.h Tue Apr 27 16:36:22 2010 +0300 @@ -92,7 +92,7 @@ */ TBool IsValidPointer(TPoint aPos); void HandlePointerEventL(const TPointerEvent& aPointerEvent); -private: + /** * Calculates new column from pointer event */ diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/views/src/calencontainer.cpp --- a/calendarui/views/src/calencontainer.cpp Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/views/src/calencontainer.cpp Tue Apr 27 16:36:22 2010 +0300 @@ -517,7 +517,7 @@ // (other items were commented in a header). // ---------------------------------------------------------------------------- // -CAknIconArray* CCalenContainer::CreateIconsL( const RArray& aIndexArray ) +CAknIconArray* CCalenContainer::CreateIconsL( const RArray& aIndexArray, const TInt aViewId ) { TRACE_ENTRY_POINT; const TInt iconCount( aIndexArray.Count() ); @@ -527,8 +527,8 @@ for( TInt i=0; iAppendL( iServices.GetIconL( static_cast(aIndexArray[i] ) )); - } + icons->AppendL( iServices.GetIconL( static_cast(aIndexArray[i] ), aViewId )); + } CleanupStack::Pop( icons ); TRACE_EXIT_POINT; return icons; diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/views/src/calendaylistboxitemdrawer.cpp --- a/calendarui/views/src/calendaylistboxitemdrawer.cpp Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/views/src/calendaylistboxitemdrawer.cpp Tue Apr 27 16:36:22 2010 +0300 @@ -136,15 +136,35 @@ } - TAknWindowComponentLayout tempLayout = - AknLayoutScalable_Apps::list_cale_time_pane_g6( - aItemIndex - static_cast (iListBox)->TopItemIndex()); + + TInt variantIndex = static_cast(iListBox)->iDayContainer->LayoutVariantIndex(CCalenDayContainer::EListScrollCaleDayPane); + // get the listbox rect. + TRect listBoxRect = iListBox->View()->ViewRect(); + TAknWindowComponentLayout tempLayout = AknLayoutScalable_Apps::list_cale_time_pane_g6(variantIndex); TAknLayoutRect colourstrips; colourstrips.LayoutRect( aItemTextRect, tempLayout.LayoutLine() ); TRect finalRect(colourstrips.Rect()); - finalRect.SetHeight(aItemTextRect.Height()); - iGc->DrawRect( colourstrips.Rect() ); + + // check the height of the colored strip , if it is greater than listboxrect or not + // for bottom part. + if( aItemTextRect.iBr.iY > listBoxRect.iBr.iY ) + { + finalRect.SetRect(aItemTextRect.iTl.iX, aItemTextRect.iTl.iY,colourstrips.Rect().iBr.iX,listBoxRect.iBr.iY); + } + + // for top part. + else if(aItemTextRect.iTl.iY < listBoxRect.iTl.iY) + { + finalRect.SetRect(aItemTextRect.iTl.iX, listBoxRect.iTl.iY,colourstrips.Rect().iBr.iX,aItemTextRect.iBr.iY); + } + + else + { + finalRect.SetHeight(aItemTextRect.Height()); + } + + //iGc->DrawRect( colourstrips.Rect() ); iGc->SetBrushStyle( CGraphicsContext::ESolidBrush ); iGc->SetBrushColor( TRgb(iColor) ); iGc->DrawRect( finalRect ); diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/views/src/caleneventviewcontainer.cpp --- a/calendarui/views/src/caleneventviewcontainer.cpp Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/views/src/caleneventviewcontainer.cpp Tue Apr 27 16:36:22 2010 +0300 @@ -639,15 +639,18 @@ ( aType == KUidValueCoeZoomChangeEvent ) || ( aType == KUidValueCoeFontChangeEvent ) ) { - CEikAppUi* appUi = static_cast( ControlEnv()->AppUi() ); - SetRect( appUi->ClientRect() ); +// CEikAppUi* appUi = static_cast( ControlEnv()->AppUi() ); +// SetRect( appUi->ClientRect() ); + TRect mainPane; + AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, mainPane ); + SetRect( mainPane ); } if( KAknsMessageSkinChange == aType || KEikDynamicLayoutVariantSwitch == aType ) { SizeChanged(); - + SetupFontL(); if(iTextEditor->ScrollBarFrame()) { // make the scrollbars invisible @@ -2788,6 +2791,7 @@ TRACE_ENTRY_POINT; iEmbeddedFileOpened = EFalse; + iServices.GetAttachmentData()->AttachmentOpen(iEmbeddedFileOpened); if (aReason == EAknCmdExit) { //issue this notification, which will be handled by attachmentui. @@ -2979,6 +2983,7 @@ iEmbeddedFileOpened = ETrue; } } + iServices.GetAttachmentData()->AttachmentOpen(iEmbeddedFileOpened); switch(ret) { diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/views/src/calenicondrawer.cpp --- a/calendarui/views/src/calenicondrawer.cpp Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/views/src/calenicondrawer.cpp Tue Apr 27 16:36:22 2010 +0300 @@ -24,6 +24,7 @@ #include "calenicondrawer.h" #include +#include // System includes #include @@ -347,7 +348,7 @@ for( TInt i=0; iAppendL( iServices.GetIconL( static_cast(aIndexArray[i] ) )); + icons->AppendL( iServices.GetIconL( static_cast(aIndexArray[i] ), KCalenMissedEventViewUidValue )); } CleanupStack::Pop( icons ); diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/views/src/calenmissedalarmscontainer.cpp --- a/calendarui/views/src/calenmissedalarmscontainer.cpp Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/views/src/calenmissedalarmscontainer.cpp Tue Apr 27 16:36:22 2010 +0300 @@ -144,7 +144,7 @@ iListBox->Model()->SetItemTextArray(iListBoxItemArray); // set icon array - CAknIconArray* iconArray = CreateIconsL( iIconIndices ); + CAknIconArray* iconArray = CreateIconsL( iIconIndices, KCalenMissedAlarmsViewUidValue ); CleanupStack::PushL(iconArray); iListBox->ItemDrawer()->FormattedCellData()->SetIconArray(iconArray); CleanupStack::Pop(); @@ -401,7 +401,17 @@ if ( aType == KAknsMessageSkinChange || aType == KEikDynamicLayoutVariantSwitch ) { - SizeChanged(); +// SizeChanged(); + TRect main_pane; + AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, main_pane ); + SetRect( main_pane ); + if(iListBox) + { + TRect mainPane; + AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, mainPane ); + TRect bgContextRect( TPoint(0, 0), mainPane.Size() ); + iListBox->SetRect( bgContextRect ); + } // refresh TRAPD(error,iView->BeginRepopulationL()); diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/views/src/calenmissedalarmsview.cpp --- a/calendarui/views/src/calenmissedalarmsview.cpp Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/views/src/calenmissedalarmsview.cpp Tue Apr 27 16:36:22 2010 +0300 @@ -120,16 +120,20 @@ break; case EPopulationDone: { - // update missed alarm list - Container()->UpdateMissedAlarmsArrayL(); + if(Container()) + { + // update missed alarm list + Container()->UpdateMissedAlarmsArrayL(); - // populate with missed alarms - Container()->PopulateWithMissedAlarmsL(); + // populate with missed alarms + Container()->PopulateWithMissedAlarmsL(); - // complete population - Container()->CompletePopulationL(); - RedrawStatusPaneL(); - UpdateCbaL(); + // complete population + Container()->CompletePopulationL(); + + RedrawStatusPaneL(); + UpdateCbaL(); + } diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/views/src/calenmissedeventcontainer.cpp --- a/calendarui/views/src/calenmissedeventcontainer.cpp Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/views/src/calenmissedeventcontainer.cpp Tue Apr 27 16:36:22 2010 +0300 @@ -532,14 +532,18 @@ ( aType == KUidValueCoeZoomChangeEvent ) || ( aType == KUidValueCoeFontChangeEvent )) { - CEikAppUi* appUi = static_cast( ControlEnv()->AppUi() ); - SetRect( appUi->ClientRect() ); +// CEikAppUi* appUi = static_cast( ControlEnv()->AppUi() ); +// SetRect( appUi->ClientRect() ); + TRect mainPane; + AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, mainPane ); + SetRect( mainPane ); } if(aType == KAknsMessageSkinChange || aType == KEikDynamicLayoutVariantSwitch) { SizeChanged(); + SetupFontL(); // refresh TRAPD(err,iView->BeginRepopulationL()); if(err!=KErrNone) diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/views/src/calenmissedeventview.cpp --- a/calendarui/views/src/calenmissedeventview.cpp Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/views/src/calenmissedeventview.cpp Tue Apr 27 16:36:22 2010 +0300 @@ -455,6 +455,10 @@ { cba->SetCommandL( KSK2CBAPosition, R_CALEN_CLOSE_CBA_BUTTON ); } + else + { + cba->SetCommandL( KSK2CBAPosition, R_CALEN_BACK_CBA_BUTTON); + } cba->DrawNow(); diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/views/src/calenmonthcontainer.cpp --- a/calendarui/views/src/calenmonthcontainer.cpp Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/views/src/calenmonthcontainer.cpp Tue Apr 27 16:36:22 2010 +0300 @@ -1051,6 +1051,7 @@ TRACE_ENTRY_POINT; iChangeMonth = EFalse; + iChangeDay = EFalse; iDayFormat = KMonthCellFormat; iMonthDataArray = new(ELeave) CMonthDataArray(KCalenDaysInWeek * KNumberOfRows); @@ -1673,6 +1674,10 @@ } TInt pointerIndex(-1); TBool isItem (iGrid->View()->XYPosToItemIndex(aPointerEvent.iPosition, pointerIndex)); + if( isItem ) + { + pointerIndex = static_cast(iGrid->View())->ActualDataIndex( pointerIndex ); + } CAknGridM* gridModel = static_cast(iGrid->Model()); if(gridModel->NumberOfData() <= 0) @@ -1705,7 +1710,7 @@ TPointerEvent pointerEvent( aPointerEvent ); pointerEvent.iModifiers = ( aPointerEvent.iModifiers & ( ~EAllModifiers ) ); - TInt index( iGrid->CurrentItemIndex() ); + TInt index( iGrid->CurrentDataIndex() ); TTime isValidDay; if( TPointerEvent::EButton1Up == aPointerEvent.iType ) { @@ -1735,15 +1740,15 @@ iDate + TTimeIntervalDays( pointerIndex - index ) ); TDateTime newActiveDayTime = newActiveDay.DateTime(); - // set the context - TCalTime time; - time.SetTimeLocalL( newActiveDay ); - iServices.Context().SetFocusDateL( time, - TVwsViewId( KUidCalendar, KUidCalenMonthView ) ); TMonth activeMonth( iDate.DateTime().Month() ); TMonth newMonth( newActiveDay.DateTime().Month() ); if ( aPointerEvent.iType == TPointerEvent::EButton1Down ) { + // set the context + TCalTime time; + time.SetTimeLocalL( newActiveDay ); + iServices.Context().SetFocusDateL( time, + TVwsViewId( KUidCalendar, KUidCalenMonthView ) ); iGrid->HandlePointerEventL( pointerEvent ); if (iPreview) { @@ -1757,6 +1762,7 @@ iChangeMonth = ETrue; iGrid->View()->SetDisableRedraw(ETrue); iView->BeginRepopulationL(); + iDate = newActiveDay; } HandleDayChangeL( newActiveDay ); } @@ -1764,19 +1770,22 @@ else if ( activeMonth == newMonth && newActiveDay != iDate && !iChangeMonth ) { - iGrid->HandlePointerEventL( pointerEvent ); + iChangeDay = ETrue; // use grid index to make sure that correct grid // element is focused when dragged TInt gridIndex = GridIndex(); newActiveDay = ( iFirstDayOfGrid + TTimeIntervalDays( gridIndex ) ); - HandleDayChangeL( newActiveDay ); - iChangeMonth = EFalse; } } else if ( aPointerEvent.iType == TPointerEvent::EButton1Up ) { - iGrid->HandlePointerEventL( pointerEvent ); + if( !iChangeDay && !iChangeMonth ) + { + iGrid->HandlePointerEventL( pointerEvent ); + } + iChangeDay = EFalse; + iChangeMonth = EFalse; } } } diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/views/src/calentodocontainer.cpp --- a/calendarui/views/src/calentodocontainer.cpp Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/views/src/calentodocontainer.cpp Tue Apr 27 16:36:22 2010 +0300 @@ -151,11 +151,9 @@ aViewIsDimmed); + - - TAknWindowComponentLayout tempLayout = - AknLayoutScalable_Apps::list_cale_time_pane_g6( aItemIndex - static_cast(iListBox)->TopItemIndex()) ; - + TAknWindowComponentLayout tempLayout = AknLayoutScalable_Apps::list_cale_time_pane_g6(0); TAknLayoutRect colourstrips; colourstrips.LayoutRect( actualItemRect, tempLayout.LayoutLine() ); @@ -387,7 +385,7 @@ model->SetItemTextArray(iDesArray); model->SetOwnershipType(ELbmDoesNotOwnItemArray); - CAknIconArray* iconList = CreateIconsL( iIconIndices ); + CAknIconArray* iconList = CreateIconsL( iIconIndices, KCalenTodoViewUidValue ); // Transfer iconlist ownership to the listbox iListBox->ItemDrawer()->ColumnData()->SetIconArray( iconList ); @@ -894,7 +892,10 @@ if ( aType == KAknsMessageSkinChange || aType == KEikDynamicLayoutVariantSwitch ) { SizeChanged(); + CAknIconArray* iconList = CreateIconsL( iIconIndices, KCalenTodoViewUidValue ); + // Transfer iconlist ownership to the listbox + iListBox->ItemDrawer()->ColumnData()->SetIconArray( iconList ); // refresh TRAPD(error,iView->BeginRepopulationL()); if(error!=KErrNone) diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/views/src/calentodoview.cpp --- a/calendarui/views/src/calentodoview.cpp Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/views/src/calentodoview.cpp Tue Apr 27 16:36:22 2010 +0300 @@ -424,6 +424,8 @@ iServices.IssueCommandL( aCommand ); } break; + case ECalenShowCalendars: + ClearMarkedToDoItems(); default: SaveCurrentItemIndexL(); CCalenNativeView::HandleCommandL( aCommand ); @@ -681,7 +683,7 @@ // setup edit/mark menu case R_CALENDAR_DONE_UNDONE: { - if( Container()->MarkedCount() == 1) + if( Container()->MarkedCount() ) { TBool crossout( EFalse ); crossout = CheckMarkedItemCompletedL(); diff -r 21239b3bcd78 -r 9711e452b5e9 calendarui/views/src/calenweekcontainer.cpp --- a/calendarui/views/src/calenweekcontainer.cpp Wed Apr 14 15:55:57 2010 +0300 +++ b/calendarui/views/src/calenweekcontainer.cpp Tue Apr 27 16:36:22 2010 +0300 @@ -2226,26 +2226,21 @@ // for themable support - clear Pressed Down State when dragging oldRow = iListBox->View()->CurrentItemIndex(); oldColumn = iColumn; - iListBox->HandlePointerEventL(aPointerEvent); - newRow = iListBox->View()->CurrentItemIndex(); - newColumn = iColumn; + newColumn = iListBox->PointerEventColumn(aPointerEvent.iPosition); + newRow = pointerIndex; if (newRow != oldRow || newColumn != oldColumn) { - CalcDayFromColumn(); - SetActiveContextFromHighlightL(); - if (newColumn != oldColumn) - { - WeekView().SetStatusPaneFromActiveContextL(); - } + iHourChange = ETrue; } break; } case TPointerEvent::EButton1Up: if(isItem && - iView->MenuBar()->IsDisplayed() == EFalse) + iView->MenuBar()->IsDisplayed() == EFalse && !iHourChange) { iServices.IssueCommandL( ECalenForwardsToDayView ); } + iHourChange = EFalse; break; default: break; diff -r 21239b3bcd78 -r 9711e452b5e9 clock2/clockengines/clockserver/server/src/clockserverimpl.cpp --- a/clock2/clockengines/clockserver/server/src/clockserverimpl.cpp Wed Apr 14 15:55:57 2010 +0300 +++ b/clock2/clockengines/clockserver/server/src/clockserverimpl.cpp Tue Apr 27 16:36:22 2010 +0300 @@ -806,7 +806,7 @@ // NITZ data again attributes would get filled with actual value. // Has been kept outside because this statement is valid for // first boot also. - if( iTimeAttributes ) + if( iTimeAttributes && staleBoot ) { iTimeAttributes->iDstOffset = TTimeIntervalMinutes( 0 ); iTimeAttributes->iTimeZoneOffset = TTimeIntervalMinutes( 0 ); diff -r 21239b3bcd78 -r 9711e452b5e9 clock2/clockui/adtupdater/src/adtupdatercontainer.cpp --- a/clock2/clockui/adtupdater/src/adtupdatercontainer.cpp Wed Apr 14 15:55:57 2010 +0300 +++ b/clock2/clockui/adtupdater/src/adtupdatercontainer.cpp Tue Apr 27 16:36:22 2010 +0300 @@ -648,8 +648,11 @@ if( currentMcc ) { CTzLocalizedCity* localizedCity( GetLocalizedCityL( currentMcc ) ); + if( localizedCity ) // added + { TInt cityGroupId = localizedCity->GroupId(); citySelected = ShowCityListL( cityGroupId ); + } delete localizedCity; } diff -r 21239b3bcd78 -r 9711e452b5e9 clock2/clockui/uilayer/clockworldview/src/clockworldcontainer.cpp --- a/clock2/clockui/uilayer/clockworldview/src/clockworldcontainer.cpp Wed Apr 14 15:55:57 2010 +0300 +++ b/clock2/clockui/uilayer/clockworldview/src/clockworldcontainer.cpp Tue Apr 27 16:36:22 2010 +0300 @@ -250,7 +250,7 @@ { __PRINTS( "CClockWorldContainer::HandleListBoxEventL - Entry" ); - if( aListBox == iListBox && +/* if( aListBox == iListBox && //Single click integration aEventType == EEventItemSingleClicked ) @@ -266,7 +266,7 @@ { iView->HandleCommandL( EClockWorldMyRegion ); } - } + }*/ __PRINTS( "CClockWorldContainer::HandleListBoxEventL - Entry" ); diff -r 21239b3bcd78 -r 9711e452b5e9 clock2/clockui/uilayer/data/clock.rss --- a/clock2/clockui/uilayer/data/clock.rss Wed Apr 14 15:55:57 2010 +0300 +++ b/clock2/clockui/uilayer/data/clock.rss Tue Apr 27 16:36:22 2010 +0300 @@ -476,7 +476,8 @@ { command = EClockWorldMyRegion; txt = qtn_clk_opt_region_my_region; - flags = EEikMenuItemAction; +// flags = EEikMenuItemAction; + flags = EEikMenuItemSpecific; }, MENU_ITEM { diff -r 21239b3bcd78 -r 9711e452b5e9 clock2/clockui/utilities/data/tzdb.dbz Binary file clock2/clockui/utilities/data/tzdb.dbz has changed diff -r 21239b3bcd78 -r 9711e452b5e9 notepad/notepad1/LibData/NpdLib.rss --- a/notepad/notepad1/LibData/NpdLib.rss Wed Apr 14 15:55:57 2010 +0300 +++ b/notepad/notepad1/LibData/NpdLib.rss Tue Apr 27 16:36:22 2010 +0300 @@ -35,6 +35,7 @@ #include #include #include +#include // CONSTANTS #define NOTEPAD_DATABASE "c:Notepad.dat" @@ -84,6 +85,18 @@ } // ----------------------------------------------------------------------------- +// +// r_notepad_the_first_listbox_item +// the first notepad item, New note. +// +// ----------------------------------------------------------------------------- +// +RESOURCE TBUF r_notepad_the_first_listbox_item + { + buf = qtn_nmake_om_add_new; + } + +// ----------------------------------------------------------------------------- // // r_notepad_model // Model of Notepad application. @@ -96,6 +109,7 @@ listing_style = ENotepadListingStyleNP; date_format = R_QTN_DATE_SHORT_WITH_ZERO; time_format = R_QTN_TIME_USUAL_WITH_ZERO; + first_note = r_notepad_the_first_listbox_item; } // ----------------------------------------------------------------------------- @@ -347,6 +361,40 @@ // ----------------------------------------------------------------------------- // +// r_menupane_markable_list_edit_list_implementation +// mark parent menu +// +// ----------------------------------------------------------------------------- +// +RESOURCE MENU_PANE r_menupane_markable_list_edit_list_implementation + { + items = + { + MENU_ITEM { cascade=r_menupane_markable_list_implementation; command=EAknCmdEditListMenu; txt=qtn_options_list; } + }; + + } + +// ----------------------------------------------------------------------------- +// +// r_menupane_markable_list_implementation +// mark child menu +// +// ----------------------------------------------------------------------------- +// +RESOURCE MENU_PANE r_menupane_markable_list_implementation + { + items = + { + MENU_ITEM{ command=EAknCmdMark; txt=qtn_options_list_mark_one; flags=EEikMenuItemSpecific; }, + MENU_ITEM{ command=EAknCmdUnmark; txt=qtn_options_list_unmark_one; flags=EEikMenuItemSpecific; }, + MENU_ITEM{ command=EAknMarkAll; txt=qtn_options_list_mark_all;}, + MENU_ITEM{ command=EAknUnmarkAll; txt=qtn_options_list_unmark_all;} + }; + } + +// ----------------------------------------------------------------------------- +// // r_notepad_list_menubar // Menu bar of Notepad list mode. // @@ -363,7 +411,7 @@ }, MENU_TITLE { - menu_pane=R_AVKON_MENUPANE_MARKABLE_LIST_EDIT_LIST_IMPLEMENTATION; + menu_pane = r_menupane_markable_list_edit_list_implementation; txt = ""; }, MENU_TITLE diff -r 21239b3bcd78 -r 9711e452b5e9 notepad/notepad1/LibSrc/NpdCoreModel.cpp --- a/notepad/notepad1/LibSrc/NpdCoreModel.cpp Wed Apr 14 15:55:57 2010 +0300 +++ b/notepad/notepad1/LibSrc/NpdCoreModel.cpp Tue Apr 27 16:36:22 2010 +0300 @@ -750,7 +750,15 @@ TInt insertIndex=0; TInt offset = KErrNotFound; TInt cmpOffsetListItem = KErrNotFound; - for(insertIndex= 0;insertIndexHandleEditorExitL( statOfSave, returnKey, - statOfSave == CNotepadModel::ENotepadModelRowNop || + statOfSave != CNotepadModel::ENotepadModelRowNop || iFlags & ENotepadCatchSaveOnExitCallback ); } return statOfSave; @@ -388,7 +388,7 @@ } else { - if ( IsSequenceAtLast() ) + if ( IsSequenceAtLast() || iSequence->Count() == 1 ) { aMenuPane->DeleteMenuItem(ENotepadCmdNextMemo); } @@ -531,10 +531,6 @@ { case EAknSoftkeyExit: case EAknCmdExit: - if ( iListDialog ) - { - iListDialog->MakeVisible( EFalse ); - } TryExitL(EAknSoftkeyExit); iAvkonAppUi->ProcessCommandL(EAknCmdExit); break; @@ -877,7 +873,15 @@ if ( wasModeAdding && rowResult == CNotepadModel::ENotepadModelRowAdded ) { - iSequence->InsertL(0, iKey); // *never leave* because reserved + if ( IsNotepad() ) + { + iSequence->InsertL(1, iKey); // *never leave* because reserved + } + else + { + iSequence->InsertL(0, iKey); // *never leave* because reserved + } + } else if ( savedCurrentSequence != KNotepadInvalidSequenceIndex && ( rowResult == CNotepadModel::ENotepadModelRowAdded || @@ -924,7 +928,7 @@ // void CNotepadEditorDialog::OnCmdNextMemoL() { - TInt nextIndex(0); + TInt nextIndex(1); const TBool wasModeAdding( IsModeAdding() ); if ( !wasModeAdding ) { @@ -1089,11 +1093,11 @@ // TInt index( 0 ); TKeyArrayFix cmpKeyArray(0, ECmpTInt); - for (i = keyArray.Count() - 1; i >= 0; --i) + for (i = keyArray.Count() - 1; i >= 1; --i) { if (iSequence->Find(keyArray[i], cmpKeyArray, index) != 0) { - iSequence->InsertL(0, keyArray[i]); + iSequence->InsertL(1, keyArray[i]); } } if (iKey != KNotepadPseudoKeyIdForNewNote @@ -1112,7 +1116,7 @@ { __ASSERT_DEBUG( iSequence, Panic(ENotepadLibraryPanicNullSequenceInEditor) ); - return ( IsModeAdding() ? iSequence->Count() == 0 : + return ( IsModeAdding() ? iSequence->Count() == 1 : CurrentSequence() == iSequence->Count() - 1 ); } @@ -1124,7 +1128,7 @@ { __ASSERT_DEBUG( iSequence, Panic(ENotepadLibraryPanicNullSequenceInEditor) ); - return ( IsModeAdding() || CurrentSequence() == 0); + return ( IsModeAdding() || CurrentSequence() == 1); } // ----------------------------------------------------------------------------- @@ -1152,10 +1156,14 @@ TInt nextKey(iKey); if ( iKey == KNotepadPseudoKeyIdForNewNote ) // IsModeAdding { - if ( iSequence->Count() > 0 ) + if ( iSequence->Count() > 1 ) { + nextKey = (*iSequence)[1]; + } + else if ( iSequence->Count() == 1 ) + { nextKey = (*iSequence)[0]; - } + } } else { diff -r 21239b3bcd78 -r 9711e452b5e9 notepad/notepad1/LibSrc/NpdListDialog.cpp --- a/notepad/notepad1/LibSrc/NpdListDialog.cpp Wed Apr 14 15:55:57 2010 +0300 +++ b/notepad/notepad1/LibSrc/NpdListDialog.cpp Tue Apr 27 16:36:22 2010 +0300 @@ -176,22 +176,19 @@ { iFlags &= ~ENotepadItemAdded; } - if ( aEagerSync ) + if ( aEagerSync && iClockValueChange ) { - if(iClockValueChange) - { - iModel->SetItemArrayFlags(); - iClockValueChange = EFalse; - } - iModel->SyncL(EFalse); - RestoreCurrentAndSelectionsL(); - DrawNow(); + iModel->SetItemArrayFlags(); + iClockValueChange = EFalse; } if (aStatOfSave == CNotepadModel::ENotepadModelRowDeleted) { iListBox->HandleItemRemovalL(); DrawNow(); } + iModel->SyncL(EFalse); + RestoreCurrentAndSelectionsL(); + DrawNow(); // MSK MiddleSoftKeyL(); } @@ -875,10 +872,10 @@ } iModel->SyncL(EFalse); CNotepadDialogBase::DynInitMenuPaneL( aResourceId, aMenuPane ); - const TInt memoCount( iModel->MdcaCount() ); - const TInt markCount( iListBox->SelectionIndexes()->Count() ); - TInt index; - switch ( aResourceId ) + const TInt memoCount( iModel->MdcaCount() - 1 ); + const TInt markCount(iListBox->SelectionIndexes()->Count()); + TInt index; + switch (aResourceId ) { case R_SENDUI_MENU: index = 2; @@ -965,13 +962,27 @@ // this must after InsertSendMenuItemAfterL aMenuPane->DeleteMenuItem(ENotepadCmdOpen); } - } + if ( iListBox->CurrentItemIndex() == 0 && IsNotepad() && memoCount > 0) + { + aMenuPane->SetItemDimmed( ENotepadCmdDelete, ETrue ); + aMenuPane->SetItemDimmed( ENotepadCmdSend, ETrue ); + } + } break; default: - AknSelectionService::HandleMarkableListDynInitMenuPane( - aResourceId, aMenuPane, iListBox); - break; - } + { + if ( IsTemplates() ) + { + AknSelectionService::HandleMarkableListDynInitMenuPane( + aResourceId, aMenuPane, iListBox ); + } + else + { + HandleMarkListDynInitMenuPane( aResourceId, aMenuPane, iListBox ); + } + break; + } + } } // ----------------------------------------------------------------------------- @@ -1025,6 +1036,28 @@ case ENotepadCmdSend: OnCmdSendL(aCommandId); break; + case EAknMarkAll: + { + if ( IsNotepad() ) + { + iListBox->ClearSelection(); + TInt num = iListBox->Model()->NumberOfItems(); + if ( num < 2 ) + return; + TInt ii = 0; + CArrayFixFlat* array = new (ELeave) CArrayFixFlat ( + 20 ); + CleanupStack::PushL(array); + array->SetReserveL(num); + for ( ii = 1; ii < num; ii++ ) + { + array->AppendL( ii ); + } + iListBox->SetSelectionIndexesL( array ); + CleanupStack::PopAndDestroy(); //array + break; + } + } default: { const TInt aiwServiceCmd( iServiceHandler ? iServiceHandler->ServiceCmdByMenuCmd( aCommandId ) : 0 ); @@ -1299,15 +1332,22 @@ OnCmdOpenL(aListBox->CurrentItemIndex()); break; case EEventItemSingleClicked: - if ( aListBox->Model()->NumberOfItems() != 0 - && aListBox->SelectionIndexes()->Count() == 0 ) - { - HandleListBoxPointerEventL( CNotepadListDialog::EOpenListBoxItem ); - } - else - { - HandleListBoxPointerEventL( CNotepadListDialog::EOpenListBoxContextMenu ); - } + if ( IsNotepad() ) + { + if ( aListBox->Model()->NumberOfItems() != 0 + && aListBox->SelectionIndexes()->Count() == 0 ) + { + + HandleListBoxPointerEventL( + CNotepadListDialog::EOpenListBoxItem); + } + else + { + HandleListBoxPointerEventL( + CNotepadListDialog::EOpenListBoxContextMenu ); + } + } + if( IsTemplates() && AknLayoutUtils::PenEnabled() ) { if( !aListBox->SelectionIndexes()->Count() ) @@ -1572,7 +1612,11 @@ { if(aEvent == EOpenListBoxContextMenu && !MenuShowing()) { - if(iEditorFlag==EFalse) + if (iListBox->CurrentItemIndex() == 0) + { + OnCmdAddL(); + } + else if (iEditorFlag == EFalse) { iFlags |= ENotepadMenuByOkKey; iMskFlag=ETrue; @@ -1581,7 +1625,11 @@ } else if(aEvent == EOpenListBoxItem) { - if ( !iEditorDialog&& !IsTemplates() ) + if ( iListBox->CurrentItemIndex() == 0 ) + { + OnCmdAddL(); + } + else if (!iEditorDialog && !IsTemplates()) { OnCmdOpenL( iListBox->CurrentItemIndex() ); } @@ -1599,7 +1647,7 @@ if( !IsTemplates() ) // Notepad ListView { - if( (iModel->MdcaCount() == 0)) + if( (iModel->MdcaCount() == 1)) { ButtonGroupContainer().SetCommandSetL( R_NOTEPAD_SOFTKEYS_OPTIONS_EXIT_NEW ); } @@ -1672,6 +1720,35 @@ return KErrNone; } +// ----------------------------------------------------------------------------- +// CNotepadListDialog::HandleMarkListDynInitMenuPane +// ----------------------------------------------------------------------------- +// +void CNotepadListDialog::HandleMarkListDynInitMenuPane( TInt aResourceId, CEikMenuPane *aMenu, CEikListBox *aListBox ) + { + if ( aResourceId == R_MENUPANE_MARKABLE_LIST_IMPLEMENTATION ) + { + TInt currentItemIndex = aListBox->View()->CurrentItemIndex(); + TBool markHidden = aListBox->View()->ItemIsSelected( currentItemIndex ) || currentItemIndex == 0; + TBool unmarkHidden = + !aListBox->View()->ItemIsSelected(currentItemIndex) || currentItemIndex == 0; + TBool markAllHidden = aListBox->Model()->NumberOfItems() == 0 + || aListBox->SelectionIndexes()->Count() + == aListBox->Model()->NumberOfItems() - 1; + TBool unmarkAllHidden = aListBox->Model()->NumberOfItems() == 0 + || aListBox->SelectionIndexes()->Count() == 0; + aMenu->SetItemDimmed(EAknCmdMark, markHidden); + aMenu->SetItemDimmed(EAknCmdUnmark, unmarkHidden); + aMenu->SetItemDimmed(EAknMarkAll, markAllHidden); + aMenu->SetItemDimmed(EAknUnmarkAll, unmarkAllHidden); + } + if ( aResourceId == R_MENUPANE_MARKABLE_LIST_EDIT_LIST_IMPLEMENTATION ) + { + TBool editListHidden = aListBox->Model()->NumberOfItems() == 0; + + aMenu->SetItemDimmed(EAknCmdEditListMenu, editListHidden); + } + } // End of File diff -r 21239b3bcd78 -r 9711e452b5e9 notepad/notepad1/LibSrc/NpdModel.cpp --- a/notepad/notepad1/LibSrc/NpdModel.cpp Wed Apr 14 15:55:57 2010 +0300 +++ b/notepad/notepad1/LibSrc/NpdModel.cpp Tue Apr 27 16:36:22 2010 +0300 @@ -79,6 +79,10 @@ delete iItemArray; delete iTimeFormat; delete iDateFormat; + if ( iFixedFirstNote ) + { + delete iFixedFirstNote; + } } // ----------------------------------------------------------------------------- @@ -348,6 +352,7 @@ = rr.ReadInt16(); // WORD listing_style; TInt dateResId(rr.ReadInt32()); // LLINK date_format TInt timeResId(rr.ReadInt32()); // LLINK time_format + TInt firstNoteResId(rr.ReadInt32()); // LLINK first_note; CleanupStack::PopAndDestroy(); // rr if (dateResId) { @@ -357,6 +362,10 @@ { iTimeFormat = iEnv->AllocReadResourceL(timeResId); } + if ( firstNoteResId ) + { + iFixedFirstNote = iEnv->AllocReadResourceL( firstNoteResId ); + } iItemArray = new(ELeave) CDesCArrayFlat(KNotepadItemArrayGranularity); iDatabaseChangeNotifier = CNotepadModel::CDatabaseChangeNotifier::NewL(iDatabase, *this); @@ -614,6 +623,20 @@ } iItemArray->Reset(); iKeyArray.Reset(); + //insert the New note as the firt note + if ( iFixedFirstNote != NULL ) + { + TBuf<256> buf; + _LIT( KBlankSpace, " " ); + buf.Append( KBlankSpace ); + buf.Append( KColumnListSeparator ); + buf.Append( *iFixedFirstNote ); + iItemArray->AppendL( buf ); + //default key for New note, -2 is never used for normal keys. + iKeyArray.Append( -2 ); + } + + TRAPD( err, DoBuildItemArrayL() ); if ( err != KErrNone) { @@ -712,13 +735,14 @@ TPtrC thisText = aBuf.Mid(textOffset).Left(KNotepadMaxCharactersForSort); - if ( iItemArray->Count() == 0 || + if ( (iItemArray->Count() == 0 && iFixedFirstNote == NULL) || (iItemArray->Count() == 1 && iFixedFirstNote != NULL) || dateTime.Day() != prevDateTime.Day() || dateTime.Month() != prevDateTime.Month() || dateTime.Year() != prevDateTime.Year() ) { // first entry or date of the item has changed firstIndexOfTheDay = iItemArray->Count(); + textArrayOfTheDay.Reset(); if ( isToday ) { diff -r 21239b3bcd78 -r 9711e452b5e9 notepad/notepad1/inc/NpdLib.rh --- a/notepad/notepad1/inc/NpdLib.rh Wed Apr 14 15:55:57 2010 +0300 +++ b/notepad/notepad1/inc/NpdLib.rh Tue Apr 27 16:36:22 2010 +0300 @@ -61,6 +61,7 @@ //WORD list_width_in_chars = NOTEPAD_LIST_WIDTH_IN_CHARS; LLINK date_format = 0; LLINK time_format = 0; + LLINK first_note = 0; } // ----------------------------------------------------------------------------- diff -r 21239b3bcd78 -r 9711e452b5e9 notepad/notepad1/inc/NpdListDialog.h --- a/notepad/notepad1/inc/NpdListDialog.h Wed Apr 14 15:55:57 2010 +0300 +++ b/notepad/notepad1/inc/NpdListDialog.h Tue Apr 27 16:36:22 2010 +0300 @@ -284,6 +284,14 @@ * @param aEvent view event type. */ void DoHandleViewEventL(const TVwsViewEvent& aEvent); + + /** + * handle the mark/unmark/markall/unmarkall command + * @param aResourceId the resouce id + * @param aMenu the pane to be processed. + * @param aListBox the refered list box for the pane. + */ + void HandleMarkListDynInitMenuPane( TInt aResourceId, CEikMenuPane *aMenu, CEikListBox *aListBox ); private: // Functions from base classes @@ -396,7 +404,7 @@ * * @param aType event type. */ - void HandleResourceChange(TInt aType); + void HandleResourceChange(TInt aType); private: // Reserved diff -r 21239b3bcd78 -r 9711e452b5e9 notepad/notepad1/inc/NpdModel_platsec.h --- a/notepad/notepad1/inc/NpdModel_platsec.h Wed Apr 14 15:55:57 2010 +0300 +++ b/notepad/notepad1/inc/NpdModel_platsec.h Tue Apr 27 16:36:22 2010 +0300 @@ -348,6 +348,8 @@ TInt iListingStyle; HBufC* iDateFormat; HBufC* iTimeFormat; + //used for Notepad's first note. Template does not use. + HBufC* iFixedFirstNote; TInt iStepCount; RFs iFileSession; TInt iRetval; diff -r 21239b3bcd78 -r 9711e452b5e9 organizer_plat/calendar_custamization_api/inc/calenservices.h --- a/organizer_plat/calendar_custamization_api/inc/calenservices.h Wed Apr 14 15:55:57 2010 +0300 +++ b/organizer_plat/calendar_custamization_api/inc/calenservices.h Tue Apr 27 16:36:22 2010 +0300 @@ -154,7 +154,7 @@ * @param aIndex One of the TCalenIcons * @return CGulIcon* The icon corresponding to aIndex */ - virtual CGulIcon* GetIconL( TCalenIcons aIndex ) = 0; + virtual CGulIcon* GetIconL( TCalenIcons aIndex, const TInt aViewId = 0 ) = 0; /** * @brief Register for notifications of Calendar events