calendarui/controller/src/calenbackgroundstate.cpp
changeset 18 c198609911f9
parent 0 f979ecb2b13e
child 45 b6db4fd4947b
--- a/calendarui/controller/src/calenbackgroundstate.cpp	Tue Feb 02 10:12:19 2010 +0200
+++ b/calendarui/controller/src/calenbackgroundstate.cpp	Fri Apr 16 14:57:40 2010 +0300
@@ -11,12 +11,11 @@
 *
 * Contributors:
 *
-* Description:   Calendar state machine
+* Description:  Calendar state machine
 *
 */
 
 
-
 // includes
 #include "calenbackgroundstate.h"
 #include "calendarui_debug.h"           // Debug macros
@@ -109,22 +108,8 @@
             SetCurrentState(aStateMachine,CCalenStateMachine::ECalenViewingState);
             cmdUsed = ETrue;
             break;
-        case ECalenEventViewFromAlarm:
-        case ECalenEventViewFromAlarmStopOnly:
-            SetCurrentState(aStateMachine,CCalenStateMachine::ECalenAlarmState);
-            cmdUsed = ETrue;
-            break;
-        case ECalenFasterAppExit:
-        	if(iPreviousState == CCalenStateMachine::ECalenMapState)
-				{
-				// Issue map launch cancel notification
-				iController.BroadcastNotification(ECalenNotifyCancelMapLaunch);
-		        SetCurrentState( aStateMachine, CCalenStateMachine::ECalenIdleState );
-		        ActivateCurrentStateL(aStateMachine);
-		        cmdUsed = ETrue;
-		        break;
-		   		}
-        	else if(iPreviousState == CCalenStateMachine::ECalenDeletingState)
+        case ECalenFasterAppExit:        	
+			if(iPreviousState == CCalenStateMachine::ECalenDeletingState)
         	    {
                 // Issue ECalenNotifyDeleteFailed notification to cancel the delete
                 iController.BroadcastNotification(ECalenNotifyDeleteFailed);
@@ -132,20 +117,21 @@
                 ActivateCurrentStateL(aStateMachine);
                 cmdUsed = ETrue;                 
         	    }
-        	else if( iPreviousState == CCalenStateMachine::ECalenSettingsState
+        	else
+				{
+				if( iPreviousState == CCalenStateMachine::ECalenSettingsState
         	       || iPreviousState == CCalenStateMachine::ECalenEditingState
-        	       || iPreviousState == CCalenStateMachine::ECalenSendingState 
-        	       || iPreviousState == CCalenStateMachine::ECalenIdleState 
-                   || iPreviousState == CCalenStateMachine::ECalenViewingState)
-        	    {
-                SetCurrentState( aStateMachine, CCalenStateMachine::ECalenIdleState );
-                ActivateCurrentStateL(aStateMachine);
-                cmdUsed = ETrue;                 
-        	    }
+        	       || iPreviousState == CCalenStateMachine::ECalenSendingState )
+	        	    {
+	                SetCurrentState( aStateMachine, CCalenStateMachine::ECalenIdleState );
+	                ActivateCurrentStateL(aStateMachine);
+	                cmdUsed = ETrue;                 
+	        	    }
+				}
         default:
             break;
         }
-    if(cmdUsed)
+    
     RequestCallbackL( handler, aCommand );
     
     TRACE_EXIT_POINT;