calendarui/controller/src/calenviewmanager.cpp
changeset 63 a3cb48f6c889
parent 57 bb2d3e476f29
child 64 1881ad52dc45
--- a/calendarui/controller/src/calenviewmanager.cpp	Mon Aug 09 18:30:52 2010 +0530
+++ b/calendarui/controller/src/calenviewmanager.cpp	Wed Aug 25 14:02:13 2010 +0530
@@ -944,10 +944,12 @@
 	// solution for the month view implements the construction in two phases so 
 	// it needs to be refactored and a common solution needs to be put here. So 
 	// that code doesn't break if another view is added tomorow
-	if (mCalenMonthView) {
+	HbView *currentview = mController.MainWindow().currentView();
+	
+	if (mCalenMonthView && currentview == mCalenMonthView) {
 		mCalenMonthView->fetchEntriesAndUpdateModel();
 	}
-	else if (mCalenAgendaView) {
+	else if (mCalenAgendaView && currentview == mCalenAgendaView) {
 		mCalenAgendaView->doPopulation();
 	}
 	// Calls the emitAppReady function of CalenController. Need to emit this
@@ -1039,4 +1041,53 @@
     OstTraceFunctionExit0( CALENVIEWMANAGER_LAUNCHSETTINGSVIEW_EXIT );
 }
 
+
+// ----------------------------------------------------------------------------
+// CalenViewManager::removeSettingsView
+// remove settings view
+// ----------------------------------------------------------------------------
+//
+void CalenViewManager::removeSettingsView()
+{
+    if(mSettingsView){
+        mController.Services().MainWindow().removeView(mSettingsView);
+    }
+}
+    
+// ----------------------------------------------------------------------------
+// CalenViewManager::isEventViewerActive
+// check if Agenda Event Viewer is active
+// ----------------------------------------------------------------------------
+//
+bool CalenViewManager::isEventViewerActive()
+{
+   if(mCalenEventViewer)
+       return true;
+   else
+       return false;
+}
+
+// ----------------------------------------------------------------------------
+// CalenViewManager::saveAndCloseEditor
+// save the entry and close the editor
+// isEventViewerActive() should be called before this function
+// ----------------------------------------------------------------------------
+//
+void CalenViewManager::saveAndCloseEditor()
+{
+   mCalenEventViewer->saveAndCloseEditor();
+}
+
+// ----------------------------------------------------------------------------
+// CalenViewManager::closeAgendaEventView
+// close the agenda event view 
+// isEventViewerActive() should be called before this function
+// ----------------------------------------------------------------------------
+//
+void CalenViewManager::closeAgendaEventView()
+{
+   mCalenEventViewer->closeAgendaEventView();
+}
+
+
 // End of file	--Don't remove this.