calendarui/controller/src/calencmdlinelauncher.cpp
branchRCL_3
changeset 36 9c5b1510919f
parent 30 d68a4b5d5885
child 48 bf573002ff72
equal deleted inserted replaced
30:d68a4b5d5885 36:9c5b1510919f
    32 #include "calencmdlinelauncher.h"
    32 #include "calencmdlinelauncher.h"
    33 #include "calencontroller.h"            // CCalenController
    33 #include "calencontroller.h"            // CCalenController
    34 #include "calencmdlineparser.h"         // CCalCmdLineParser
    34 #include "calencmdlineparser.h"         // CCalCmdLineParser
    35 #include "CalenUid.h"
    35 #include "CalenUid.h"
    36 #include "calensend.h"
    36 #include "calensend.h"
       
    37 #include "calendialogshutter.h"
    37 
    38 
    38 // ================= MEMBER FUNCTIONS =======================
    39 // ================= MEMBER FUNCTIONS =======================
    39 
    40 
    40 // ---------------------------------------------------------
    41 // ---------------------------------------------------------
    41 // CCalenCmdLineLauncher::CCalenCmdLineLauncher
    42 // CCalenCmdLineLauncher::CCalenCmdLineLauncher
    90         {
    91         {
    91         iGlobalData->Release();
    92         iGlobalData->Release();
    92         }
    93         }
    93 
    94 
    94     delete iCalendarLaunchCallBack;
    95     delete iCalendarLaunchCallBack;
       
    96     
       
    97     if ( iShutter )
       
    98         {
       
    99         delete iShutter;
       
   100         iShutter = NULL;
       
   101         }
    95 
   102 
    96     TRACE_EXIT_POINT;
   103     TRACE_EXIT_POINT;
    97     }
   104     }
    98 
   105 
    99 // ----------------------------------------------------------------------------
   106 // ----------------------------------------------------------------------------
   117     exitFlags.Append(ECalenNotifyEntryClosed);
   124     exitFlags.Append(ECalenNotifyEntryClosed);
   118     
   125     
   119     iController.RegisterForNotificationsL( this, exitFlags );
   126     iController.RegisterForNotificationsL( this, exitFlags );
   120     
   127     
   121     exitFlags.Reset();
   128     exitFlags.Reset();
   122 
   129     iShutter = CCalenDialogShutter::NewL( CEikonEnv::Static() );
   123     TRACE_EXIT_POINT;
   130     TRACE_EXIT_POINT;
   124     }
   131     }
   125 
   132 
   126 // ----------------------------------------------------------------------------
   133 // ----------------------------------------------------------------------------
   127 // CCalenCmdLineLauncher::ProcessCommandParametersL
   134 // CCalenCmdLineLauncher::ProcessCommandParametersL
   151             {
   158             {
   152             iIsExitOnDlgClose = EFalse;
   159             iIsExitOnDlgClose = EFalse;
   153             // Tell the editui that whatever it was doing, it should not alter
   160             // Tell the editui that whatever it was doing, it should not alter
   154             // the focus state
   161             // the focus state
   155             iController.IssueCommandL( ECalenNotifyFocusChange );
   162             iController.IssueCommandL( ECalenNotifyFocusChange );
   156 
   163             
   157             // Send a key event to the currently open dialog (viewer / editor)
   164             iShutter->Cancel();
   158             // to dismiss it
   165             //close all open dialogs in asynchronous way
   159             /*TKeyEvent key;
   166             iShutter->ShutDialogsL();
   160             key.iRepeats = 0;
       
   161             key.iCode = EKeyEscape;
       
   162             key.iModifiers = 0;
       
   163             CCoeEnv::Static()->SimulateKeyEventL( key, EEventKey );*/
       
   164             AknDialogShutter::ShutDialogsL( *CEikonEnv::Static() );
       
   165             // Break is added to close the messaging editor as the messagng editor is not 
       
   166             // consuming the escape key event.
       
   167             /*if( iGlobalData->CalenSendL().IsMessagingEditorOpen() )
       
   168                 {
       
   169             break;
       
   170                 }*/
       
   171                  
       
   172             }
   167             }
   173 
   168 
   174         // Interpret 8bit data as 16bit unicode data
   169         // Interpret 8bit data as 16bit unicode data
   175         //lint -e{826} Disable the lint warning of the pointer sizes being different
   170         //lint -e{826} Disable the lint warning of the pointer sizes being different
   176         const TText* buf = reinterpret_cast<const TText*> (aTail.Ptr());
   171         const TText* buf = reinterpret_cast<const TText*> (aTail.Ptr());