cellular/PsetNotesUi/Src/PsuiQueryDialog.cpp
branchRCL_3
changeset 19 7d48bed6ce0c
parent 18 594d59766373
child 20 987c9837762f
equal deleted inserted replaced
18:594d59766373 19:7d48bed6ce0c
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 // INCLUDE FILES
    19 // INCLUDE FILES
    20 #include "PsuiQueryDialog.h"
    20 #include "psuiquerydialog.h" 
    21 
    21 
    22 // ================= MEMBER FUNCTIONS =======================
    22 // ================= MEMBER FUNCTIONS =======================
    23 
    23 
    24 // C++ default constructor can NOT contain any code, that
    24 // C++ default constructor can NOT contain any code, that
    25 // might leave.
    25 // might leave.
    26 //
    26 //
    27 CPsuiQueryDialog::CPsuiQueryDialog( CAknQueryDialog::TTone aTone ) :
    27 CPsuiQueryDialog::CPsuiQueryDialog( CAknQueryDialog::TTone aTone ) :
    28 	CAknQueryDialog( aTone ) 
    28     CAknQueryDialog( aTone ) 
    29     {
    29     {
    30     }
    30     }
    31 
    31 
    32 // ---------------------------------------------------------------------------
    32 // ---------------------------------------------------------------------------
    33 // Symbian OS two-phased constructor.
    33 // Symbian OS two-phased constructor.
    51 // ---------------------------------------------------------------------------
    51 // ---------------------------------------------------------------------------
    52 //
    52 //
    53 TKeyResponse CPsuiQueryDialog::OfferKeyEventL( const TKeyEvent& aKeyEvent,
    53 TKeyResponse CPsuiQueryDialog::OfferKeyEventL( const TKeyEvent& aKeyEvent,
    54     TEventCode aType )
    54     TEventCode aType )
    55     {
    55     {
    56     const TBool noKeyReleased = 
    56     if ( ( aKeyEvent.iScanCode == EStdKeyNo || aKeyEvent.iCode == EKeyNo  ) &&
    57         ( aKeyEvent.iScanCode == EStdKeyNo || aKeyEvent.iCode == EKeyNo  ) &&
    57          aType == EEventKeyUp )
    58           aType == EEventKeyUp;    
    58         {
    59     const TBool escPressed = aKeyEvent.iCode == EKeyEscape;
    59         // End -key was pressed, so exit this query dialog
    60     
    60         TryExitL( EKeyNo );
    61     // AknDialogShutter sends esc keys so dismiss dialog 
    61         }
    62 	if ( noKeyReleased || escPressed )
       
    63 		{
       
    64 		// End -key was pressed, so exit this query dialog
       
    65 		TryExitL( EKeyNo ); 
       
    66 		RDebug::Printf("PSETNOTESUI: exiting dialog");
       
    67 		return EKeyWasConsumed;
       
    68 		}
       
    69 
    62 
    70 	return EKeyWasNotConsumed;
    63     return EKeyWasNotConsumed;
    71     }
    64     }
    72 
    65 
    73 // ---------------------------------------------------------------------------
    66 // ---------------------------------------------------------------------------
    74 // CPsuiQueryDialog::OkToExitL
    67 // CPsuiQueryDialog::OkToExitL
    75 // ---------------------------------------------------------------------------
    68 // ---------------------------------------------------------------------------
    76 //
    69 //
    77 TBool CPsuiQueryDialog::OkToExitL( TInt /*aCommand*/ )
    70 TBool CPsuiQueryDialog::OkToExitL( TInt /*aCommand*/ )
    78     {
    71     {
    79 	// Dismiss query
    72     // Dismiss query
    80     return ETrue;
    73     return ETrue;
    81     }
    74     }
    82 
    75 
    83 // End of File
    76 // End of File