equal
deleted
inserted
replaced
22 #include <barsread.h> |
22 #include <barsread.h> |
23 #include <aknlayoutscalable_avkon.cdl.h> |
23 #include <aknlayoutscalable_avkon.cdl.h> |
24 #include <eikapp.h> |
24 #include <eikapp.h> |
25 #include <aknappui.h> |
25 #include <aknappui.h> |
26 #include <AknDef.h> |
26 #include <AknDef.h> |
|
27 #include <touchfeedback.h> |
27 |
28 |
28 #include "aknstyluspopupmenu.h" |
29 #include "aknstyluspopupmenu.h" |
29 #include "aknstyluspopupmenucontent.h" |
30 #include "aknstyluspopupmenucontent.h" |
30 |
31 |
31 const TInt KDefaultPopUpShowDelay = 0; |
32 const TInt KDefaultPopUpShowDelay = 0; |
193 iController->SetPopUpHideDelay( KDefaultPopUpHideDelay ); |
194 iController->SetPopUpHideDelay( KDefaultPopUpHideDelay ); |
194 } |
195 } |
195 |
196 |
196 TSize size(iController->Size()); |
197 TSize size(iController->Size()); |
197 iController->ShowPopUp(); |
198 iController->ShowPopUp(); |
198 |
199 if ( AknLayoutUtils::PenEnabled() ) |
|
200 { |
|
201 MTouchFeedback* feedback = MTouchFeedback::Instance(); |
|
202 if ( feedback ) |
|
203 { |
|
204 feedback->InstantFeedback( |
|
205 iContent, |
|
206 ETouchFeedbackPopUp, |
|
207 ETouchFeedbackVibra, |
|
208 TPointerEvent() ); |
|
209 } |
|
210 } |
199 if ( size.iWidth == 0 && size.iHeight == 0 ) |
211 if ( size.iWidth == 0 && size.iHeight == 0 ) |
200 { |
212 { |
201 if ( iPositionType != KErrNotFound ) |
213 if ( iPositionType != KErrNotFound ) |
202 { |
214 { |
203 SetPosition( iPosition, TPositionType( iPositionType ) ); |
215 SetPosition( iPosition, TPositionType( iPositionType ) ); |
389 |
401 |
390 iFlags.Set( EIdleDisabled ); |
402 iFlags.Set( EIdleDisabled ); |
391 TBool isDeleted = EFalse; |
403 TBool isDeleted = EFalse; |
392 iIsDeleted = &isDeleted; |
404 iIsDeleted = &isDeleted; |
393 |
405 |
|
406 CleanupStack::PushL( TCleanupItem( CleanLocalRef, this ) ); |
394 iMenuObserver->ProcessCommandL( iContent->CurrentCommandId() ); |
407 iMenuObserver->ProcessCommandL( iContent->CurrentCommandId() ); |
395 |
408 CleanupStack::Pop(); |
|
409 |
396 if ( isDeleted ) |
410 if ( isDeleted ) |
397 { |
411 { |
398 return; |
412 return; |
399 } |
413 } |
400 |
414 |
508 { |
522 { |
509 delete iController; |
523 delete iController; |
510 iController = NULL; |
524 iController = NULL; |
511 } |
525 } |
512 } |
526 } |
|
527 |
|
528 // ----------------------------------------------------------------------------- |
|
529 // CAknStylusPopUpMenu::CleanLocalRef |
|
530 // ----------------------------------------------------------------------------- |
|
531 // |
|
532 void CAknStylusPopUpMenu::CleanLocalRef( TAny* any ) |
|
533 { |
|
534 static_cast<CAknStylusPopUpMenu*>( any )->iIsDeleted = NULL; |
|
535 } |