calendarui/controller/src/calensettingsstate.cpp
changeset 18 c198609911f9
parent 0 f979ecb2b13e
child 45 b6db4fd4947b
child 49 5de72ea7a065
equal deleted inserted replaced
0:f979ecb2b13e 18:c198609911f9
     1 /*
     1 /*
     2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 // includes
    19 // includes
    20 #include <calentoolbar.h>
       
    21 
       
    22 #include "calensettingsstate.h"
    20 #include "calensettingsstate.h"
    23 #include "calendarui_debug.h"           // Debug macros
    21 #include "calendarui_debug.h"           // Debug macros
    24 #include "calencontroller.h"
    22 #include "calencontroller.h"
    25 #include "calenstatemachine.h"
    23 #include "calenstatemachine.h"
    26 #include "calennotifier.h"
    24 #include "calennotifier.h"
   102             SetCurrentState( aStateMachine, CCalenStateMachine::ECalenIdleState );
   100             SetCurrentState( aStateMachine, CCalenStateMachine::ECalenIdleState );
   103             ActivateCurrentStateL(aStateMachine);
   101             ActivateCurrentStateL(aStateMachine);
   104             cmdUsed = ETrue;
   102             cmdUsed = ETrue;
   105             }
   103             }
   106             break;
   104             break;
   107         case ECalenMissedEventViewFromIdle:
   105         case ECalenMonthView:
       
   106         case ECalenDayView:
       
   107         case ECalenLandscapeDayView:
       
   108         case ECalenStartActiveStep:
   108             {
   109             {
   109             cmdUsed = ETrue;
   110             // set previous state to idle
   110             break;
   111             CCalenStateMachine::TCalenStateIndex cachedState = CCalenStateMachine::ECalenIdleState;
   111             }
   112             SetCurrentState( aStateMachine, CCalenStateMachine::ECalenPopulationState );
   112         case ECalenEventViewFromAlarm:
   113             SetCurrentPreviousState( aStateMachine, cachedState );
   113         case ECalenEventViewFromAlarmStopOnly:
   114             ActivateCurrentStateL(aStateMachine);               
   114         case ECalenDayView:
       
   115             {
       
   116             cmdUsed = ETrue;
   115             cmdUsed = ETrue;
   117             }
   116             }
   118             break;
   117             break;
   119         default:
   118         default:
   120             break;
   119             break;
   138     TRACE_ENTRY_POINT;
   137     TRACE_ENTRY_POINT;
   139     
   138     
   140     switch( aNotification )
   139     switch( aNotification )
   141         {
   140         {
   142         case ECalenNotifyPluginEnabledDisabled:
   141         case ECalenNotifyPluginEnabledDisabled:
   143         case ECalenNotifyEComRegistryChanged:    
       
   144             {
   142             {
   145      		CCalenState::HandleNotificationL( aNotification, aStateMachine );
   143 			 CCalenState::HandleNotificationL( aNotification, aStateMachine );
   146             }
   144             }
   147             break;
   145             break;
   148         case ECalenNotifySettingsClosed:
   146         case ECalenNotifySettingsClosed:
   149             {
   147             {
   150             // Settings closed, go back to previous state.
   148             // Settings closed, go back to previous state.