equal
deleted
inserted
replaced
17 |
17 |
18 #include <uikon.hrh> // EKeyOk |
18 #include <uikon.hrh> // EKeyOk |
19 #include "AknListQueryNotificationDialog.h" |
19 #include "AknListQueryNotificationDialog.h" |
20 #include "AknNotifyPlugin.hrh" |
20 #include "AknNotifyPlugin.hrh" |
21 #include "avkon.hrh" |
21 #include "avkon.hrh" |
|
22 #include "AknSystemListPopup.h" |
22 |
23 |
23 CAknListQueryNotificationDialog::CAknListQueryNotificationDialog( |
24 CAknListQueryNotificationDialog::CAknListQueryNotificationDialog( |
24 TInt* aIndex, |
25 TInt* aIndex, |
25 MAknListQueryNotificationCallback* aCallBack, |
26 MAknListQueryNotificationCallback* aCallBack, |
26 CAknListQueryNotificationDialog** aSelfPtr) |
27 CAknListQueryNotificationDialog** aSelfPtr) |
27 : CAknListQueryDialog(aIndex), iCallBack(aCallBack), iSelfPtr(aSelfPtr) |
28 : CAknListQueryDialog(aIndex) |
|
29 , iCallBack(aCallBack) |
|
30 , iSelfPtr(aSelfPtr) |
|
31 , iPointerUpEaten(EFalse) |
28 { |
32 { |
29 } |
33 } |
30 |
34 |
31 CAknListQueryNotificationDialog::~CAknListQueryNotificationDialog() |
35 CAknListQueryNotificationDialog::~CAknListQueryNotificationDialog() |
32 { |
36 { |
52 |
56 |
53 if (aType != EEventKey) |
57 if (aType != EEventKey) |
54 { |
58 { |
55 return EKeyWasNotConsumed; |
59 return EKeyWasNotConsumed; |
56 } |
60 } |
|
61 |
|
62 iPointerUpEaten = EFalse; |
57 |
63 |
58 TInt code = aKeyEvent.iCode; |
64 TInt code = aKeyEvent.iCode; |
59 |
65 |
60 switch (code) |
66 switch (code) |
61 { |
67 { |
109 CAknListQueryDialog::HandleListBoxEventL(aListBox, aEventType); |
115 CAknListQueryDialog::HandleListBoxEventL(aListBox, aEventType); |
110 } |
116 } |
111 |
117 |
112 TBool CAknListQueryNotificationDialog::OkToExitL(TInt aButtonId) |
118 TBool CAknListQueryNotificationDialog::OkToExitL(TInt aButtonId) |
113 { |
119 { |
|
120 // Fix the problem where the pointer up event is handled to close the power menu key, |
|
121 // when the popup shows on the top of power menu before releasing the tap. |
|
122 if (iPointerUpEaten && AknLayoutUtils::PenEnabled() && aButtonId == EAknSoftkeyOk) |
|
123 { |
|
124 iPointerUpEaten = EFalse; |
|
125 //Fix the problem where the pointer up event is handled to active the power menu item |
|
126 //when lock screen happans before releasing the tap on power menu item |
|
127 if(((CAknGlobalListQuerySubject*)iCallBack)->IsKeyLockEnable()) |
|
128 { |
|
129 aButtonId = EAknSoftkeyCancel; |
|
130 } |
|
131 else |
|
132 { |
|
133 return EFalse; |
|
134 } |
|
135 } |
|
136 |
114 TInt ret = -1; |
137 TInt ret = -1; |
115 if (aButtonId != EAknSoftkeyCancel) |
138 if (aButtonId != EAknSoftkeyCancel) |
116 { |
139 { |
117 ret = ListBox()->CurrentItemIndex(); |
140 ret = ListBox()->CurrentItemIndex(); |
118 } |
141 } |
120 if (aButtonId == EAknSoftkeyCancel || aButtonId == EAknSoftkeyOk) |
143 if (aButtonId == EAknSoftkeyCancel || aButtonId == EAknSoftkeyOk) |
121 { |
144 { |
122 return ETrue; |
145 return ETrue; |
123 } |
146 } |
124 return EFalse; |
147 return EFalse; |
|
148 } |
|
149 |
|
150 void CAknListQueryNotificationDialog::HandlePointerEventL(const TPointerEvent& aPointerEvent) |
|
151 { |
|
152 iPointerUpEaten = EFalse; |
|
153 |
|
154 if (aPointerEvent.iType == TPointerEvent::EButton1Up && (!IsFocused() || ((CAknGlobalListQuerySubject*)iCallBack)->IsKeyLockEnable())) |
|
155 { |
|
156 iPointerUpEaten = ETrue; |
|
157 } |
|
158 |
|
159 CAknListQueryDialog::HandlePointerEventL(aPointerEvent); |
125 } |
160 } |
126 |
161 |
127 void CAknListQueryNotificationDialog::CEikDialog_Reserved_1() |
162 void CAknListQueryNotificationDialog::CEikDialog_Reserved_1() |
128 { |
163 { |
129 } |
164 } |