176 TBool CSelectWLANDlg::OkToExitL( TInt aButtonId ) |
176 TBool CSelectWLANDlg::OkToExitL( TInt aButtonId ) |
177 { |
177 { |
178 CLOG_ENTERFN( "CSelectWLANDlg::OkToExitL " ); |
178 CLOG_ENTERFN( "CSelectWLANDlg::OkToExitL " ); |
179 |
179 |
180 TBool result( EFalse ); |
180 TBool result( EFalse ); |
181 if ( aButtonId == EAknSoftkeySelect || aButtonId == EAknSoftkeyOk ) |
181 |
|
182 if ( ( aButtonId == EAknSoftkeySelect || aButtonId == EAknSoftkeyOk ) && |
|
183 !iFromOkToExit ) |
182 { |
184 { |
183 __ASSERT_DEBUG( iPlugin, User::Panic( KErrNullPointer, KErrNone ) ); |
185 __ASSERT_DEBUG( iPlugin, User::Panic( KErrNullPointer, KErrNone ) ); |
184 |
186 |
185 iFromOkToExit = ETrue; |
187 iFromOkToExit = ETrue; |
186 |
188 |
584 // --------------------------------------------------------- |
586 // --------------------------------------------------------- |
585 // |
587 // |
586 TKeyResponse CSelectWLANDlg::OfferKeyEventL( const TKeyEvent& aKeyEvent, |
588 TKeyResponse CSelectWLANDlg::OfferKeyEventL( const TKeyEvent& aKeyEvent, |
587 TEventCode aType) |
589 TEventCode aType) |
588 { |
590 { |
589 if( NeedToDismissQueryL(aKeyEvent) ) |
591 if( aType == EEventKey && aKeyEvent.iCode == EKeyPhoneSend ) |
590 { |
592 { |
591 return EKeyWasConsumed; |
593 // Let's not obscure the Dialer in the background |
592 } |
594 if ( iExpiryTimer && !iFromOkToExit ) |
593 |
595 { |
594 return CAknListQueryDialog::OfferKeyEventL(aKeyEvent,aType); |
596 iExpiryTimer->Cancel(); |
595 } |
597 iExpiryTimer->StartShort(); |
596 |
598 } |
597 // --------------------------------------------------------- |
|
598 // CSelectWLANDlg::NeedToDismissQueryL |
|
599 // --------------------------------------------------------- |
|
600 // |
|
601 TBool CSelectWLANDlg::NeedToDismissQueryL(const TKeyEvent& aKeyEvent) |
|
602 { |
|
603 if (aKeyEvent.iCode == EKeyPhoneSend) |
|
604 { |
|
605 TryExitL(EEikBidCancel); |
|
606 return ETrue; |
|
607 } |
599 } |
608 |
600 |
609 return EFalse; |
601 return CAknListQueryDialog::OfferKeyEventL( aKeyEvent,aType ); |
610 } |
602 } |
611 |
603 |
612 // --------------------------------------------------------- |
604 // --------------------------------------------------------- |
613 // CSelectWLANDlg::ShowInfoNoteL |
605 // CSelectWLANDlg::ShowInfoNoteL |
614 // --------------------------------------------------------- |
606 // --------------------------------------------------------- |