--- a/calendarui/controller/inc/calenmultidbeditor.h Mon Jun 21 15:38:59 2010 +0300
+++ b/calendarui/controller/inc/calenmultidbeditor.h Thu Jul 15 18:37:27 2010 +0300
@@ -263,6 +263,15 @@
* @return ETrue : Below critical level
*/
TBool CheckSpaceBelowCriticalLevelL();
+
+ /*
+ * @breif Show appropriate error note
+ * @param aError system wide error id.
+ * @return void
+ */
+ void ShowErrorNoteL(TInt aError);
+
+
protected:
/**
--- a/calendarui/controller/inc/calenmultipledbui.h Mon Jun 21 15:38:59 2010 +0300
+++ b/calendarui/controller/inc/calenmultipledbui.h Thu Jul 15 18:37:27 2010 +0300
@@ -319,7 +319,7 @@
* Called from editor before exiting the dialog.
* @param aItemAdded ETure if add else edit.
*/
- void UpdateOnAddOrEditL(TBool aItemAdded);
+ TInt UpdateOnAddOrEditL(TBool aItemAdded);
/*
* Exit the dialog;
--- a/calendarui/controller/src/calenalarmmanager.cpp Mon Jun 21 15:38:59 2010 +0300
+++ b/calendarui/controller/src/calenalarmmanager.cpp Thu Jul 15 18:37:27 2010 +0300
@@ -393,14 +393,21 @@
entryLocalUid = missedAlarm->iLuid;
instanceTime = missedAlarm->iInstanceTime;
-
- CCalSession &session = iController.Services().SessionL( missedAlarm->iCalFileName );
-
- // pack instance ids of the missed alarm instances
- TRAP_IGNORE(instanceId = TCalenInstanceId::CreateL( entryLocalUid, instanceTime, 0 ));
- instanceId.iColId = session.CollectionIdL();
-
- iMissedAlarmList.Append(instanceId);
+ CCalSession *session = NULL;
+ TRAPD(err,session = &iController.Services().SessionL( missedAlarm->iCalFileName ));
+ //missed alarm belongs to existing calendar
+ if(err != KErrNotFound)
+ {
+ // pack instance ids of the missed alarm instances
+ TRAP_IGNORE(instanceId = TCalenInstanceId::CreateL( entryLocalUid, instanceTime, 0 ));
+ instanceId.iColId = session->CollectionIdL();
+ iMissedAlarmList.Append(instanceId);
+ }
+ else
+ {
+ //missed alarm does not belong to any calendar so delete it, since user has deleted the calendar
+ iMissedAlarmStore->RemoveL(*missedAlarm);
+ }
}
CleanupStack::PopAndDestroy(); // missedAlarmStorelist
@@ -685,6 +692,8 @@
RPointerArray<CMissedAlarm> aMissedAlarmArray;
CleanupResetAndDestroyPushL( aMissedAlarmArray );
iMissedAlarmStore->GetL(aMissedAlarmArray);
+ if (aMissedAlarmArray.Count())
+ {
CCalSession &session = iController.Services().SessionL(aMissedAlarmArray[0]->iCalFileName);
CCalEntry* entry = iController.Services().EntryViewL(session.CollectionIdL())->FetchL(
aMissedAlarmArray[0]->iLuid);
@@ -704,6 +713,7 @@
CleanupStack::PopAndDestroy( entry );
iMissedAlarmList.Remove(0); //Clear the alarm list
iMissedAlarmStore->RemoveL(*aMissedAlarmArray[0]);
+ }
CleanupStack::PopAndDestroy(); // aMissedAlarmArray
iViewManager.StartActiveStepL();
--- a/calendarui/controller/src/calenlocationui.cpp Mon Jun 21 15:38:59 2010 +0300
+++ b/calendarui/controller/src/calenlocationui.cpp Thu Jul 15 18:37:27 2010 +0300
@@ -508,8 +508,10 @@
// Forcefully broadcast app foreground notification, so that
// ECalenMapState would be current state
- iController.BroadcastNotification(ECalenNotifyAppForegrounded);
-
+ if(!iController.IsFasterAppFlagEnabled())
+ {
+ iController.BroadcastNotification(ECalenNotifyAppForegrounded);
+ }
// selection is done, analyze error code first...
if ( !aError )
{
--- a/calendarui/controller/src/calenmultidbeditor.cpp Mon Jun 21 15:38:59 2010 +0300
+++ b/calendarui/controller/src/calenmultidbeditor.cpp Thu Jul 15 18:37:27 2010 +0300
@@ -189,22 +189,22 @@
iRgbColors = new(ELeave) CArrayFixFlat<TRgb>(2);
- iRgbColors->AppendL(KRgbRed);
- iRgbColors->AppendL(KRgbDarkGray);
- iRgbColors->AppendL(KRgbDarkRed);
- iRgbColors->AppendL(KRgbDarkGreen);
- iRgbColors->AppendL(KRgbDarkYellow);
- iRgbColors->AppendL(KRgbDarkBlue);
- iRgbColors->AppendL(KRgbDarkMagenta);
- iRgbColors->AppendL(KRgbDarkCyan);
- iRgbColors->AppendL(KRgbBlack);
- iRgbColors->AppendL(KRgbGreen);
- iRgbColors->AppendL(KRgbYellow);
- iRgbColors->AppendL(KRgbBlue);
- iRgbColors->AppendL(KRgbMagenta);
- iRgbColors->AppendL(KRgbCyan);
- iRgbColors->AppendL(KRgbGray);
- iRgbColors->AppendL(KRgbWhite);
+ iRgbColors->AppendL(KCalenDarkBlue);
+ iRgbColors->AppendL(KCalenDarkGreen);
+ iRgbColors->AppendL(KCalenDarkRed);
+ iRgbColors->AppendL(KCalenMegenta);
+ iRgbColors->AppendL(KCalenBlue);
+ iRgbColors->AppendL(KCalenGreen);
+ iRgbColors->AppendL(KCalenOrange);
+ iRgbColors->AppendL(KCalenlightMagenta);
+ iRgbColors->AppendL(KCalenCyan);
+ iRgbColors->AppendL(KCalenlightGreen);
+ iRgbColors->AppendL(KCalenYellow);
+ iRgbColors->AppendL(KCalenlightPink);
+ iRgbColors->AppendL(KCalenlightBlue);
+ iRgbColors->AppendL(KCalenGold);
+ iRgbColors->AppendL(KCalenDarkOrange);
+ iRgbColors->AppendL(KCalenPink);
TRACE_EXIT_POINT
}
@@ -388,23 +388,31 @@
case EAknSoftkeyDone:
{
isExitForm = SaveNoteL(aButtonId);
- if(isExitForm)
+ if (isExitForm)
{
- iMultipleDbUi.UpdateOnAddOrEditL(!iEditFlag);
+ TInt err = iMultipleDbUi.UpdateOnAddOrEditL(!iEditFlag);
+ if (err != KErrNone)
+ {
+ ShowErrorNoteL(err);
+ }
}
}
break;
case EAknSoftkeyExit:
case EAknCmdExit:
{
- isExitForm = SaveNoteL(aButtonId);
- if(isExitForm)
+ isExitForm = SaveNoteL(aButtonId);
+ if (isExitForm)
{
- iMultipleDbUi.UpdateOnAddOrEditL(!iEditFlag);
+ TInt err = iMultipleDbUi.UpdateOnAddOrEditL(!iEditFlag);
+ if (err != KErrNone)
+ {
+ ShowErrorNoteL(err);
+ }
}
- isExitForm = ETrue;
- iMultipleDbUi.ExitDialogL();
- }
+ isExitForm = ETrue;
+ iMultipleDbUi.ExitDialogL();
+ }
break;
case EAknSoftkeyQuit:
{
@@ -629,18 +637,19 @@
TBool CCalenMultiDBEditor::SaveNoteL( TInt aButtonId )
{
TRACE_ENTRY_POINT;
-
- if( CheckSpaceBelowCriticalLevelL() )
+
+ if (CheckSpaceBelowCriticalLevelL())
{
TRACE_EXIT_POINT;
- return EFalse;
+ return EFalse;
}
if (Conflict() == CCalenMultiDBEditor::EConflictDelete)
{
CAknNoteDialog *note = new (ELeave) CAknNoteDialog(
CAknNoteDialog::EWarningTone, CAknNoteDialog::ENoTimeout);
- HBufC* buf = StringLoader::LoadLC( R_QTN_CALENDAREDITOR_NOTE_DB_CONFLICT_DELETE, iEikonEnv);
+ HBufC* buf = StringLoader::LoadLC(
+ R_QTN_CALENDAREDITOR_NOTE_DB_CONFLICT_DELETE, iEikonEnv);
note->SetTextL(*buf);
note->ExecuteLD(R_CALEN_CALENDAREDITOR_CONFLICT_DIALOG);
CleanupStack::PopAndDestroy(buf);
@@ -650,7 +659,8 @@
{
CAknNoteDialog *note = new (ELeave) CAknNoteDialog(
CAknNoteDialog::EWarningTone, CAknNoteDialog::ENoTimeout);
- HBufC* buf = StringLoader::LoadLC(R_QTN_CALENDAREDITOR_NOTE_DB_CONFLICT_UPDATE, iEikonEnv);
+ HBufC* buf = StringLoader::LoadLC(
+ R_QTN_CALENDAREDITOR_NOTE_DB_CONFLICT_UPDATE, iEikonEnv);
note->SetTextL(*buf);
note->ExecuteLD(R_CALEN_CALENDAREDITOR_CONFLICT_DIALOG);
CleanupStack::PopAndDestroy(buf);
@@ -665,111 +675,116 @@
iController.GetAllCalendarInfoL(calendarInfoList);
CleanupClosePushL(calendarInfoList);
const TBool continueOnError = ETrue;
- ReadDataFromFormL( continueOnError);
-
+ ReadDataFromFormL(continueOnError);
+
iCalendarName->Des().Trim();
// Check for the empty text
- if((!iCalendarName->Size()) )
+ if ((!iCalendarName->Size()))
{
// If in editing mode, just save the name used before.
- if( iEditFlag )
+ if (iEditFlag)
{
- iCalendarName->Des().Copy(iCalendarInfo.NameL());
- SetEdwinTextL( ECalenMultiDbName, iCalendarName );
+ iCalendarName->Des().Copy(iCalendarInfo.NameL());
+ SetEdwinTextL(ECalenMultiDbName, iCalendarName);
}
else
{
// else use the default name.
- TInt index( KOne );
- HBufC* calendarName = StringLoader::LoadLC( R_CALE_DB_CALENDAR );
- TBuf< KBuffLength > numBuf;
+ TInt index(KOne);
+ HBufC* calendarName = StringLoader::LoadLC(R_CALE_DB_CALENDAR);
+ TBuf<KBuffLength> numBuf;
// Check if the name is already present.
- while( IsNameFoundL( *calendarName ) )
+ while (IsNameFoundL(*calendarName))
{
- CleanupStack::PopAndDestroy( calendarName );
+ CleanupStack::PopAndDestroy(calendarName);
numBuf.Zero();
- if( index < KTen )
+ if (index < KTen)
{
- numBuf.Format( KFormatStringTwoDigit, index );
+ numBuf.Format(KFormatStringTwoDigit, index);
}
else
{
- numBuf.Format( KFormatString, index );
+ numBuf.Format(KFormatString, index);
}
AknTextUtils::DisplayTextLanguageSpecificNumberConversion(
- numBuf );
+ numBuf);
calendarName = StringLoader::LoadLC(
- R_CALE_DB_CALENDAR_DEFAULT_NAME, numBuf );
+ R_CALE_DB_CALENDAR_DEFAULT_NAME, numBuf);
++index;
}
-
- iCalendarName->Des().Append( calendarName->Des() );
-
- CleanupStack::PopAndDestroy( calendarName );
- SetEdwinTextL( ECalenMultiDbName, iCalendarName );
+
+ iCalendarName->Des().Append(calendarName->Des());
+
+ CleanupStack::PopAndDestroy(calendarName);
+ SetEdwinTextL(ECalenMultiDbName, iCalendarName);
}
}
-
- // Check for the validity of the calendar name.
- if( IsNameValid( *iCalendarName ) )
- {
- // Name is valid. then check if it already exists or not.
- if( IsNameEditedL( *iCalendarName ) )
- {
- TInt index = calendarInfoList.Find( *iCalendarName,CCalenMultiDBEditor::CalenInfoIdentifierL );
- if(index != KErrNotFound)
- {
- retValue = EFalse;
- if( EAknCmdExit != aButtonId )
- {
- HBufC* infoText = StringLoader::LoadLC(
- R_QTN_CALE_DB_ALREADY_EXISTS_NOTE , iCalendarName->Des() );
- CAknInformationNote* dialog = new( ELeave ) CAknInformationNote(ETrue);
- dialog->ExecuteLD( *infoText );
- CleanupStack::PopAndDestroy( infoText );
- }
- }
- else
- {
- iCalendarInfo.SetNameL(*iCalendarName);
- }
- }
-
- }
- else
- {
- if( EAknCmdExit != aButtonId )
- {
- retValue = EFalse;
- HBufC* infoText(NULL);
- infoText = AreIllegalChars( *iCalendarName ) ? StringLoader::LoadLC( R_CALEN_ILLEGAL_CHARACTERS ) :
- StringLoader::LoadLC( R_CALEN_BAD_FILE_NAME );
- CAknInformationNote* dialog = new( ELeave ) CAknInformationNote(ETrue);
- dialog->ExecuteLD( *infoText );
- CleanupStack::PopAndDestroy( infoText );
- }
- }
-
-
- if(IsColorEditedL( iColVal ) )
- {
- iCalendarInfo.SetColor(iColVal);
- }
+
+ // Check for the validity of the calendar name.
+ if (IsNameValid(*iCalendarName))
+ {
+ // Name is valid. then check if it already exists or not.
+ if (IsNameEditedL(*iCalendarName))
+ {
+ TInt index = calendarInfoList.Find(*iCalendarName,
+ CCalenMultiDBEditor::CalenInfoIdentifierL);
+ if (index != KErrNotFound)
+ {
+ retValue = EFalse;
+ if (EAknCmdExit != aButtonId)
+ {
+ HBufC* infoText = StringLoader::LoadLC(
+ R_QTN_CALE_DB_ALREADY_EXISTS_NOTE,
+ iCalendarName->Des());
+ CAknInformationNote* dialog =
+ new (ELeave) CAknInformationNote(ETrue);
+ dialog->ExecuteLD(*infoText);
+ CleanupStack::PopAndDestroy(infoText);
+ }
+ }
+ else
+ {
+ iCalendarInfo.SetNameL(*iCalendarName);
+ }
+ }
-
-
- if( IsVisiblityFieldEditedL( iCalendarStatus ) )
+ }
+ else
+ {
+ if (EAknCmdExit != aButtonId)
{
- iCalendarInfo.SetEnabled(iCalendarStatus);
+ retValue = EFalse;
+ HBufC* infoText(NULL);
+ infoText
+ = AreIllegalChars(*iCalendarName)
+ ? StringLoader::LoadLC(
+ R_CALEN_ILLEGAL_CHARACTERS)
+ : StringLoader::LoadLC(
+ R_CALEN_BAD_FILE_NAME);
+ CAknInformationNote* dialog = new (ELeave) CAknInformationNote(
+ ETrue);
+ dialog->ExecuteLD(*infoText);
+ CleanupStack::PopAndDestroy(infoText);
}
-
- CleanupStack::PopAndDestroy(&calendarInfoList);
+ }
+
+ if (IsColorEditedL(iColVal))
+ {
+ iCalendarInfo.SetColor(iColVal);
+ }
+
+ if (IsVisiblityFieldEditedL(iCalendarStatus))
+ {
+ iCalendarInfo.SetEnabled(iCalendarStatus);
+ }
+
+ CleanupStack::PopAndDestroy(&calendarInfoList);
TRACE_EXIT_POINT;
return retValue;
- }
+ }
// ---------------------------------------------------------------------------
// CCalenMultiDBEditor::ExecuteLD
@@ -1172,15 +1187,25 @@
TBool retcode(EFalse);
if ( SysUtil::FFSSpaceBelowCriticalLevelL( &( iCoeEnv->FsSession() ) ) )
{
- CErrorUI* errorUi = CErrorUI::NewLC();
- errorUi->ShowGlobalErrorNoteL( KErrDiskFull );
- CleanupStack::PopAndDestroy( errorUi );
+ ShowErrorNoteL(KErrDiskFull);
retcode = ETrue;
}
TRACE_EXIT_POINT;
return retcode;
}
+// -----------------------------------------------------------------------------
+// CCalenMultiDBEditor::ShowErrorNoteL
+// -----------------------------------------------------------------------------
+//
+void CCalenMultiDBEditor::ShowErrorNoteL(TInt aError)
+ {
+ TRACE_ENTRY_POINT
+ CErrorUI* errorUi = CErrorUI::NewLC();
+ errorUi->ShowGlobalErrorNoteL( aError );
+ CleanupStack::PopAndDestroy( errorUi );
+ TRACE_EXIT_POINT
+ }
// -----------------------------------------------------------------------------
// CDbColorPicture::CDbColorPicture
--- a/calendarui/controller/src/calenmultipledbui.cpp Mon Jun 21 15:38:59 2010 +0300
+++ b/calendarui/controller/src/calenmultipledbui.cpp Thu Jul 15 18:37:27 2010 +0300
@@ -659,7 +659,7 @@
iCalendarInfoNew = CCalCalendarInfo::NewL();
iCalendarInfoNew->SetNameL(KNullDesC16);
- iCalendarInfoNew->SetColor(255);
+ iCalendarInfoNew->SetColor(KCalenBlue.Value());
iCalendarInfoNew->SetEnabled(ETrue);
iDbEditor = CCalenMultiDBEditor::NewL(*this,*iCalendarInfoNew, iController, EFalse );
@@ -681,20 +681,25 @@
// CCalenMultipleDbUi::UpdateAddOrEditL
// ----------------------------------------------------------------------------
//
-void CCalenMultipleDbUi::UpdateOnAddOrEditL(TBool aItemAdded)
+TInt CCalenMultipleDbUi::UpdateOnAddOrEditL(TBool aItemAdded)
{
TRACE_ENTRY_POINT
-
+ TInt retError = KErrNone;
+
iDbEditor = NULL;
if(aItemAdded)
{
+ TRAP(retError,
// Set calendar properties for new calendar being created.
SetCalendarAddPropertiesL(*iCalendarInfoNew);
+ //This makes sure calendarInfo will get deleted anyway!
iController.AddCalendarL(iCalendarInfoNew);
+ );
+
iCalendarInfoNew = NULL;
-
+
//Highlight the newly created list item
iListBox->ScrollToMakeItemVisible(iListBox->BottomItemIndex());
iListBox->SetCurrentItemIndexAndDraw(iDesArray->Count()-1);
@@ -707,19 +712,26 @@
CheckForChangesL(*iCalendarInfoOriginal,
*iCalendarInfoEdited))
{
+ TRAP(retError,
// update the calendar properties such as modification time, sync status.
SetCalendarUpdatePropertiesL(*iCalendarInfoEdited);
iController.UpdateCalendarL(iCalendarInfoEdited);
+ );
+
}
iConflictOccured = EFalse;
delete iCalendarInfoOriginal,iCalendarInfoOriginal = NULL;
}
+
iIsDbEditorOpen = EFalse ; //iIsDbEditorOpen should be set before calling UpdateListboxL()
- UpdateListboxL();
+
+ TRAP_IGNORE(UpdateListboxL());
+
TRACE_EXIT_POINT
+ return retError;
}
// ----------------------------------------------------------------------------
--- a/calendarui/controller/src/calennotifier.cpp Mon Jun 21 15:38:59 2010 +0300
+++ b/calendarui/controller/src/calennotifier.cpp Thu Jul 15 18:37:27 2010 +0300
@@ -776,9 +776,16 @@
case MCalFileChangeObserver::ECalendarInfoDeleted:
{
TFileName calFileName = aCalendarInfoChangeEntries[index]->FileNameL();
- CCalSession& session = iGlobalData->CalSessionL( calFileName );
+ CCalSession* session = NULL;
+ TRAPD(err, session = &iGlobalData->CalSessionL( calFileName ));
+ if(KErrNotFound == err && ECalendarInfoUpdated == changeType)
+ {
+ BroadcastNotification(ECalenNotifyDeleteInstanceView);
+ BroadcastNotification(ECalenNotifyCalendarInfoCreated);
+ break;
+ }
- CCalCalendarInfo* calendarInfo = session.CalendarInfoL();
+ CCalCalendarInfo* calendarInfo = session->CalendarInfoL();
CleanupStack::PushL(calendarInfo);
TBuf8<KBuffLength> keyBuff;
@@ -786,7 +793,7 @@
TBool markAsdelete;
TPckgC<TBool> pkgMarkAsDelete(markAsdelete);
- TRAPD(err,pkgMarkAsDelete.Set(calendarInfo->PropertyValueL(keyBuff)));
+ TRAP(err,pkgMarkAsDelete.Set(calendarInfo->PropertyValueL(keyBuff)));
markAsdelete = pkgMarkAsDelete();
CleanupStack::PopAndDestroy(calendarInfo);
--- a/calendarui/controller/src/calenviewmanager.cpp Mon Jun 21 15:38:59 2010 +0300
+++ b/calendarui/controller/src/calenviewmanager.cpp Thu Jul 15 18:37:27 2010 +0300
@@ -101,8 +101,11 @@
TRACE_ENTRY_POINT;
delete iPopulator;
- delete iToolbar;
-
+ if(iToolbar)
+ {
+ delete iToolbar;
+ iToolbar = NULL;
+ }
if( iSetting )
{
iSetting->Release();
@@ -625,7 +628,8 @@
SetRepopulation(EFalse);
// reactivate the current view
- RequestActivationL(iCurrentViewId.iViewUid);
+ //RequestActivationL(iCurrentViewId.iViewUid);
+ RequestActivationL(KUidCalenDayView);
// dim "today" toolbar item since focus is on today
iToolbar->Toolbar().SetItemDimmed( ECalenGotoToday, ETrue, ETrue);
@@ -1144,7 +1148,7 @@
if( iController.IsFasterAppFlagEnabled() )
{
- iController.RemoveDeadCalendarsL();
+ TRAP_IGNORE(iController.RemoveDeadCalendarsL());
}
}
break;
--- a/calendarui/editors/data/CalenDefaultEditorsData.rss Mon Jun 21 15:38:59 2010 +0300
+++ b/calendarui/editors/data/CalenDefaultEditorsData.rss Thu Jul 15 18:37:27 2010 +0300
@@ -1633,11 +1633,6 @@
},
MENU_ITEM
{
- command = ECalenSend;
- txt = qtn_options_send_via;
- },
- MENU_ITEM
- {
command = EAknCmdHelp;
txt = qtn_options_help;
},
--- a/calendarui/editors/inc/calenunifiededitor.h Mon Jun 21 15:38:59 2010 +0300
+++ b/calendarui/editors/inc/calenunifiededitor.h Thu Jul 15 18:37:27 2010 +0300
@@ -268,12 +268,7 @@
void ActivateL();
private:
- /**
- * @brief Insert Send menu item if needed.
- * @param : Menu pane where send menu is inserted
- */
- void TryInsertSendMenuL( TInt aResourceId, CEikMenuPane* aMenuPane );
-
+
/**
* @brief Handles "Cancel" menu command for discarding the user changes.
*/
@@ -285,12 +280,6 @@
void OnCmdDeleteNoteL();
/**
- * @brief Handles send command
- * @param aCommandId Holds ECalenSend command
- */
- void OnCmdSendL( TInt aCommandId );
-
- /**
* @brief Handles "Help" command.
*/
void OnCmdHelpL();
--- a/calendarui/editors/inc/calenunifiededitorcontrol.h Mon Jun 21 15:38:59 2010 +0300
+++ b/calendarui/editors/inc/calenunifiededitorcontrol.h Thu Jul 15 18:37:27 2010 +0300
@@ -79,8 +79,9 @@
/**
* @brief Set data to the collapsed unified editor
+ * @param onLocaleUpdate TBool to indicate locale change impact on this method
*/
- void SetDataToEditorL();
+ void SetDataToEditorL(TBool onLocaleUpdate = EFalse);
/**
* @brief Set date of date editor aControlId in form to aTime
--- a/calendarui/editors/src/calenunifiededitor.cpp Mon Jun 21 15:38:59 2010 +0300
+++ b/calendarui/editors/src/calenunifiededitor.cpp Thu Jul 15 18:37:27 2010 +0300
@@ -944,7 +944,7 @@
iEditorDataHandler->ResetOriginalDataL();
}
}
- iUnifiedEditorControl->SetDataToEditorL();
+ iUnifiedEditorControl->SetDataToEditorL(ETrue);
}
if ( aChange & EChangesLocale )
@@ -1062,9 +1062,6 @@
case EAknCmdHelp:
OnCmdHelpL();
break;
- case ECalenSend:
- OnCmdSendL( aCommandId );
- break;
case ECalenGetLocation:
{
ReadPlaceFromEditorL(); // to remove any picture characters in location string
@@ -1320,8 +1317,6 @@
{
aMenuPane->DeleteMenuItem( ECalenCmdAddPeople );
}
-
- TryInsertSendMenuL( aResourceId, aMenuPane );
}
break;
@@ -1367,42 +1362,6 @@
}
// -----------------------------------------------------------------------------
-// CCalenUnifiedEditor::OnCmdSendL
-// Handles the send command. This function differs from the ViewerBase version
-// in that the ViewerBase does not attempt to save or delete the entry first.
-// -----------------------------------------------------------------------------
-//
-void CCalenUnifiedEditor::OnCmdSendL( TInt aCommandId )
- {
- TRACE_ENTRY_POINT;
-
- // Show menu to user
- // CCalenSend handles selection internally, so we don't get anything in return
- iGlobalData->CalenSendL().DisplaySendCascadeMenuL();
-
- // Try to send
- if ( iGlobalData->CalenSendL().CanSendL(aCommandId) )
- {
- TBool canSend(ETrue);
-
- const TBool continueOnError = EFalse;
- iUnifiedEditorControl->ReadDataFromEditorL( continueOnError );
- CCalenEditorDataHandler::TAction action =
- EditorDataHandler().ShouldSaveOrDeleteOrDoNothingL();
- if( action == CCalenEditorDataHandler::EActionSave )
- {
- canSend = TryToSaveNoteL();
- }
-
- if ( canSend )
- {
- iGlobalData->CalenSendL().SendAsVCalendarL( aCommandId, EditorDataHandler().Entry() );
- }
- }
- TRACE_EXIT_POINT;
- }
-
-// -----------------------------------------------------------------------------
// CCalenUnifiedEditor::OnCmdHelpL
// Handles help command.
// -----------------------------------------------------------------------------
@@ -1468,27 +1427,6 @@
}
// -----------------------------------------------------------------------------
-// CCalenUnifiedEditor::TryInsertSendMenuL
-// Inserts the send menu, if needed.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void CCalenUnifiedEditor::TryInsertSendMenuL( TInt /*aResourceId*/, CEikMenuPane* aMenuPane )
- {
- TRACE_ENTRY_POINT;
-
- // Only insert if there is some summary (or location)
- // Changes done to remove Lunar calendar item from options menu
- if( EditorDataHandler().AreTextFieldsEmptyL() )
- {
- // Delete Send Menu item if exists
- aMenuPane->DeleteMenuItem( ECalenSend );
- }
-
- TRACE_EXIT_POINT;
- }
-
-// -----------------------------------------------------------------------------
// CCalenUnifiedEditor::CloseFormWithoutActionsL
// Closes the form. We have to do it via dialog's exit mechanism
// with custom id (KCalenButtonIdCloseForm).
--- a/calendarui/editors/src/calenunifiededitorcontrol.cpp Mon Jun 21 15:38:59 2010 +0300
+++ b/calendarui/editors/src/calenunifiededitorcontrol.cpp Thu Jul 15 18:37:27 2010 +0300
@@ -144,7 +144,7 @@
// Set data to the collapsed unified editor
// -----------------------------------------------------------------------------
//
-void CCalenUnifiedEditorControl::SetDataToEditorL()
+void CCalenUnifiedEditorControl::SetDataToEditorL(TBool onLocaleUpdate)
{
TRACE_ENTRY_POINT;
@@ -155,7 +155,9 @@
TPtrC subject = iUnifiedEditor.Edited().Summary().Left(
iUnifiedEditor.MaxTextEditorLength() );
- iUnifiedEditor.SetEditorTextL( ECalenEditorSubject, &subject );
+
+ if(!onLocaleUpdate)
+ iUnifiedEditor.SetEditorTextL( ECalenEditorSubject, &subject );
@@ -246,7 +248,9 @@
{
TPtrC location = iUnifiedEditor.Edited().Location().Left(
iUnifiedEditor.MaxTextEditorLength() );
- iUnifiedEditor.SetEditorTextL( ECalenEditorPlace, &location );
+
+ if(!onLocaleUpdate)
+ iUnifiedEditor.SetEditorTextL( ECalenEditorPlace, &location );
}
// TODO: Uncomment this when enabling attachment support
@@ -1431,7 +1435,7 @@
}
iUnifiedEditor.TryChangeFocusToL( lastFocusedItem );
- SetDataToEditorL();
+ SetDataToEditorL(ETrue);
iUnifiedEditor.UpdateFormL();
TRACE_EXIT_POINT;
}
--- a/calendarui/globaldata/inc/calenglobaldata.h Mon Jun 21 15:38:59 2010 +0300
+++ b/calendarui/globaldata/inc/calenglobaldata.h Thu Jul 15 18:37:27 2010 +0300
@@ -446,6 +446,14 @@
* Deletes a calendar from the calendar list
*/
void HandleCalendarFileDeletedL();
+
+ /*
+ * @brief Delete all missed alarms for deleted calendar
+ * @param aCalendarFilename filename of the calendar for which missed
+ * alarms should be deleted
+ * @return void
+ */
+ void DeleteCalendarMissedAlarmsL(const TDesC& aCalendarFilename);
private:
// Member data owned by this class. Member data is only initialised on first use
--- a/calendarui/globaldata/src/calendbchangenotifier.cpp Mon Jun 21 15:38:59 2010 +0300
+++ b/calendarui/globaldata/src/calendbchangenotifier.cpp Thu Jul 15 18:37:27 2010 +0300
@@ -174,6 +174,11 @@
TRACE_EXIT_POINT;
}
+
+// -----------------------------------------------------------------------------
+// CCalenDbChangeNotifier::HandleMissedAlarmsL
+// Delete missed alarms when externally the entries are getting deleted.
+// -----------------------------------------------------------------------------
void CCalenDbChangeNotifier::HandleMissedAlarmsL(const RArray<TCalChangeEntry>& aChangeItems)
{
TRACE_ENTRY_POINT
@@ -183,13 +188,18 @@
CMissedAlarmStore* missedAlarmStore = CMissedAlarmStore::NewL(
*missedAlarmStoreRepository);
CleanupStack::PushL(missedAlarmStore);
+
RPointerArray<CMissedAlarm> missedAlarmStorelist;
CleanupResetAndDestroyPushL(missedAlarmStorelist);
+
missedAlarmStore->GetL(missedAlarmStorelist);
+
CCalCalendarInfo* calendarInfo = iSession.CalendarInfoL();
CleanupStack::PushL(calendarInfo);
+
CCalenDbChangeNotifier::TCalLuidFilename calLuidFilename;
calLuidFilename.iFilename = calendarInfo->FileNameL();
+
if (missedAlarmStorelist.Count())
{
for (TInt idx = 0; idx < aChangeItems.Count(); idx++)
@@ -197,9 +207,9 @@
if (aChangeItems[idx].iChangeType == EChangeDelete)
{
calLuidFilename.iLuid = aChangeItems[idx].iEntryId;
- TInt index = missedAlarmStorelist.Find(
- calLuidFilename,CCalenDbChangeNotifier::DoFindEntryByLuid);
- if(index != KErrNotFound)
+ TInt index = missedAlarmStorelist.Find(calLuidFilename,
+ CCalenDbChangeNotifier::DoFindEntryByLuid);
+ if (index != KErrNotFound)
{
CMissedAlarm* missedAlarm = missedAlarmStorelist[index];
missedAlarmStore->RemoveL(*missedAlarm);
@@ -207,11 +217,17 @@
}
}
}
+
CleanupStack::PopAndDestroy(calendarInfo);
CleanupStack::PopAndDestroy(&missedAlarmStorelist);
CleanupStack::PopAndDestroy(missedAlarmStore);
+
TRACE_EXIT_POINT
}
+
+// -----------------------------------------------------------------------------
+// CCalenDbChangeNotifier::DoFindEntryByLuid
+// -----------------------------------------------------------------------------
TBool CCalenDbChangeNotifier::DoFindEntryByLuid(
const TCalLuidFilename* aLuidFilename,const CMissedAlarm& aMissedAlarm)
{
--- a/calendarui/globaldata/src/calenglobaldata.cpp Mon Jun 21 15:38:59 2010 +0300
+++ b/calendarui/globaldata/src/calenglobaldata.cpp Thu Jul 15 18:37:27 2010 +0300
@@ -27,6 +27,9 @@
#include "CalenInterimUtils2.h" // CalenInterimUtils
#include "calencontextimpl.h" // Calendar context implementation
#include "calenfilemapping.h"
+#include "missedalarmstore.h"
+#include "CleanupResetAndDestroy.h"
+#include "calendar.hrh"
#include <Calendar.rsg> // Calendar resources
#include <cmrmailboxutils.h> // CMRMailboxUtils
@@ -1269,7 +1272,8 @@
EXPORT_C void CCalenGlobalData::AddCalendarL(CCalCalendarInfo* aCalendarInfo)
{
TRACE_ENTRY_POINT;
-
+ CleanupStack::PushL(aCalendarInfo);
+
CCalenFileMapping* fileMapping = CCalenFileMapping::NewL();
CleanupStack::PushL(fileMapping);
@@ -1283,7 +1287,6 @@
iNewEntryView = NULL;
iNewEntryViewCreation = NULL;
TPtrC calFileName = fileMapping->GetCalendarFileName();
- CleanupStack::PushL(aCalendarInfo);
CCalSession& tempSession = CreateNewSessionL( calFileName,
*aCalendarInfo );
fileMapping->SetSessionPtr(&tempSession);
@@ -1297,10 +1300,9 @@
CCalenDbChangeNotifier* dbChangeNotifier = CCalenDbChangeNotifier::NewL( tempSession );
dbChangeNotifier->RegisterObserverL(*iDBChangeNotifier);
fileMapping->SetDBChangeNotifier(dbChangeNotifier);
- CleanupStack::PopAndDestroy(aCalendarInfo);
iCalendarInfoList.Append(tempSession.CalendarInfoL());
}
-
+
CleanupStack::Pop(fileMapping);
iFileMappingArray.Append(fileMapping);
@@ -1311,6 +1313,9 @@
index);
}
+ CleanupStack::PopAndDestroy(aCalendarInfo);
+ aCalendarInfo = NULL;
+
TRACE_EXIT_POINT
}
@@ -1415,6 +1420,9 @@
session->SetCalendarInfoL( *caleninfo );
CleanupStack::PopAndDestroy(caleninfo);
}
+
+ TRAP_IGNORE(DeleteCalendarMissedAlarmsL(aCalendarFileName));
+
TInt infoListIndex = iCalendarInfoList.Find(*calendarFilename,
CCalenGlobalData::CalenCalendarInfoIdentiferL);
@@ -1643,7 +1651,7 @@
CCalCalendarInfo* defaultCalendarInfo = CCalCalendarInfo::NewL();
CleanupStack::PushL(defaultCalendarInfo);
- defaultCalendarInfo->SetColor(KRgbRed.Value());
+ defaultCalendarInfo->SetColor(KCalenBlue.Value());
defaultCalendarInfo->SetEnabled(ETrue);
defaultCalendarInfo->SetNameL(KPhoneCalendar);
CleanupStack::Pop(defaultCalendarInfo);
@@ -1773,4 +1781,33 @@
TRACE_EXIT_POINT;
}
+// -----------------------------------------------------------------------------
+// CCalenGlobalData::DeleteCalendarMissedAlarmsL
+// Delete all missed alarms for deleted calendar
+// -----------------------------------------------------------------------------
+//
+void CCalenGlobalData::DeleteCalendarMissedAlarmsL(const TDesC& aCalendarFilename)
+ {
+ TRACE_ENTRY_POINT
+ //Clear all missed alarms related to this calendar
+ CMissedAlarmStore* missedAlarmStore = CMissedAlarmStore::NewLC();
+ RPointerArray<CMissedAlarm> missedAlarms;
+ CleanupResetAndDestroyPushL(missedAlarms);
+
+ missedAlarmStore->GetL(missedAlarms);
+
+ for (TInt idx = 0; idx < missedAlarms.Count(); idx++)
+ {
+ CMissedAlarm* missedAlarm = missedAlarms[idx];
+ if (!missedAlarm->iCalFileName.CompareF(aCalendarFilename))
+ {
+ missedAlarmStore->RemoveL(*missedAlarm);
+ }
+ }
+
+ CleanupStack::PopAndDestroy(&missedAlarms);
+ CleanupStack::PopAndDestroy(missedAlarmStore);
+ TRACE_EXIT_POINT
+ }
+
// End of file
--- a/calendarui/inc/calendar.hrh Mon Jun 21 15:38:59 2010 +0300
+++ b/calendarui/inc/calendar.hrh Thu Jul 15 18:37:27 2010 +0300
@@ -239,6 +239,23 @@
ECalenSelectCmdOk = 3000
};
+//Colors of color grid in Muliple calendars view
+#define KCalenDarkBlue TRgb(0x792B00)
+#define KCalenBlue TRgb(0xC0580F)
+#define KCalenCyan TRgb(0xB0A157)
+#define KCalenlightBlue TRgb(0xF5D8B3)
+#define KCalenDarkGreen TRgb(0x1C4C02)
+#define KCalenGreen TRgb(0x359C50)
+#define KCalenlightGreen TRgb(0x53D292)
+#define KCalenGold TRgb(0x5BDDDC)
+#define KCalenDarkRed TRgb(0x0A12B8)
+#define KCalenOrange TRgb(0x009DFF)
+#define KCalenYellow TRgb(0x05E8FF)
+#define KCalenDarkOrange TRgb(0x2D63D4)
+#define KCalenMegenta TRgb(0xA4006D)
+#define KCalenlightMagenta TRgb(0xE68DA7)
+#define KCalenlightPink TRgb(0xCFACFF)
+#define KCalenPink TRgb(0x8217E0)
#endif // end of CALENDAR_HRH
--- a/calendarui/multicaluidialog/group/multicaluidialog.mmp Mon Jun 21 15:38:59 2010 +0300
+++ b/calendarui/multicaluidialog/group/multicaluidialog.mmp Thu Jul 15 18:37:27 2010 +0300
@@ -76,6 +76,7 @@
LIBRARY egul.lib
LIBRARY gdi.lib
LIBRARY CalenInterimUtils2.lib
+LIBRARY commonui.lib // CErrorUi
// Capability and vendor info
--- a/calendarui/multicaluidialog/src/caluidialogimpl.cpp Mon Jun 21 15:38:59 2010 +0300
+++ b/calendarui/multicaluidialog/src/caluidialogimpl.cpp Thu Jul 15 18:37:27 2010 +0300
@@ -119,12 +119,18 @@
iColorUidArray.Reset();
iColorUidArray.Close();
- delete iDesArray;
+ if(iDesArray)
+ delete iDesArray;
+
+ if(iBgContext)
+ delete iBgContext;
- delete iBgContext;
+ if(iAsyncExit)
+ {
+ iAsyncExit->Cancel();
+ delete iAsyncExit;
+ }
- iAsyncExit->Cancel();
- delete iAsyncExit;
TRACE_EXIT_POINT
}
--- a/calendarui/multicaluidialog/src/multicaluidialogmodel.cpp Mon Jun 21 15:38:59 2010 +0300
+++ b/calendarui/multicaluidialog/src/multicaluidialogmodel.cpp Thu Jul 15 18:37:27 2010 +0300
@@ -23,6 +23,7 @@
#include <calcalendarinfo.h>
#include <calcalendariterator.h>
#include <calenmulticaluids.hrh>
+#include <ErrorUI.h>
// user include.
#include "multicaluidialogmodel.h"
@@ -146,9 +147,17 @@
TRACE_ENTRY_POINT
//iCalSessionArray takes ownership of this.
CCalSession* defaultSession = CCalSession::NewL();
-
- GetAllCalendarInfoL(iCalendarInfoList);
-
+
+ TRAPD(err,GetAllCalendarInfoL(iCalendarInfoList));
+
+ //Something happened and
+ if(err!=KErrNone)
+ {
+ CErrorUI* errorUi = CErrorUI::NewLC();
+ errorUi->ShowGlobalErrorNoteL( err );
+ CleanupStack::PopAndDestroy( errorUi );
+ }
+
for (TInt index = 0; index < iCalendarInfoList.Count(); index++)
{
iCalendarStatus.Append(0);
--- a/calendarui/organizerplugin/aiagendapluginengine/src/CalenAsyncCommands.cpp Mon Jun 21 15:38:59 2010 +0300
+++ b/calendarui/organizerplugin/aiagendapluginengine/src/CalenAsyncCommands.cpp Thu Jul 15 18:37:27 2010 +0300
@@ -418,8 +418,10 @@
&&
iInstanceArray[i]->StartTimeL().TimeLocalL() < iDay )
{
- delete iInstanceArray[i];
+ CCalInstance* instance = iInstanceArray[i];
iInstanceArray.Remove( i );
+ delete instance;
+
}
else
{
@@ -952,8 +954,9 @@
if( entry.EntryTypeL() == CCalEntry::EAppt &&
entry.StatusL() == CCalEntry::ECancelled )
{
- delete iInstanceArray[i];
+ CCalInstance* instance = iInstanceArray[i];
iInstanceArray.Remove( i );
+ delete instance;
}
else
{
--- a/calendarui/organizerplugin/data/qhd_tch/organizer_2001f481/xuikon/00/organizer.css Mon Jun 21 15:38:59 2010 +0300
+++ b/calendarui/organizerplugin/data/qhd_tch/organizer_2001f481/xuikon/00/organizer.css Thu Jul 15 18:37:27 2010 +0300
@@ -3,6 +3,7 @@
width: auto;
height: auto;
padding-left: 10px;
+ padding-right: 10px;
padding-top: 2%;
padding-bottom: 2%;
nav-index: appearance;
--- a/calendarui/organizerplugin/data/qhd_tch/organizer_2001f481/xuikon/37/organizer.css Mon Jun 21 15:38:59 2010 +0300
+++ b/calendarui/organizerplugin/data/qhd_tch/organizer_2001f481/xuikon/37/organizer.css Thu Jul 15 18:37:27 2010 +0300
@@ -3,6 +3,7 @@
width: auto;
height: auto;
padding-left: 10px;
+ padding-right: 10px;
padding-top: 2%;
padding-bottom: 2%;
nav-index: appearance;
--- a/calendarui/organizerplugin/data/qhd_tch/organizer_2001f481/xuikon/50/organizer.css Mon Jun 21 15:38:59 2010 +0300
+++ b/calendarui/organizerplugin/data/qhd_tch/organizer_2001f481/xuikon/50/organizer.css Thu Jul 15 18:37:27 2010 +0300
@@ -3,6 +3,7 @@
width: auto;
height: auto;
padding-left: 10px;
+ padding-right: 10px;
padding-top: 2%;
padding-bottom: 2%;
nav-index: appearance;
--- a/calendarui/organizerplugin/data/qhd_tch/organizer_2001f481/xuikon/57/organizer.css Mon Jun 21 15:38:59 2010 +0300
+++ b/calendarui/organizerplugin/data/qhd_tch/organizer_2001f481/xuikon/57/organizer.css Thu Jul 15 18:37:27 2010 +0300
@@ -3,6 +3,7 @@
width: auto;
height: auto;
padding-left: 10px;
+ padding-right: 10px;
padding-top: 2%;
padding-bottom: 2%;
nav-index: appearance;
--- a/calendarui/organizerplugin/data/qhd_tch/organizer_2001f481/xuikon/94/organizer.css Mon Jun 21 15:38:59 2010 +0300
+++ b/calendarui/organizerplugin/data/qhd_tch/organizer_2001f481/xuikon/94/organizer.css Thu Jul 15 18:37:27 2010 +0300
@@ -3,6 +3,7 @@
width: auto;
height: auto;
padding-left: 10px;
+ padding-right: 10px;
padding-top: 2%;
padding-bottom: 2%;
nav-index: appearance;
--- a/calendarui/views/inc/calendayview.h Mon Jun 21 15:38:59 2010 +0300
+++ b/calendarui/views/inc/calendayview.h Thu Jul 15 18:37:27 2010 +0300
@@ -57,6 +57,13 @@
*
*/
void UpdateCbaL();
+
+ /**
+ * To check if the Command to open event view
+ * from day view is handled
+ * @return ETrue : if eventview command is handled
+ */
+ TBool isEventViewCommandHandled();
public: // From CCalenView
virtual TNextPopulationStep ActiveStepL();
--- a/calendarui/views/inc/caleneventviewcontainer.h Mon Jun 21 15:38:59 2010 +0300
+++ b/calendarui/views/inc/caleneventviewcontainer.h Thu Jul 15 18:37:27 2010 +0300
@@ -283,14 +283,8 @@
/**
* Populate the icon drawer with the icons for this entry
*/
- void PopulateIconDrawerL( CCalenIconDrawer& aIconDrawer );
-
- /**
- * Calculates the number of lines before the location field in the document
- * so that map icon is placed at correct place
- **/
- void CalcNumOfLinesBeforeLocation();
-
+ void PopulateIconDrawerL( CCalenIconDrawer& aIconDrawer );
+
/**
* Formats the heading and adds it the the view
* Headings are bolded with no indentation.
@@ -578,8 +572,7 @@
private:
CRepository* iCenRepSession; // Central Repository session
// Notifier to listen changes of offline state
- CCenRepNotifyHandler* iNotifier;
- TInt iNumOfLinesBeforeLocField; // Number of lines before locaiton field in the rich text editor
+ CCenRepNotifyHandler* iNotifier;
TInt iTimeFieldLines; // Number of lines occupied by time field on the viewer
TBool iEmbeddedFileOpened;
CFindItemMenu* iFindMenu;
--- a/calendarui/views/inc/calenicondrawer.h Mon Jun 21 15:38:59 2010 +0300
+++ b/calendarui/views/inc/calenicondrawer.h Thu Jul 15 18:37:27 2010 +0300
@@ -75,7 +75,7 @@
void GetOriginalSizeInTwips( TSize& aSize ) const;
void AddIconL( MCalenServices::TCalenIcons aIconIndex );
- void SetIconSizesFromLayout(TInt aNumOfLinesBefLocField = 0);
+ void SetIconSizesFromLayout();
TInt WidthInPixels();
public:
@@ -84,11 +84,6 @@
private:
CAknIconArray* CreateIconsL( const RArray<MCalenServices::TCalenIcons>& aIndexArray );
TInt IconIndex( MCalenServices::TCalenIcons aType ) const;
-
- /**
- * Fuction to set map icon size
- */
- void SetMapIconSize(TRect aIconRect);
enum TCalViewerIconSlot
{
--- a/calendarui/views/src/calendaycontainer.cpp Mon Jun 21 15:38:59 2010 +0300
+++ b/calendarui/views/src/calendaycontainer.cpp Thu Jul 15 18:37:27 2010 +0300
@@ -1477,11 +1477,6 @@
if(iGestureHelper)
{
iGestureHelper->HandlePointerEventL( aPointerEvent );
- if ( iGestureHandled )
- {
- TRACE_EXIT_POINT;
- return;
- }
}
@@ -1526,16 +1521,27 @@
}
case GestureHelper::EGestureSwipeRight:
{
- HandleNaviDecoratorEventL( EAknNaviDecoratorEventLeftTabArrow );
- iGestureHandled = ETrue;
+ //Handle swipe only if event view command
+ //is not yet handled
+ if(!DayView().isEventViewCommandHandled())
+ {
+ HandleNaviDecoratorEventL( EAknNaviDecoratorEventLeftTabArrow );
+ iGestureHandled = ETrue;
+ }
break;
}
case GestureHelper::EGestureSwipeLeft:
{
- HandleNaviDecoratorEventL( EAknNaviDecoratorEventRightTabArrow );
- iGestureHandled = ETrue;
+ //Handle swipe only if event view command
+ //is not yet handled
+ if(!DayView().isEventViewCommandHandled())
+ {
+ HandleNaviDecoratorEventL( EAknNaviDecoratorEventRightTabArrow );
+ iGestureHandled = ETrue;
+ }
+
+ }
break;
- }
default:
// Other gestures are not handled here
break;
--- a/calendarui/views/src/calendayview.cpp Mon Jun 21 15:38:59 2010 +0300
+++ b/calendarui/views/src/calendayview.cpp Thu Jul 15 18:37:27 2010 +0300
@@ -192,6 +192,16 @@
}
// ---------------------------------------------------------
+// CCalenDayView::isEventViewCommandHandled
+// Check if event view command is handled or not
+// ---------------------------------------------------------
+//
+TBool CCalenDayView::isEventViewCommandHandled()
+ {
+ return iEventViewCommandHandled ;
+ }
+
+// ---------------------------------------------------------
// CCalenDayView::DoDeactivateImpl
// Second phase DoDeactivate
// (other items were commented in a header).
@@ -405,9 +415,7 @@
case EAknSoftkeyOpen:
case ECalenViewCurrentEntry:
{
- if(!iEventViewCommandHandled)
- {
- if(iDayContainer->IsValidEntryL()&&!iDayContainer->IsEmptyView())
+ if(iDayContainer->IsValidEntryL()&&!iDayContainer->IsEmptyView())
{
// Set the context when performing an action
iDayContainer->SetContextFromHighlightL();
@@ -415,7 +423,7 @@
CCalenNativeView::HandleCommandL( ECalenEventView );
iEventViewCommandHandled = ETrue;
}
- }
+
}
break;
// TODO:will be uncommented with copy to cal functionality.
--- a/calendarui/views/src/caleneventviewcontainer.cpp Mon Jun 21 15:38:59 2010 +0300
+++ b/calendarui/views/src/caleneventviewcontainer.cpp Thu Jul 15 18:37:27 2010 +0300
@@ -119,7 +119,6 @@
iEmbeddedFileOpened(EFalse)
{
TRACE_ENTRY_POINT;
- iNumOfLinesBeforeLocField = 0;
iLocaleChanged = EFalse;
TRACE_EXIT_POINT;
}
@@ -669,7 +668,7 @@
// Insert at index 0 in the document to cause the icons to be drawn when
// the first line is visible. The icons will not be drawn at position 0,
// but this position must be on the screen for the icons to be drawn.
- iTextEditor->RichText()->InsertL( iTextEditor->RichText()->DocumentLength(), header );
+ iTextEditor->RichText()->InsertL( 0, header );
// Tell the text editor that it has been updated. This will cause
// a redraw.
@@ -928,13 +927,12 @@
if(IsEventHasMapLocationL())
{
// Update iNumOfLinesBeforeLocField
- CalcNumOfLinesBeforeLocation();
// Add map icon to the icon drawer
iconDrawer->AddIconL( MCalenServices::ECalenMapIcon );
// Set the icon sizes
- iconDrawer->SetIconSizesFromLayout(iNumOfLinesBeforeLocField);
+ iconDrawer->SetIconSizesFromLayout();
}
SetIconsL(iconDrawer);
@@ -1199,7 +1197,7 @@
}
}
// Set the icon sizes
- aIconDrawer.SetIconSizesFromLayout(iNumOfLinesBeforeLocField);
+ aIconDrawer.SetIconSizesFromLayout();
// Get the icon drawer width
iIconDrawerWidthInPixels = aIconDrawer.WidthInPixels();
@@ -2356,16 +2354,23 @@
// ----------------------------------------------------------------------------
TBool CCalenEventViewContainer::IsEventHasMapLocationL()
{
- CCalGeoValue* geoValue = iEntry->GeoValueL();
- if(geoValue)
- {
- delete geoValue;
- return ETrue;
- }
- else
- {
- return EFalse;
- }
+ if(iEntry)
+ {
+ CCalGeoValue* geoValue = iEntry->GeoValueL();
+ if(geoValue)
+ {
+ delete geoValue;
+ return ETrue;
+ }
+ else
+ {
+ return EFalse;
+ }
+ }
+ else
+ {
+ return EFalse;
+ }
}
// ----------------------------------------------------------------------------
@@ -2374,15 +2379,22 @@
// ----------------------------------------------------------------------------
TBool CCalenEventViewContainer::IsEventHasNoLocationTextL()
{
- TPtrC location = iEntry->LocationL();
- if(!location.Length())
- {
- return ETrue;
- }
- else
- {
- return EFalse;
- }
+ if(iEntry)
+ {
+ TPtrC location = iEntry->LocationL();
+ if(!location.Length())
+ {
+ return ETrue;
+ }
+ else
+ {
+ return EFalse;
+ }
+ }
+ else
+ {
+ return EFalse;
+ }
}
// ----------------------------------------------------------------------------
@@ -2606,62 +2618,6 @@
}
}
-// ----------------------------------------------------------------------------
-// CCalenEventViewContainer::CalcNumOfLinesBeforeLocation
-// Calculates the number of line before locaiton field in the document of the rich text editor
-// (other items were commented in a header).
-// ----------------------------------------------------------------------------
-//
-void CCalenEventViewContainer::CalcNumOfLinesBeforeLocation()
- {
- TRACE_ENTRY_POINT;
-
- CCalGeoValue* geoValue = iEntry->GeoValueL();
- if(geoValue)
- {
- // Get the count of lines before location field
- // so that map icon is drwan exactly at the firlst line of location text on the event viewer
- HBufC* visualText = NULL;
- CArrayFixFlat<TInt>* lineWidths = new( ELeave )CArrayFixFlat<TInt>( 5 );
- CleanupStack::PushL( lineWidths );
- lineWidths->AppendL(iMaxWidth - iIconDrawerWidthInPixels);
- // trim of enter keys entered at the end of the summary text,
- TBuf<160> summary;
- summary.Append(iEventViewData->Summary());
- TChar ch = 0x2029; // For Enter key
- TInt length = iEventViewData->Summary().Length();
- TInt count = 0;
-
- while( length > 0 )
- {
- if(summary[--length] == ch)
- {
- count++;
- summary.Copy(summary.Left(length)); // trim off the enter key
- }
- }
-
- // Count the number of lines summary will occupy after squeezing enter keys at the end of the text
- CArrayFixFlat<TPtrC>* textLines = new(ELeave)CArrayFixFlat<TPtrC>(5);
- CleanupStack::PushL( textLines );
- visualText = AknBidiTextUtils::ConvertToVisualAndWrapToArrayWholeTextL(summary ,
- *lineWidths,
- *iHeadingFont,
- *textLines);
- iNumOfLinesBeforeLocField += textLines->Count() + iTimeFieldLines; // Added for time and date field
- if (iEventViewData->Summary() == KNullDesC) // If summary is NULL, then <Unnamed> will be added as first line, hence, increment it
- {
- iNumOfLinesBeforeLocField++;
- }
- iNumOfLinesBeforeLocField += count; // Add the number of enter keys added at the end of the summary
- iTimeFieldLines = 0; // Reset the value
- CleanupStack::PopAndDestroy(textLines);
- CleanupStack::PopAndDestroy(lineWidths);
- delete visualText;
- delete geoValue;
- }
- }
-
// -----------------------------------------------------------------------------
// CCalenCommonUI::FindPossibleInstanceL
// Finds an instance with the given instance id and instance view.
@@ -2796,6 +2752,7 @@
BuildSearchBufferL();
MCalenToolbar* toolbar = iServices.ToolbarOrNull();
CFindItemDialog* finder = CFindItemDialog::NewL( *iSearchBuf, CFindItemEngine::EFindItemSearchPhoneNumberBin);
+ finder->EnableSingleClick(ETrue);
toolbar->SetToolbarVisibilityL(EFalse);
finder->ExecuteLD();
toolbar->SetToolbarVisibilityL(ETrue);
@@ -2815,6 +2772,7 @@
BuildSearchBufferL();
MCalenToolbar* toolbar = iServices.ToolbarOrNull();
CFindItemDialog* finder = CFindItemDialog::NewL( *iSearchBuf, CFindItemEngine::EFindItemSearchURLBin);
+ finder->EnableSingleClick(ETrue);
toolbar->SetToolbarVisibilityL(EFalse);
finder->ExecuteLD();
toolbar->SetToolbarVisibilityL(ETrue);
@@ -2833,6 +2791,7 @@
BuildSearchBufferL();
MCalenToolbar* toolbar = iServices.ToolbarOrNull();
CFindItemDialog* finder = CFindItemDialog::NewL( *iSearchBuf, CFindItemEngine::EFindItemSearchMailAddressBin);
+ finder->EnableSingleClick(ETrue);
toolbar->SetToolbarVisibilityL(EFalse);
finder->ExecuteLD();
toolbar->SetToolbarVisibilityL(ETrue);
--- a/calendarui/views/src/calenicondrawer.cpp Mon Jun 21 15:38:59 2010 +0300
+++ b/calendarui/views/src/calenicondrawer.cpp Thu Jul 15 18:37:27 2010 +0300
@@ -94,7 +94,7 @@
// (other items were commented in a header).
// ---------------------------------------------------------------------------
//
-void CCalenIconDrawer::SetIconSizesFromLayout(TInt aNumOfLinesBefLocField)
+void CCalenIconDrawer::SetIconSizesFromLayout()
{
TRACE_ENTRY_POINT;
@@ -121,16 +121,6 @@
icon_layout_rect.LayoutRect( list_cale_ev2_pane.Rect(), AknLayoutScalable_Apps::field_cale_ev2_pane_g3(2).LayoutLine() );
iThirdIconRect = icon_layout_rect.Rect();
- // Adjust the map icon size
- if(isMapIconAdded)
- {
- TInt mapIconIndex = IconIndex(MCalenServices::ECalenMapIcon);
- TAknLayoutRect field_cale_ev2_pane;
- field_cale_ev2_pane.LayoutRect(list_cale_ev2_pane.Rect(), AknLayoutScalable_Apps::field_cale_ev2_pane(aNumOfLinesBefLocField, 0, 0).LayoutLine() );
-
- icon_layout_rect.LayoutRect( field_cale_ev2_pane.Rect(), AknLayoutScalable_Apps::field_cale_ev2_pane_g4(0).LayoutLine() );
- SetMapIconSize(icon_layout_rect.Rect());
- }
AknIconUtils::SetSize( iIconArray->At(iFirstIconIndex)->Bitmap(), iFirstIconRect.Size() );
AknIconUtils::SetSize( iIconArray->At(iSecondIconIndex)->Bitmap(), iSecondIconRect.Size() );
AknIconUtils::SetSize( iIconArray->At(iThirdIconIndex)->Bitmap(), iThirdIconRect.Size() );
@@ -139,37 +129,6 @@
}
// ---------------------------------------------------------------------------
-// CCalenIconDrawer::SetMapIconSize
-// Fuction to set map icon size
-// (other items were commented in a header).
-// ---------------------------------------------------------------------------
-//
-void CCalenIconDrawer::SetMapIconSize(TRect aIconRect)
- {
- TRACE_ENTRY_POINT;
-
- if(iIconIndices[iFirstIconIndex] == MCalenServices::ECalenMapIcon)
- {
- iFirstIconRect = aIconRect;
- iFirstIconRect.iBr.iX = iFirstIconRect.iTl.iX + 30;
- iFirstIconRect.iBr.iY = iFirstIconRect.iTl.iY + 30;
- }
- else if(iIconIndices[iSecondIconIndex] == MCalenServices::ECalenMapIcon)
- {
- iSecondIconRect = aIconRect;
- iSecondIconRect.iBr.iX = iSecondIconRect.iTl.iX + 30;
- iSecondIconRect.iBr.iY = iSecondIconRect.iTl.iY + 30;
- }
- else if(iIconIndices[iThirdIconIndex] == MCalenServices::ECalenMapIcon)
- {
- iThirdIconRect = aIconRect;
- iThirdIconRect.iBr.iX = iThirdIconRect.iTl.iX + 30;
- iThirdIconRect.iBr.iY = iThirdIconRect.iTl.iY + 30;
- }
-
- TRACE_EXIT_POINT;
- }
-// ---------------------------------------------------------------------------
// CCalenIconDrawer::CCalenIconDrawer
// C++ constructor can NOT contain any code, that might leave.
// (other items were commented in a header).
--- a/calendarui/views/src/calenmonthcelllistboxitemdrawer.cpp Mon Jun 21 15:38:59 2010 +0300
+++ b/calendarui/views/src/calenmonthcelllistboxitemdrawer.cpp Thu Jul 15 18:37:27 2010 +0300
@@ -89,7 +89,23 @@
{
iGc->Clear( aItemTextRect );
}
+ TTime today( CalenDateUtils::Today() );
+ TTime currentDay( iCalendarMonthGrid->FirstDayOfGrid() +TTimeIntervalDays( aItemIndex ) );
+ TBool underline( CalenDateUtils::OnSameDay( today, currentDay ) );
+ if (underline)
+ {
+ TRgb seeThroughBack;
+ AknsUtils::GetCachedColor(AknsUtils::SkinInstance(),
+ seeThroughBack,
+ KAknsIIDQsnOtherColors,
+ EAknsCIQsnOtherColorsCG24);
+ iGc->SetBrushColor(seeThroughBack);
+ iGc->SetPenColor(seeThroughBack);
+ iGc->SetBrushStyle(CGraphicsContext::ESolidBrush);
+ iGc->DrawRect(aItemTextRect);
+ skinUsed = ETrue;
+ }
// Setup colors, mainly try to fetch them from skins.
// FIXME: investigate if this could be done somewhere else, so that we set them to
// properties of grid
@@ -98,7 +114,14 @@
colors.iBack = iBackColor;
colors.iText = iTextColor;
- if(aItemIsSelected)
+ if (underline)
+ {
+ AknsUtils::GetCachedColor(AknsUtils::SkinInstance(),
+ colors.iText,
+ KAknsIIDQsnTextColors,
+ EAknsCIQsnTextColorsCG85);
+ }
+ else if(aItemIsSelected)
{
// active month days
if(aItemIsCurrent)
@@ -132,10 +155,7 @@
// set underline if current day is today.
// (current day is day of item.)
- TTime today( CalenDateUtils::Today() );
- TTime currentDay( iCalendarMonthGrid->FirstDayOfGrid() +TTimeIntervalDays( aItemIndex ) );
- TBool underline( CalenDateUtils::OnSameDay( today, currentDay ) );
iGc->SetUnderlineStyle( underline ? EUnderlineOn : EUnderlineOff );
TPtrC cellData( iModel->ItemText(aItemIndex) );
--- a/calendarui/views/src/calenmonthcontainer.cpp Mon Jun 21 15:38:59 2010 +0300
+++ b/calendarui/views/src/calenmonthcontainer.cpp Thu Jul 15 18:37:27 2010 +0300
@@ -1706,7 +1706,7 @@
{
switch(aPointerEvent.iType)
{
- case TPointerEvent::EButton1Down:
+ case TPointerEvent::EButton1Up:
{
HandleWeekNumberTapL(aPointerEvent.iPosition);
break;
--- a/calendarui/views/src/calenmonthview.cpp Mon Jun 21 15:38:59 2010 +0300
+++ b/calendarui/views/src/calenmonthview.cpp Thu Jul 15 18:37:27 2010 +0300
@@ -413,7 +413,13 @@
TRACE_ENTRY_POINT;
CCalenMonthContainer* cnt = static_cast<CCalenMonthContainer*>( iContainer );
-
+ if(!cnt)
+ {
+ TRACE_EXIT_POINT;
+ iPopulationStep = EPopulationDone;
+ return CCalenView::EDone;
+ }
+
switch( iPopulationStep )
{
case ENothingDone:
--- a/clock2/clockui/uilayer/clockalarmeditor/inc/clockalarmeditorimpl.h Mon Jun 21 15:38:59 2010 +0300
+++ b/clock2/clockui/uilayer/clockalarmeditor/inc/clockalarmeditorimpl.h Thu Jul 15 18:37:27 2010 +0300
@@ -248,7 +248,10 @@
* @param aControlId The control that sent event EEventStateChanged
*/
void HandleControlStateChangeL( TInt aControlId );
-
+ /**
+ * @brief CurrentValueTextLC from base class
+ */
+ virtual HBufC* CurrentValueTextLC(){};
private: // Data
@@ -319,6 +322,8 @@
* @brief Object of alarm server session.
*/
RASCliSession iAlarmSrvSes;
+ CAknQueryValueTextArray* iAlmDayFieldTextArray;
+ CAknQueryValueText* iAlmDayFieldTextValue;
};
#endif // __CLOCK_ALARMEDITORIMPL_H__
--- a/clock2/clockui/uilayer/clockalarmeditor/src/clockalarmeditorimpl.cpp Mon Jun 21 15:38:59 2010 +0300
+++ b/clock2/clockui/uilayer/clockalarmeditor/src/clockalarmeditorimpl.cpp Thu Jul 15 18:37:27 2010 +0300
@@ -31,6 +31,9 @@
#include <aknnotewrappers.h>
#include <centralrepository.h>
#include <hlplch.h>
+#include <AknPopupField.h>
+#include <AknQueryValueText.h>
+#include <calenconstants.h>
// User includes
#include "clockalarmeditorimpl.h"
@@ -97,7 +100,15 @@
// Don't set the title pane text.
TRAP_IGNORE( SetTitleL( EFalse ) );
+ if(iAlmDayFieldTextValue)
+ {
+ delete iAlmDayFieldTextValue;
+ }
+ if(iAlmDayFieldTextArray)
+ {
+ delete iAlmDayFieldTextArray;
+ }
// Close the session with alarm server.
iAlarmSrvSes.Close();
@@ -391,13 +402,8 @@
//Single click integration
// Set the value to be displayed in the control.
- CAknPopupFieldText* alarmDaySelectionControl =
- static_cast< CAknPopupFieldText* > ( Control( EControlAlarmDayPopup ) );
- if ( alarmDaySelectionControl )
- {
- alarmDaySelectionControl->SetCurrentValueIndex( iDayIndex );
- }
+
// Now the alarm description.
HBufC* alarmDescription = HBufC::NewL( KMaxAlarmMessageLength );
@@ -689,12 +695,10 @@
__PRINTS( "CClockAlarmEditorImpl::HandleAlarmDayCmdL - Entry" );
//Single click integration
// Get the value to be stored in iDayIndex
- CAknPopupFieldText* alarmDaySelectionControl =
- (CAknPopupFieldText*)Control( EControlAlarmDayPopup );
- if ( alarmDaySelectionControl )
+ if ( iShowAlarmDayControl && iAlmDayFieldTextValue)
{
- iDayIndex = alarmDaySelectionControl->CurrentValueIndex();
+ iDayIndex = iAlmDayFieldTextValue->CurrentValueIndex();
}
}
@@ -825,8 +829,14 @@
// Insert the line at the position above.
InsertLineL( lineCount, R_CLOCK_ALARMDAY_POPUP_LINE, KZerothDay);
- CAknPopupFieldText* iAlmDayCtrl = static_cast< CAknPopupFieldText* > ( Control( EControlAlarmDayPopup ) );
- iAlmDayCtrl->SetCurrentValueIndex( dayIndex );
+ CDesCArrayFlat* workDaysList = iCoeEnv->ReadDesCArrayResourceL( R_CLOCK_WEEK_DAYS_ARRAY );
+ iAlmDayFieldTextArray = CAknQueryValueTextArray::NewL();
+ iAlmDayFieldTextArray->SetArray( *workDaysList );
+ iAlmDayFieldTextValue = CAknQueryValueText::NewL();
+ iAlmDayFieldTextValue->SetArrayL( iAlmDayFieldTextArray );
+ iAlmDayFieldTextValue->SetCurrentValueIndex(dayIndex);
+ CAknPopupField* aAlmDayCtrl = static_cast< CAknPopupField* > ( Control( EControlAlarmDayPopup ) );
+ aAlmDayCtrl->SetQueryValueL(iAlmDayFieldTextValue);
// Set the flag to indicate that the alarm day control is present in the form.
iShowAlarmDayControl = ETrue;
--- a/notepad/notepad1/LibSrc/NpdListDialog.cpp Mon Jun 21 15:38:59 2010 +0300
+++ b/notepad/notepad1/LibSrc/NpdListDialog.cpp Thu Jul 15 18:37:27 2010 +0300
@@ -974,13 +974,13 @@
// this must after InsertSendMenuItemAfterL
aMenuPane->DeleteMenuItem(ENotepadCmdOpen);
}
- if ( markCount >= 1 && IsNoteListDialog() )
+ if ( markCount >= 1 && IsNoteListDialog() && ( memoCount > 0 ) )
{
aMenuPane->SetItemSpecific( ENotepadCmdSend, EFalse );
aMenuPane->SetItemSpecific( ENotepadCmdDelete, EFalse );
}
- if ( IsTemplateListDialog() )
+ if ( IsTemplateListDialog() && ( memoCount > 0 ) )
{
aMenuPane->SetItemSpecific( ENotepadCmdSend, ETrue );
if ( markCount >= 1 )
--- a/pimappservices/calendar/group/agnmodel.iby Mon Jun 21 15:38:59 2010 +0300
+++ b/pimappservices/calendar/group/agnmodel.iby Thu Jul 15 18:37:27 2010 +0300
@@ -26,7 +26,7 @@
REM Configurable heap size for agenda server.
#ifndef AGENDA_SERVER_MAX_HEAPSIZE
-#define AGENDA_SERVER_MAX_HEAPSIZE 0x100000
+#define AGENDA_SERVER_MAX_HEAPSIZE 0x400000
#endif
file=ABI_DIR\BUILD_DIR\agnmodel.dll System\Libs\agnmodel.dll
--- a/pimappservices/calendar/server/src/agssess.cpp Mon Jun 21 15:38:59 2010 +0300
+++ b/pimappservices/calendar/server/src/agssess.cpp Thu Jul 15 18:37:27 2010 +0300
@@ -2066,6 +2066,16 @@
// Restore length
const TInt KBufferSize = iMessage.GetDesLength(KSlot2);
+ if (KBufferSize == KErrArgument)
+ {
+ PanicClientL(EIndexError);
+ }
+ else if (KBufferSize == KErrBadDescriptor)
+ {
+ PanicClientL(EBadDescriptor);
+ }
+ User::LeaveIfError(KBufferSize);
+
// Restore buffer
CBufFlat* buffer = CBufFlat::NewL(KBufferSize);
CleanupStack::PushL(buffer);