author | Simon Howkins <simonh@symbian.org> |
Mon, 29 Nov 2010 11:47:03 +0000 | |
branch | RCL_3 |
changeset 78 | dbcb928abe9c |
parent 75 | 01504893d9cb |
permissions | -rw-r--r-- |
60 | 1 |
/* |
2 |
* Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 |
* All rights reserved. |
|
4 |
* This component and the accompanying materials are made available |
|
5 |
* under the terms of "Eclipse Public License v1.0" |
|
6 |
* which accompanies this distribution, and is available |
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 |
* |
|
9 |
* Initial Contributors: |
|
10 |
* Nokia Corporation - initial contribution. |
|
11 |
* |
|
12 |
* Contributors: |
|
13 |
* |
|
14 |
* Description: Creates a Fetcher Dialog |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
||
20 |
// EXTERNAL INCLUDES |
|
21 |
#include <aknappui.h> |
|
22 |
#include <akntoolbar.h> |
|
23 |
#include <eikdialg.h> // for CEikDialog |
|
24 |
#include <AknUtils.h> |
|
25 |
#include <StringLoader.h> |
|
26 |
#include <eikdialogext.h> |
|
27 |
#include <AknsBasicBackgroundControlContext.h> |
|
28 |
#include <MMGFetchVerifier.h> // For VerifySelectionL() |
|
29 |
#include <glxresourceutilities.h> // for CGlxResourceUtilities |
|
30 |
#include <glxuiutility.h> |
|
31 |
#include <glxscreenfurniture.h> |
|
32 |
#include <glxtracer.h> // Logging macros |
|
33 |
#include <glxlog.h> |
|
34 |
#include <glxcommandhandlers.hrh> //command ids |
|
35 |
#include <data_caging_path_literals.hrh> // KDC_APP_RESOURCE_DIR |
|
36 |
#include <mglxmedialist.h> // MGlxMediaList, CMPXCollectionPath |
|
37 |
||
38 |
#include <alf/alfevent.h> |
|
39 |
#include <alf/alfdisplay.h> |
|
40 |
||
41 |
// CLASS HEADER |
|
42 |
#include <glxfetcherdialog.rsg> // FOR GETTING VIEW ID AND RESOURCE ID |
|
43 |
#include "glxfetcherdialog.h" |
|
44 |
#include "glxfetchercontainer.h" |
|
45 |
#include "glxfetcher.hrh" |
|
46 |
||
47 |
const TInt KControlId = 1; |
|
48 |
||
49 |
_LIT(KGlxGridviewResource, "glxgridviewdata.rsc"); |
|
50 |
||
51 |
//----------------------------------------------------------------------------- |
|
52 |
// C++ default constructor. |
|
53 |
//----------------------------------------------------------------------------- |
|
54 |
inline CGlxFetcherDialog::CGlxFetcherDialog( |
|
55 |
CDesCArray& aSelectedFiles, |
|
56 |
MMGFetchVerifier* aVerifier, |
|
57 |
TGlxFilterItemType aFilterType, |
|
58 |
const TDesC& aTitle, |
|
59 |
TBool aMultiSelectionEnabled) |
|
60 |
: iSelectedFiles( aSelectedFiles ), |
|
61 |
iVerifier( aVerifier ), |
|
62 |
iFilterType( aFilterType ), |
|
63 |
iTitle( aTitle ), |
|
64 |
iMultiSelectionEnabled(aMultiSelectionEnabled) |
|
65 |
{ |
|
66 |
TRACER("CGlxFetcherDialog::CGlxFetcherDialog"); |
|
67 |
// No implementation required |
|
68 |
} |
|
69 |
||
70 |
//----------------------------------------------------------------------------- |
|
71 |
// Two-phased constructor. |
|
72 |
//----------------------------------------------------------------------------- |
|
73 |
CGlxFetcherDialog* CGlxFetcherDialog::NewL(CDesCArray& aSelectedFiles, |
|
74 |
MMGFetchVerifier* aVerifier, TGlxFilterItemType aFilterType , |
|
75 |
const TDesC& aTitle, TBool aMultiSelectionEnabled ) |
|
76 |
{ |
|
77 |
TRACER("CGlxFetcherDialog::NewL"); |
|
78 |
CGlxFetcherDialog* self= |
|
79 |
new( ELeave ) CGlxFetcherDialog( |
|
80 |
aSelectedFiles, aVerifier, aFilterType, aTitle, aMultiSelectionEnabled ); |
|
81 |
CleanupStack::PushL( self ); |
|
82 |
self->ConstructL(); |
|
83 |
CleanupStack::Pop( self ); |
|
84 |
return self; |
|
85 |
} |
|
86 |
||
87 |
//----------------------------------------------------------------------------- |
|
88 |
// Destructor |
|
89 |
//----------------------------------------------------------------------------- |
|
90 |
CGlxFetcherDialog::~CGlxFetcherDialog() |
|
91 |
{ |
|
92 |
TRACER("CGlxFetcherDialog::~CGlxFetcherDialog"); |
|
93 |
if (iResourceOffset) |
|
94 |
{ |
|
95 |
CCoeEnv::Static()->DeleteResourceFile(iResourceOffset); |
|
96 |
} |
|
97 |
||
98 |
if(iMMCNotifier) |
|
99 |
{ |
|
100 |
delete iMMCNotifier; |
|
101 |
iMMCNotifier = NULL; |
|
102 |
} |
|
103 |
if(iFetcherContainer) |
|
104 |
{ |
|
105 |
// Restore the Toolbar as it was in the Calling application |
|
106 |
if(iAvkonAppUi->CurrentFixedToolbar()) // there is Hardware Specific Output for Fixed ToolBar |
|
107 |
{ |
|
108 |
iAvkonAppUi->CurrentFixedToolbar()->SetToolbarVisibility(ETrue); |
|
109 |
} |
|
110 |
||
111 |
TRAP_IGNORE(iFetcherContainer->SetPreviousTitleL()); |
|
112 |
} |
|
113 |
if (iUiUtility) |
|
114 |
{ |
|
115 |
iUiUtility->Close(); |
|
116 |
} |
|
117 |
} |
|
118 |
||
119 |
//----------------------------------------------------------------------------- |
|
120 |
// Symbian 2nd phase constructor can leave. |
|
121 |
// Create the alfscreenbuffer with a generic buffer screen id |
|
122 |
//----------------------------------------------------------------------------- |
|
123 |
void CGlxFetcherDialog::ConstructL() |
|
124 |
{ |
|
125 |
TRACER("CGlxFetcherDialog::ConstructL"); |
|
126 |
// always first call the base class |
|
127 |
CAknDialog::ConstructL( R_MULTISELECT_FETCHER_MENUBAR ); |
|
128 |
||
129 |
// Get the Instance of the toolbar and disable it as it is note required in the Fetcher Application |
|
130 |
if (iAvkonAppUi->CurrentFixedToolbar()) // there is Hardware Specific Output for Fixed ToolBar |
|
131 |
{ |
|
132 |
iAvkonAppUi->CurrentFixedToolbar()->SetToolbarVisibility(EFalse); |
|
133 |
} |
|
134 |
||
135 |
// Load resource file for grid view empty text |
|
136 |
TParse parse; |
|
137 |
parse.Set(KGlxGridviewResource, &KDC_APP_RESOURCE_DIR, NULL); |
|
138 |
TFileName resourceFile; |
|
139 |
resourceFile.Append(parse.FullName()); |
|
140 |
CGlxResourceUtilities::GetResourceFilenameL(resourceFile); |
|
141 |
iResourceOffset = CCoeEnv::Static()->AddResourceFileL(resourceFile); |
|
142 |
||
143 |
// Get the Hitchcock environment. |
|
144 |
iUiUtility = CGlxUiUtility::UtilityL(); |
|
75
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
145 |
iEnv = iUiUtility->Env(); |
60 | 146 |
iFetchUri = EFalse; |
147 |
iMMCNotifier = CGlxMMCNotifier::NewL(*this); |
|
148 |
} |
|
149 |
||
150 |
//----------------------------------------------------------------------------- |
|
151 |
// CGlxFetcherDialog::CreateCustomControlL |
|
152 |
//----------------------------------------------------------------------------- |
|
153 |
SEikControlInfo CGlxFetcherDialog::CreateCustomControlL(TInt aControlType) |
|
154 |
{ |
|
155 |
TRACER("CGlxFetcherDialog::CreateCustomControlL"); |
|
156 |
// Create Carousal control and add it to HUI CCoecontrol |
|
157 |
SEikControlInfo controlInfo; |
|
158 |
controlInfo.iControl = NULL; |
|
159 |
controlInfo.iTrailerTextId = 0; |
|
160 |
controlInfo.iFlags = 0; |
|
161 |
||
162 |
switch( aControlType ) |
|
163 |
{ |
|
164 |
case EFetcherControl : |
|
165 |
{ |
|
166 |
iFetcherContainer = CGlxFetcherContainer::NewL( |
|
167 |
iFilterType, iTitle, *this, iMultiSelectionEnabled ); |
|
168 |
controlInfo.iControl = iFetcherContainer; // transfers ownership |
|
169 |
break; |
|
170 |
} |
|
171 |
default : |
|
172 |
break; |
|
173 |
} |
|
174 |
return controlInfo; |
|
175 |
} |
|
176 |
||
177 |
//----------------------------------------------------------------------------- |
|
178 |
// CGlxFetcherDialog::ProcessCommandL |
|
179 |
// This processes the events to the OkToExitL |
|
180 |
//----------------------------------------------------------------------------- |
|
181 |
void CGlxFetcherDialog::ProcessCommandL(TInt aCommandId) |
|
182 |
{ |
|
183 |
TRACER("CGlxFetcherDialog::ProcessCommandL"); |
|
184 |
||
185 |
if( iMenuBar ) |
|
186 |
{ |
|
187 |
iMenuBar->StopDisplayingMenuBar(); |
|
188 |
} |
|
189 |
switch( aCommandId ) |
|
190 |
{ |
|
191 |
case EAknSoftkeyCancel : |
|
192 |
{ |
|
193 |
TryExitL( aCommandId ); |
|
194 |
break; |
|
195 |
} |
|
196 |
case EAknSoftkeySelect : |
|
197 |
case EGlxCmdSelectMarked : |
|
198 |
case EAknSoftkeyOk : |
|
199 |
{ |
|
200 |
GLX_LOG_INFO("CGlxFetcherDialog::ProcessCommandL() : EAknSoftkeyOk"); |
|
201 |
TryExitL( aCommandId ); |
|
202 |
break; |
|
203 |
} |
|
204 |
default : |
|
205 |
{ |
|
206 |
iFetcherContainer->DoExecuteL( aCommandId ); |
|
207 |
break; |
|
208 |
} |
|
209 |
} |
|
210 |
} |
|
211 |
//----------------------------------------------------------------------------- |
|
212 |
// CGlxFetcherDialog::OkToExitL |
|
213 |
//----------------------------------------------------------------------------- |
|
214 |
TBool CGlxFetcherDialog::OkToExitL(TInt aKeycode) |
|
215 |
{ |
|
216 |
TRACER("CGlxFetcherDialog::OkToExitL"); |
|
217 |
GLX_LOG_INFO1("CGlxFetcherDialog::OkToExitL : %d",aKeycode ); |
|
218 |
TBool retVal = ETrue; |
|
219 |
TBool retrieveUriValue = EFalse; |
|
220 |
switch (aKeycode) |
|
221 |
{ |
|
222 |
case EAknSoftkeySelect: |
|
223 |
case EGlxCmdSelectMarked: |
|
224 |
case EAknSoftkeyOk: |
|
225 |
case EAknCmdOpen: |
|
226 |
{ |
|
227 |
// Retreives the uri's of the selected files and verifies if it is a |
|
228 |
// supported format |
|
229 |
if (!iFetchUri) |
|
230 |
{ |
|
231 |
iFetchUri = ETrue; |
|
232 |
retrieveUriValue = iFetcherContainer->RetrieveUrisL( |
|
233 |
iSelectedFiles, iFetchUri); |
|
234 |
if (iVerifier |
|
235 |
&& !iVerifier->VerifySelectionL(&iSelectedFiles)) |
|
236 |
{ |
|
237 |
GLX_LOG_INFO("CGlxFetcherDialog::OkToExitL : " |
|
238 |
" VerifySelectionL() failed!"); |
|
239 |
iSelectedFiles.Reset(); |
|
240 |
retVal = EFalse; |
|
241 |
//if the corrupt file is selected then reset the flag to again enable |
|
242 |
//the selection. |
|
243 |
iFetcherContainer->SetFileAttached(EFalse); |
|
244 |
} |
|
245 |
if (!retrieveUriValue) |
|
246 |
{ |
|
247 |
retVal = EFalse; |
|
248 |
} |
|
249 |
if (iMultiSelectionEnabled && retVal) |
|
250 |
{ |
|
251 |
iFetcherContainer->DoExecuteL(EGlxCmdEndMultipleMarking); |
|
252 |
} |
|
253 |
} |
|
254 |
else |
|
255 |
{ |
|
256 |
// if uri is being fetched then do not set the return value true, else it would cause |
|
257 |
// Destructor of Dialog to be called and result in a crash when OKtoExitL is called multiple times. |
|
258 |
retVal = EFalse; |
|
259 |
} |
|
260 |
break; |
|
261 |
} |
|
262 |
case EAknSoftkeyCancel: // exit dialog |
|
263 |
case EAknCmdExit: |
|
264 |
{ |
|
265 |
break; |
|
266 |
} |
|
267 |
case EAknCmdMark: |
|
268 |
case EAknSoftkeyMark: |
|
269 |
{ |
|
270 |
if (iMultiSelectionEnabled) |
|
271 |
{ |
|
272 |
if (iUiUtility->IsPenSupported()) |
|
273 |
{ |
|
274 |
//Since the MSK is disabled we always get EAknCmdMark |
|
275 |
//when we select msk hardkey in touch phone, so we need |
|
276 |
//to toggle between mark/unmark on the same hardkey event |
|
277 |
if (!iMarkStarted) |
|
278 |
{ |
|
279 |
iFetcherContainer->DoExecuteL( |
|
280 |
EGlxCmdStartMultipleMarking); |
|
281 |
iMarkStarted = ETrue; |
|
282 |
} |
|
283 |
else |
|
284 |
{ |
|
285 |
MGlxMediaList& mediaList = |
|
286 |
iFetcherContainer->MediaList(); |
|
287 |
TInt focusIdx = mediaList.FocusIndex(); |
|
288 |
if (mediaList.IsSelected(focusIdx)) |
|
289 |
iFetcherContainer->DoExecuteL(EAknCmdUnmark); |
|
290 |
else |
|
291 |
iFetcherContainer->DoExecuteL(EAknCmdMark); |
|
292 |
} |
|
293 |
} |
|
294 |
else |
|
295 |
{ |
|
296 |
if (!iMarkStarted) |
|
297 |
{ |
|
298 |
iFetcherContainer->DoExecuteL( |
|
299 |
EGlxCmdStartMultipleMarking); |
|
300 |
iMarkStarted = ETrue; |
|
301 |
} |
|
302 |
else |
|
303 |
{ |
|
304 |
iFetcherContainer->DoExecuteL(EAknCmdMark); |
|
305 |
} |
|
306 |
} |
|
307 |
} |
|
308 |
retVal = EFalse; |
|
309 |
break; |
|
310 |
} |
|
311 |
case EAknCmdUnmark: |
|
312 |
case EAknSoftkeyUnmark: |
|
313 |
{ |
|
314 |
if (iMultiSelectionEnabled) |
|
315 |
{ |
|
316 |
iFetcherContainer->DoExecuteL(EAknCmdUnmark); |
|
317 |
||
318 |
//@ fix for ELWU-7RA7NX |
|
319 |
//@ Reset the flag on no selection, else it'll not pass the events to container for |
|
320 |
//@ EGlxCmdStartMultipleMarking case. |
|
321 |
MGlxMediaList& mediaList = iFetcherContainer->MediaList(); |
|
322 |
if (mediaList.SelectionCount() <= 0) |
|
323 |
{ |
|
324 |
iMarkStarted = EFalse; |
|
325 |
} |
|
326 |
||
327 |
HBufC* mskTextMark = StringLoader::LoadLC(R_GLX_MARKING_MARK); |
|
328 |
HBufC* rskTextCancel = StringLoader::LoadLC( |
|
329 |
R_GLX_SOFTKEY_CANCEL); |
|
330 |
iUiUtility->ScreenFurniture()->ModifySoftkeyIdL( |
|
331 |
CEikButtonGroupContainer::EMiddleSoftkeyPosition, |
|
332 |
EAknCmdMark, 0, *mskTextMark); |
|
333 |
iUiUtility->ScreenFurniture()->ModifySoftkeyIdL( |
|
334 |
CEikButtonGroupContainer::ERightSoftkeyPosition, |
|
335 |
EAknSoftkeyCancel, 0, *rskTextCancel); |
|
336 |
CleanupStack::PopAndDestroy(rskTextCancel); |
|
337 |
CleanupStack::PopAndDestroy(mskTextMark); |
|
338 |
} |
|
339 |
retVal = EFalse; |
|
340 |
break; |
|
341 |
} |
|
342 |
default: |
|
343 |
break; |
|
344 |
} |
|
345 |
||
346 |
GLX_LOG_INFO1("CGlxFetcherDialog::OkToExitL : retVal(%d)", retVal); |
|
347 |
return retVal; |
|
348 |
} |
|
349 |
||
350 |
//----------------------------------------------------------------------------- |
|
351 |
// CGlxFetcherDialog::SizeChanged |
|
352 |
//----------------------------------------------------------------------------- |
|
353 |
void CGlxFetcherDialog::SizeChanged() |
|
354 |
{ |
|
355 |
TRACER("CGlxFetcherDialog::SizeChanged"); |
|
356 |
if (iFetcherContainer) |
|
357 |
{ |
|
358 |
TRAP_IGNORE (iFetcherContainer->HandleSizeChangeL()); |
|
359 |
} |
|
360 |
} |
|
361 |
||
362 |
//----------------------------------------------------------------------------- |
|
363 |
// CGlxFetcherDialog::PreLayoutDynInitL |
|
364 |
//----------------------------------------------------------------------------- |
|
365 |
void CGlxFetcherDialog::PreLayoutDynInitL() |
|
366 |
{ |
|
367 |
TRACER("CGlxFetcherDialog::PreLayoutDynInitL"); |
|
368 |
CreateLineByTypeL( KNullDesC, KControlId, EFetcherControl, NULL ); |
|
369 |
} |
|
370 |
//----------------------------------------------------------------------------- |
|
371 |
// CGlxFetcherDialog::PostLayoutDynInitL |
|
372 |
//----------------------------------------------------------------------------- |
|
373 |
void CGlxFetcherDialog::PostLayoutDynInitL() |
|
374 |
{ |
|
375 |
TRACER("CGlxFetcherDialog::PostLayoutDynInitL"); |
|
376 |
||
377 |
if (!iUiUtility->IsPenSupported()) |
|
378 |
{ |
|
379 |
CEikButtonGroupContainer& cbaContainer = ButtonGroupContainer(); |
|
380 |
if (iMultiSelectionEnabled) |
|
381 |
{ |
|
382 |
cbaContainer.SetCommandSetL(R_AVKON_SOFTKEYS_OK_CANCEL__MARK); |
|
383 |
} |
|
384 |
else |
|
385 |
{ |
|
386 |
cbaContainer.SetCommandSetL( |
|
387 |
R_AVKON_SOFTKEYS_SELECT_CANCEL__SELECT); |
|
388 |
} |
|
389 |
cbaContainer.DrawNow(); |
|
390 |
} |
|
391 |
||
392 |
// Create and Display Grid widget |
|
393 |
iFetcherContainer->CreateAndDisplayGridL(); |
|
394 |
} |
|
395 |
||
396 |
//----------------------------------------------------------------------------- |
|
75
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
397 |
// CGlxFetcherDialog::DynInitMenuPaneL |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
398 |
//----------------------------------------------------------------------------- |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
399 |
void CGlxFetcherDialog::DynInitMenuPaneL( |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
400 |
TInt /*aResourceId*/, CEikMenuPane* /*aMenuPane*/ ) |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
401 |
{ |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
402 |
TRACER("CGlxFetcherDialog::DynInitMenuPaneL"); |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
403 |
// No Implementation |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
404 |
} |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
405 |
|
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
406 |
//----------------------------------------------------------------------------- |
60 | 407 |
// CGlxFetcherDialog::OfferKeyEventL |
408 |
//----------------------------------------------------------------------------- |
|
409 |
TKeyResponse CGlxFetcherDialog::OfferKeyEventL(const TKeyEvent& aKeyEvent, |
|
410 |
TEventCode aType) |
|
411 |
{ |
|
412 |
TRACER("CGlxFetcherDialog::OfferKeyEventL"); |
|
413 |
TKeyResponse response = EKeyWasNotConsumed; |
|
414 |
response = iFetcherContainer->OfferKeyEventL(aKeyEvent,aType); |
|
415 |
||
416 |
if(response == EKeyWasNotConsumed) |
|
417 |
response = CAknDialog::OfferKeyEventL(aKeyEvent,aType); |
|
418 |
||
419 |
return response; |
|
420 |
} |
|
421 |
||
422 |
//----------------------------------------------------------------------------- |
|
75
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
423 |
// CGlxFetcherDialog::HandlePointerEventL |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
424 |
// Handles all pointer events to the screen. |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
425 |
// Offers the events to the primary display control (container - widgets) |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
426 |
// and also finally calls handlescreenbufferevent and draws the bitmap onto |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
427 |
// the screen |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
428 |
//----------------------------------------------------------------------------- |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
429 |
void CGlxFetcherDialog::HandlePointerEventL( |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
430 |
const TPointerEvent& aPointerEvent) |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
431 |
{ |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
432 |
TRACER("CGlxFetcherDialog::HandlePointerEventL"); |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
433 |
CCoeControl::HandlePointerEventL( aPointerEvent ); |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
434 |
iEnv->PrimaryDisplay().HandlePointerEventL( aPointerEvent ); |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
435 |
} |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
436 |
|
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
437 |
//----------------------------------------------------------------------------- |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
438 |
// CGlxFetcherDialog::HandleDoubleTapEvent |
60 | 439 |
// Callback from the container for double tap events |
440 |
// Offers the event from container to Dialog |
|
441 |
//----------------------------------------------------------------------------- |
|
442 |
void CGlxFetcherDialog::HandleDoubleTapEventL(TInt aCommandId) |
|
443 |
{ |
|
444 |
TRACER("CGlxFetcherDialog::HandleDoubleTapEventL"); |
|
445 |
Extension()->iPublicFlags.Set(CEikDialogExtension::EDelayedExit); |
|
446 |
ProcessCommandL(aCommandId); |
|
447 |
Extension()->iPublicFlags.Clear(CEikDialogExtension::EDelayedExit); |
|
448 |
} |
|
449 |
||
450 |
//----------------------------------------------------------------------------- |
|
451 |
// CGlxFetcherDialog::HandleMarkEventL |
|
452 |
// Callback from the container to process the mark/unmark events. |
|
453 |
//----------------------------------------------------------------------------- |
|
454 |
void CGlxFetcherDialog::HandleMarkEventL() |
|
455 |
{ |
|
456 |
TRACER("CGlxFetcherDialog::HandleMarkEventL"); |
|
457 |
if ( iUiUtility->IsPenSupported() ) |
|
458 |
{ |
|
459 |
MGlxMediaList& mediaList = iFetcherContainer->MediaList(); |
|
460 |
CEikButtonGroupContainer& cbaContainer = ButtonGroupContainer(); |
|
461 |
if (mediaList.SelectionCount()) |
|
462 |
{ |
|
463 |
cbaContainer.SetCommandSetL(R_AVKON_SOFTKEYS_OK_CANCEL__MARK); |
|
464 |
} |
|
465 |
else |
|
466 |
{ |
|
467 |
cbaContainer.SetCommandSetL(R_AVKON_SOFTKEYS_CANCEL); |
|
468 |
} |
|
469 |
cbaContainer.DrawNow(); |
|
470 |
} |
|
471 |
} |
|
472 |
||
473 |
//----------------------------------------------------------------------------- |
|
474 |
// CGlxFetcherDialog::CallCancelFetcherL |
|
475 |
// This function will be called from CGlxFetcher::CancelFetcherL |
|
476 |
// This will ensure exit of fetcher dialog & fetcher app |
|
477 |
//----------------------------------------------------------------------------- |
|
478 |
||
479 |
void CGlxFetcherDialog::CallCancelFetcherL(TInt aCommandId) |
|
480 |
{ |
|
481 |
TRACER("CGlxFetcherDialog::CallCancelFetcherL"); |
|
482 |
TryExitL(aCommandId); |
|
483 |
} |
|
484 |
||
485 |
//----------------------------------------------------------------------------- |
|
486 |
// CGlxFetcherDialog::HandleMMCRemovalL |
|
487 |
// This function will be called when MMC is removed |
|
488 |
// This will ensure exit of fetcher dialog. |
|
489 |
//----------------------------------------------------------------------------- |
|
490 |
void CGlxFetcherDialog::HandleMMCRemovalL() |
|
491 |
{ |
|
492 |
TRACER("CGlxFetcherDialog::HandleMMCRemovalL"); |
|
493 |
/* |
|
494 |
* need to delay the destruction of dialog. |
|
495 |
*/ |
|
496 |
Extension()->iPublicFlags.Set(CEikDialogExtension::EDelayedExit); |
|
497 |
ProcessCommandL(EAknSoftkeyCancel); |
|
498 |
Extension()->iPublicFlags.Clear(CEikDialogExtension::EDelayedExit); |
|
499 |
} |
|
500 |
// End of File |