diff -r 1881ad52dc45 -r a5ed90760192 calendarui/views/src/calennativeview.cpp --- a/calendarui/views/src/calennativeview.cpp Tue Aug 31 18:15:13 2010 +0530 +++ b/calendarui/views/src/calennativeview.cpp Mon Sep 06 10:12:45 2010 +0530 @@ -65,6 +65,7 @@ notificationArray.Append(ECalenNotifySystemTimeChanged); notificationArray.Append(ECalenNotifySystemLocaleChanged); notificationArray.Append(ECalenNotifyContextChanged); + notificationArray.Append(ECalenNotifyCloseDialogs); mServices.RegisterForNotificationsL(this, notificationArray); @@ -130,6 +131,7 @@ // Create a popup with datepicker for the user to select date. HbDialog *popUp = new HbDialog(); + popUp->setParent(this); popUp->setDismissPolicy(HbDialog::NoDismiss); popUp->setTimeout(HbDialog::NoTimeout); popUp->setAttribute( Qt::WA_DeleteOnClose, true ); @@ -149,6 +151,10 @@ popUp->addAction(okAction); connect(okAction, SIGNAL(triggered()), this, SLOT(goToSelectedDate())); popUp->addAction(new HbAction(hbTrId("txt_common_button_cancel"), popUp)); + + // Close the popup once closeDialogs() is received + connect(this, SIGNAL(closeDialogs()), popUp, SLOT(close())); + popUp->open(); OstTraceFunctionExit0( CALENNATIVEVIEW_GOTODATE_EXIT ); @@ -236,6 +242,11 @@ onContextChanged(); } break; + case ECalenNotifyCloseDialogs: { + // Emit the signal to close the dialogs which are already opened + emit closeDialogs(); + } + break; default: break; }