diff -r aecbbf00d063 -r d48ab3b357f1 uifw/AvKon/src/aknlistquerydialog.cpp --- a/uifw/AvKon/src/aknlistquerydialog.cpp Tue Aug 31 15:28:30 2010 +0300 +++ b/uifw/AvKon/src/aknlistquerydialog.cpp Wed Sep 01 12:16:19 2010 +0100 @@ -19,8 +19,7 @@ #include #include #include -#include -#include +#include #include "aknPopupHeadingPane.h" #include "aknlistquerycontrol.h" @@ -58,6 +57,7 @@ #endif #include // for testability hooks +#include "akntrace.h" NONSHARABLE_CLASS(CAknListQueryMediatorObserver): public CBase, public MAknDialogMediatorObserver { public: @@ -161,32 +161,38 @@ EXPORT_C CAknListQueryDialog::CAknListQueryDialog(TInt* aIndex) : CAknQueryDialog(ENoTone) { + _AKNTRACE_FUNC_ENTER; iIndex = aIndex; iEnterKeyPressed = EFalse; GfxTransEffect::Register(this,KGfxContextMenuControlUid); AKNTASHOOK_ADD( this, "CAknListQueryDialog" ); + _AKNTRACE_FUNC_EXIT; } EXPORT_C CAknListQueryDialog::CAknListQueryDialog(CListBoxView::CSelectionIndexArray* aSelectionIndexArray) : CAknQueryDialog(ENoTone) { + _AKNTRACE_FUNC_ENTER; iSelectionIndexArray = aSelectionIndexArray; iEnterKeyPressed = EFalse; GfxTransEffect::Register(this,KGfxContextMenuControlUid); AKNTASHOOK_ADD( this, "CAknListQueryDialog" ); + _AKNTRACE_FUNC_EXIT; } EXPORT_C CAknListQueryDialog::~CAknListQueryDialog() { + _AKNTRACE( "[%s][%s] Enter", "CAknListQueryDialog", "~CAknListQueryDialog" ); AKNTASHOOK_REMOVE(); if (iMediatorObs) CEikDialog::SetMediatorObserver(0); // Cover UI support cannot handle dialog it self as external observer delete iMediatorObs; delete iIdle; + _AKNTRACE( "[%s][%s] Exit", "CAknListQueryDialog", "~CAknListQueryDialog" ); } EXPORT_C CEikListBox *CAknListQueryDialog::ListBox() const @@ -233,6 +239,7 @@ EXPORT_C void CAknListQueryDialog::PreLayoutDynInitL() { + _AKNTRACE_FUNC_ENTER; CAknListQuerySearchControl *control1 = (CAknListQuerySearchControl*)ControlOrNull(EFindControl); CAknSearchField *control = NULL; CAknSearchField::TSearchFieldStyle flags = CAknSearchField::EPopupWindow; @@ -268,10 +275,12 @@ SetLineNonFocusing(EListQueryControl); Line(EFindControl)->SetDrawNoWhiteBackground(ETrue); } + _AKNTRACE_FUNC_EXIT; } EXPORT_C void CAknListQueryDialog::SetIconArrayL(CArrayPtr* aIcons) { + _AKNTRACE_FUNC_ENTER; CEikFormattedCellListBox* listbox = STATIC_CAST(CEikFormattedCellListBox*,ListBox()); CArrayPtr* oldicons = listbox->ItemDrawer()->FormattedCellData()->IconArray(); @@ -281,10 +290,12 @@ delete oldicons; } listbox->ItemDrawer()->FormattedCellData()->SetIconArrayL(aIcons); + _AKNTRACE_FUNC_EXIT; } EXPORT_C void CAknListQueryDialog::PostLayoutDynInitL() { + _AKNTRACE_FUNC_ENTER; CEikFormattedCellListBox* listbox = STATIC_CAST(CEikFormattedCellListBox*,ListBox()); // Now we'll load default icons if existing icon array does not exists. @@ -317,10 +328,12 @@ CleanupStack::Pop(); // icon for EMbmAvkonQgn_prop_checkbox_on CleanupStack::Pop(); // icons array } + _AKNTRACE_FUNC_EXIT; } EXPORT_C void CAknListQueryDialog::SetSizeAndPosition(const TSize & /*aSize*/) { + _AKNTRACE_FUNC_ENTER; AknPopupLayouts::TAknPopupLayouts layout = AknPopupLayouts::EMenuWindow; CAknListQueryControl *control = ListControl(); @@ -409,12 +422,13 @@ boxData->SetSkinPopupFrame(&KAknsIIDQsnFrPopup,&KAknsIIDQsnFrPopupCenter); boxData->SetSkinPopupFramePosition(outerRect,innerRect); - + _AKNTRACE_FUNC_EXIT; } EXPORT_C void CAknListQueryDialog::HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType) { + _AKNTRACE( "[%s][%s] aEventType: %d", "CAknListQueryDialog", "HandleListBoxEventL", aEventType); if ( AknLayoutUtils::PenEnabled() ) { switch(aEventType) @@ -471,6 +485,7 @@ } } } + _AKNTRACE_FUNC_EXIT; } @@ -506,6 +521,8 @@ EXPORT_C TKeyResponse CAknListQueryDialog::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType) { + _AKNTRACE( "[%s][%s] aKeyEvent.iCode: %d", "CAknListQueryDialog", "OfferKeyEventL", aKeyEvent.iCode); + _AKNTRACE( "[%s][%s] aType: %d", "CAknListQueryDialog", "OfferKeyEventL", aType); if (aType==EEventKey && aKeyEvent.iCode == EKeyEscape) { CloseState(); @@ -591,6 +608,7 @@ EXPORT_C TBool CAknListQueryDialog::OkToExitL(TInt aButtonId) { + _AKNTRACE( "[%s][%s] aButtonId: %d", "CAknListQueryDialog", "OkToExitL", aButtonId); CEikListBox* listbox = ListBox(); if(aButtonId == GetLeftCBAShortKeyPress() || aButtonId == EEikBidOk) @@ -618,10 +636,15 @@ for(TInt i(0); iAppendL(array->At(i)); } + _AKNTRACE( "[%s][%s] return ETrue", "CAknListQueryDialog", "OkToExitL"); return ETrue; } else if(aButtonId == GetRightCBAShortKeyPress()) - return ETrue; + { + _AKNTRACE( "[%s][%s] return ETrue", "CAknListQueryDialog", "OkToExitL"); + return ETrue; + } + _AKNTRACE( "[%s][%s] return EFalse", "CAknListQueryDialog", "OkToExitL"); return EFalse; } @@ -636,11 +659,14 @@ EXPORT_C void CAknListQueryDialog::CloseState() { + _AKNTRACE_FUNC_ENTER; TRAP_IGNORE(TryExitL(EAknSoftkeyCancel)); + _AKNTRACE_FUNC_EXIT; } EXPORT_C void CAknListQueryDialog::ActivateL() { + _AKNTRACE_FUNC_ENTER; TBool notShowingPopup = ListBox()->Model()->NumberOfItems() == 0; if (notShowingPopup) { @@ -671,45 +697,22 @@ { CAknQueryDialog::ActivateL(); } + _AKNTRACE_FUNC_EXIT; } TInt CAknListQueryDialog::ClosePopup(TAny *aObj) { + _AKNTRACE_FUNC_ENTER; CAknListQueryDialog *popup = (CAknListQueryDialog*)aObj; delete popup->iIdle; popup->iIdle = 0; popup->CloseState(); + _AKNTRACE_FUNC_EXIT; return EFalse; } EXPORT_C void CAknListQueryDialog::HandlePointerEventL(const TPointerEvent& aPointerEvent) { - // list query is dismissed if tapped outside - if ( aPointerEvent.iType == TPointerEvent::EButton1Down ) - { - if( !Rect().Contains( aPointerEvent.iPosition ) ) - { - if ( !iIdle ) - { - MTouchFeedback* feedback = MTouchFeedback::Instance(); - if ( feedback ) - { - feedback->InstantFeedback( ETouchFeedbackPopUp ); - } - iIdle = CIdle::NewL(CActive::EPriorityIdle); - iIdle->Start(TCallBack(ClosePopup, this)); - return; - } - } - - TInt index; - if ( ListBox()->View()->XYPosToItemIndex( aPointerEvent.iPosition, index ) ) - { - ListBox()->View()->ItemDrawer()->SetFlags( - CListItemDrawer::EPressedDownState ); - } - } - CAknQueryDialog::HandlePointerEventL( aPointerEvent ); } @@ -721,23 +724,30 @@ TInt CAknListQueryDialog::ClosePopupAcceptingChanges(TAny *aObj) { + _AKNTRACE_FUNC_ENTER; if ( AknLayoutUtils::PenEnabled() ) { CAknListQueryDialog *popup = (CAknListQueryDialog*)aObj; delete popup->iIdle; popup->iIdle = NULL; TRAP_IGNORE( popup->TryExitL( EAknSoftkeyOk ) ); + _AKNTRACE_FUNC_EXIT; return EFalse; } else { + _AKNTRACE_FUNC_EXIT; return EFalse; } } -EXPORT_C void* CAknListQueryDialog::ExtensionInterface( TUid /*aInterface*/ ) - { +EXPORT_C void* CAknListQueryDialog::ExtensionInterface( TUid aInterface ) + { + if(aInterface == KExIfTactileFeedbackUid) + { + return MTouchFeedback::Instance(); + } return NULL; } @@ -771,6 +781,7 @@ EXPORT_C void CAknListQueryDialog::HandleResourceChange(TInt aType) { + _AKNTRACE_FUNC_ENTER; if (aType==KEikDynamicLayoutVariantSwitch) { if (MessageBox()) @@ -778,7 +789,8 @@ MessageBox()->SizeChanged(); } } - CAknQueryDialog::HandleResourceChange(aType); + CAknQueryDialog::HandleResourceChange(aType); + _AKNTRACE_FUNC_EXIT; } EXPORT_C void CAknListQueryDialog::PublishDialogL(TInt aDialogIndex, TUid aCatUid, CArrayFixFlat* aItemIds)