--- a/calendarui/controller/src/calendeleteui.cpp Mon Sep 06 15:58:44 2010 +0530
+++ b/calendarui/controller/src/calendeleteui.cpp Mon Sep 20 12:44:39 2010 +0530
@@ -107,6 +107,7 @@
RArray<TCalenNotification> notifications;
notifications.Append(ECalenNotifyCancelDelete);
notifications.Append(ECalenNotifyCloseDialogs);
+ notifications.Append(ECalenNotifySystemLocaleChanged);
iController.RegisterForNotificationsL( this, notifications );
@@ -115,6 +116,7 @@
iMoreEntriesToDelete = EFalse;
iDisplayQuery = EFalse;
iEntriesToDelete = KEntriesToDelete;
+ mDatePicker = 0;
OstTraceFunctionExit0( CALENDELETEUI_CONSTRUCTL_EXIT );
}
@@ -128,24 +130,33 @@
void CalenDeleteUi::HandleNotification(const TCalenNotification aNotification )
{
OstTraceFunctionEntry0( CALENDELETEUI_HANDLENOTIFICATION_ENTRY );
-
- if( aNotification == ECalenNotifyCancelDelete)
- {
- if(iMutlipleContextIdsCount)
- {
- // get the context
- MCalenContext& context = iController.context();
- // reset the multiple contexts
- context.resetMultipleContextIds();
-
- }
+ switch(aNotification) {
+ case ECalenNotifyCancelDelete: {
+ if(iMutlipleContextIdsCount)
+ {
+ // get the context
+ MCalenContext& context = iController.context();
+ // reset the multiple contexts
+ context.resetMultipleContextIds();
+ }
+ break;
}
- else if (aNotification == ECalenNotifyCloseDialogs )
- {
- // Emit the signal to close all the dialogs which are already opened
- emit closeDialogs();
+ case ECalenNotifyCloseDialogs: {
+ // Emit the signal to close all the dialogs which are already opened
+ emit closeDialogs();
+ break;
}
-
+ case ECalenNotifySystemLocaleChanged: {
+ //Refresh the date picker of Date query when deleting entries before date
+ if(!(mDatePicker.isNull())) {
+ mDatePicker->setDisplayFormat(CalenDateUtils::dateFormatString());
+ mDatePicker->setDate(QDate::currentDate());
+ }
+ break;
+ }
+ default:
+ break;
+ }
OstTraceFunctionExit0( CALENDELETEUI_HANDLENOTIFICATION_EXIT );
}
@@ -411,6 +422,7 @@
mDatePicker = new HbDateTimePicker(popUp);
mDatePicker->setMinimumDate(CalenDateUtils::minTime().date());
mDatePicker->setMaximumDate(currentDate);
+ mDatePicker->setDisplayFormat(CalenDateUtils::dateFormatString());
mDatePicker->setDate(currentDate);
popUp->setContentWidget(mDatePicker);