author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 13 Oct 2010 14:32:09 +0300 | |
branch | RCL_3 |
changeset 75 | 01504893d9cb |
parent 60 | 5b3385a43d68 |
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: Implementation of Command Binding Class's |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
||
20 |
||
21 |
#include <e32base.h> // Base class for all classes to be instantiated on the heap |
|
22 |
#include <ExifModify.h> //For CExifModify |
|
75
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
23 |
#include "glxdetailsboundcommand.hrh" |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
24 |
#include "glxdetailsboundcommand.h" // Handles user commands |
60 | 25 |
#include <glxmetadatadialog.rsg> |
26 |
#include <glxuiutilities.rsg> |
|
27 |
#include <glxuiutilities.rsg> |
|
28 |
#include <glxcommandhandleraddtocontainer.h> // For CGlxCommandHandlerAddToContainer |
|
29 |
#include <glxcommandhandlers.hrh> // for command handler id |
|
30 |
#include <glxdrmutility.h> //For launching DRM details pane |
|
31 |
#include <glxmedialist.h> // Interface for reading lists of media items |
|
32 |
#include <glxcommandfactory.h> //for command factory |
|
33 |
#include <mpxcommandgeneraldefs.h> // Content ID identifying general category of content provided |
|
34 |
#include <glxtextentrypopup.h> //for testing |
|
35 |
#include <glxgeneraluiutilities.h> // General utilties class definition |
|
36 |
#include <StringLoader.h> // Class provides methods to load and format resource strings |
|
37 |
#include <glxlog.h> // Logging |
|
38 |
#include <glxtracer.h> |
|
39 |
#include <glxviewbase.rsg> |
|
75
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
40 |
#include "glxuiutility.h" |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
41 |
#include <glxscreenfurniture.h> |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
42 |
#include <glxresourceutilities.h> // for CGlxResourceUtilities |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
43 |
/** Error Id EMPY-7MKDHP **/ |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
44 |
#include "mglxmetadatadialogobserver.h" //for call back to dailog |
60 | 45 |
|
46 |
||
75
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
47 |
//CONSTANTS |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
48 |
const TInt KMaxMediaPopupTitleLength = 0x100; |
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
49 |
|
60 | 50 |
// ---------------------------------------------------------------------------- |
51 |
// CGlxTitleBoundCommand::NewL |
|
52 |
// ---------------------------------------------------------------------------- |
|
53 |
// |
|
54 |
EXPORT_C CGlxTitleBoundCommand* CGlxTitleBoundCommand::NewL() |
|
55 |
{ |
|
56 |
TRACER("CGlxTitleBoundCommand::NewL"); |
|
57 |
CGlxTitleBoundCommand* self = CGlxTitleBoundCommand::NewLC(); |
|
58 |
CleanupStack::Pop( self ); |
|
59 |
return self; |
|
60 |
} |
|
61 |
||
62 |
// ---------------------------------------------------------------------------- |
|
63 |
// CGlxTitleBoundCommand::NewLC |
|
64 |
// ---------------------------------------------------------------------------- |
|
65 |
// |
|
66 |
CGlxTitleBoundCommand* CGlxTitleBoundCommand::NewLC() |
|
67 |
{ |
|
68 |
TRACER("CGlxTitleBoundCommand::NewLC"); |
|
69 |
CGlxTitleBoundCommand* self = new ( ELeave ) CGlxTitleBoundCommand; |
|
70 |
CleanupStack::PushL( self ); |
|
71 |
return self; |
|
72 |
} |
|
73 |
||
74 |
CGlxTitleBoundCommand::~CGlxTitleBoundCommand() |
|
75 |
{ |
|
76 |
||
77 |
} |
|
78 |
// ---------------------------------------------------------------------------- |
|
79 |
// CGlxTitleBoundCommand::OfferCommandL |
|
80 |
// ---------------------------------------------------------------------------- |
|
81 |
// |
|
82 |
TBool CGlxTitleBoundCommand::OfferCommandL( TInt aCommandId , MGlxMediaList& aMedialist ) |
|
83 |
{ |
|
84 |
TRACER("CGlxTitleBoundCommand::OfferCommandL"); |
|
85 |
TBool consumed = EFalse; |
|
86 |
iMedialist = &aMedialist; |
|
87 |
const CGlxMedia* media = iMedialist->Item(0).Properties(); |
|
88 |
if( media ) |
|
89 |
{ |
|
90 |
if ( aCommandId == KGlxEditBoundMenuCommandId && media->IsSupported( KMPXMediaGeneralTitle)) |
|
91 |
{ |
|
92 |
///@todo - remove popup when editable template is avaliable |
|
93 |
//Popup for testing |
|
75
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
94 |
HBufC* textBuf = HBufC::NewLC( KMaxMediaPopupTitleLength ); |
60 | 95 |
(textBuf->Des()).Copy((media->ValueText(KMPXMediaGeneralTitle))); |
96 |
TPtr textPtr = textBuf->Des(); |
|
97 |
/// bug fix - EMPY-7MCKD6 |
|
75
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
98 |
TBuf<KMaxMediaPopupTitleLength> titleText(*textBuf); |
60 | 99 |
/// bug fix - EMPY-7MCKD6 |
100 |
///@todo - remove literal for popup title when resource string is avaliable |
|
101 |
HBufC *buf = StringLoader::LoadLC(R_GLX_METADATA_VIEW_TITLE_NSERIES); |
|
102 |
CGlxTextEntryPopup* popup = CGlxTextEntryPopup::NewL( *buf, textPtr ); |
|
103 |
CleanupStack::PopAndDestroy(buf); |
|
104 |
if ( popup->ExecuteLD() == EEikBidOk ) |
|
105 |
{ |
|
106 |
// Text entry was successful |
|
107 |
/// bug fix - EMPY-7MCKD6 |
|
108 |
//Compare if there is any change in the entry |
|
109 |
if(0 != (titleText.Compare(*textBuf))) |
|
110 |
/// bug fix - EMPY-7MCKD6 |
|
111 |
ModifyTitleL( *textBuf ); |
|
112 |
} |
|
113 |
CleanupStack::PopAndDestroy( textBuf ); |
|
114 |
consumed = ETrue; |
|
115 |
} |
|
116 |
} |
|
117 |
return consumed; |
|
118 |
} |
|
119 |
||
120 |
// ---------------------------------------------------------------------------- |
|
121 |
// CGlxTitleBoundCommand::InitMenuL |
|
122 |
// ---------------------------------------------------------------------------- |
|
123 |
// |
|
124 |
void CGlxTitleBoundCommand::InitMenuL( CEikMenuPane& aMenu ) const |
|
125 |
{ |
|
126 |
TRACER("CGlxTitleBoundCommand::InitMenuL"); |
|
127 |
aMenu.SetItemTextL( KGlxEditBoundMenuCommandId, R_GLX_METADATA_VIEW_OPTIONS_EDIT ); |
|
128 |
aMenu.SetItemDimmed( KGlxEditBoundMenuCommandId, EFalse ); |
|
129 |
} |
|
130 |
||
131 |
// ---------------------------------------------------------------------------- |
|
132 |
// CGlxTitleBoundCommand::HideLocationMenuItem |
|
133 |
// ---------------------------------------------------------------------------- |
|
134 |
// |
|
135 |
void CGlxTitleBoundCommand::HideLocationMenuItem( CEikMenuPane& aMenu ) const |
|
136 |
{ |
|
137 |
TRACER("CGlxTitleBoundCommand::HideLocationMenuItem"); |
|
138 |
aMenu.SetItemDimmed( EGlxCmdAiwBase, ETrue ); |
|
139 |
} |
|
140 |
||
141 |
// ----------------------------------------------------------------------------- |
|
142 |
// CGlxDescriptionBoundCommand::ModifyTitleL |
|
143 |
// ----------------------------------------------------------------------------- |
|
144 |
// |
|
145 |
void CGlxTitleBoundCommand::ModifyTitleL(const TDesC& aData ) |
|
146 |
{ |
|
147 |
TRACER("CGlxTitleBoundCommand::ModifyTitleL"); |
|
148 |
||
149 |
if( iMedialist->Count() > 0 ) |
|
150 |
{ |
|
151 |
iMedialist->SetFocusL(NGlxListDefs::EAbsolute,0);//set focus to first item |
|
152 |
CMPXCollectionPath* path = iMedialist->PathLC(); |
|
153 |
CMPXCommand* command = TGlxCommandFactory::RenameCommandLC(aData,*path); |
|
154 |
||
155 |
command->SetTObjectValueL<TAny*>(KMPXCommandGeneralSessionId, static_cast<TAny*>(this)); |
|
156 |
||
157 |
iMedialist->CommandL(*command); |
|
158 |
||
159 |
CleanupStack::PopAndDestroy(command); |
|
160 |
CleanupStack::PopAndDestroy(path); |
|
161 |
} |
|
162 |
} |
|
163 |
||
164 |
// ---------------------------------------------------------------------------- |
|
165 |
// CGlxTitleBoundCommand::Close |
|
166 |
// ---------------------------------------------------------------------------- |
|
167 |
// |
|
168 |
void CGlxTitleBoundCommand::Close() |
|
169 |
{ |
|
170 |
delete this; |
|
171 |
} |
|
172 |
||
173 |
// ---------------------------------------------------------------------------- |
|
174 |
// CGlxTitleBoundCommand::ChangeMskL |
|
175 |
// ---------------------------------------------------------------------------- |
|
176 |
// |
|
177 |
void CGlxTitleBoundCommand::ChangeMskL() |
|
178 |
{ |
|
179 |
TRACER("CGlxTitleBoundCommand::ChangeMskL"); |
|
180 |
||
181 |
CGlxUiUtility* uiUtility = CGlxUiUtility::UtilityL(); |
|
182 |
uiUtility->ScreenFurniture()->ModifySoftkeyIdL(CEikButtonGroupContainer::EMiddleSoftkeyPosition, |
|
183 |
EAknSoftkeySelect,R_GLX_METADATA_MSK_EDIT); |
|
184 |
if ( uiUtility ) |
|
185 |
{ |
|
186 |
uiUtility->Close(); |
|
187 |
} |
|
188 |
} |
|
189 |
||
190 |
// ---------------------------------------------------------------------------- |
|
191 |
// CGlxTitleBoundCommand::SetDetailsDailogObserver |
|
192 |
// ---------------------------------------------------------------------------- |
|
193 |
// |
|
194 |
void CGlxTitleBoundCommand::SetDetailsDailogObserver( MGlxMetadataDialogObserver& /*aObserver*/ ) |
|
195 |
{ |
|
196 |
||
197 |
} |
|
198 |
||
199 |
// ---------------------------------------------------------------------------- |
|
200 |
// CGlxTagsBoundCommand::NewL |
|
201 |
// ---------------------------------------------------------------------------- |
|
202 |
// |
|
203 |
EXPORT_C CGlxTagsBoundCommand* CGlxTagsBoundCommand::NewL() |
|
204 |
{ |
|
205 |
TRACER("CGlxTagsBoundCommand::NewL"); |
|
206 |
CGlxTagsBoundCommand* self = CGlxTagsBoundCommand::NewLC(); |
|
207 |
self->ConstructL(); |
|
208 |
CleanupStack::Pop( self ); |
|
209 |
return self; |
|
210 |
} |
|
211 |
||
212 |
// ---------------------------------------------------------------------------- |
|
213 |
// CGlxTagsBoundCommand::NewLC |
|
214 |
// ---------------------------------------------------------------------------- |
|
215 |
// |
|
216 |
CGlxTagsBoundCommand* CGlxTagsBoundCommand::NewLC() |
|
217 |
{ |
|
218 |
TRACER("CGlxTagsBoundCommand::NewLC"); |
|
219 |
CGlxTagsBoundCommand* self = new ( ELeave ) CGlxTagsBoundCommand; |
|
220 |
CleanupStack::PushL( self ); |
|
221 |
return self; |
|
222 |
} |
|
223 |
||
224 |
||
225 |
// ---------------------------------------------------------------------------- |
|
226 |
// CGlxTagsBoundCommand::ConstructL |
|
227 |
// ---------------------------------------------------------------------------- |
|
228 |
// |
|
229 |
void CGlxTagsBoundCommand::ConstructL() |
|
230 |
{ |
|
231 |
TRACER("CGlxTagsBoundCommand::ConstructL"); |
|
232 |
TFileName uiutilitiesrscfile; |
|
233 |
uiutilitiesrscfile.Append( |
|
234 |
CGlxResourceUtilities::GetUiUtilitiesResourceFilenameL()); |
|
235 |
//create command handler |
|
236 |
iAddToTag = CGlxCommandHandlerAddToContainer::NewL(this, EGlxCmdAddTag, |
|
237 |
EFalse, uiutilitiesrscfile); |
|
238 |
} |
|
239 |
||
240 |
// ---------------------------------------------------------------------------- |
|
241 |
// CGlxTagsBoundCommand::~CGlxTagsBoundCommand |
|
242 |
// ---------------------------------------------------------------------------- |
|
243 |
// |
|
244 |
CGlxTagsBoundCommand::~CGlxTagsBoundCommand() |
|
245 |
{ |
|
246 |
if(iAddToTag) |
|
247 |
{ |
|
248 |
delete iAddToTag; |
|
249 |
} |
|
250 |
} |
|
251 |
||
252 |
// ---------------------------------------------------------------------------- |
|
253 |
// CGlxTagsBoundCommand::OfferCommandL |
|
254 |
// ---------------------------------------------------------------------------- |
|
255 |
// |
|
256 |
TBool CGlxTagsBoundCommand::OfferCommandL( TInt aCommandId , MGlxMediaList& aMedialist) |
|
257 |
{ |
|
258 |
TRACER("CGlxTagsBoundCommand::OfferCommandL"); |
|
259 |
SetMediaList(&aMedialist); |
|
260 |
TBool consumed = EFalse; |
|
261 |
if ( aCommandId == KGlxEditBoundMenuCommandId ) |
|
262 |
{ |
|
263 |
iAddToTag->ExecuteL(EGlxCmdAddTag); |
|
264 |
consumed = ETrue; |
|
265 |
} |
|
266 |
return consumed; |
|
267 |
} |
|
268 |
||
269 |
// ---------------------------------------------------------------------------- |
|
270 |
// CGlxTagsBoundCommand::InitMenuL |
|
271 |
// ---------------------------------------------------------------------------- |
|
272 |
// |
|
273 |
void CGlxTagsBoundCommand::InitMenuL( CEikMenuPane& aMenu ) const |
|
274 |
{ |
|
275 |
TRACER("CGlxTagsBoundCommand::InitMenuL"); |
|
276 |
aMenu.SetItemTextL( KGlxEditBoundMenuCommandId, R_GLX_METADATA_VIEW_OPTIONS_EDIT ); |
|
277 |
aMenu.SetItemDimmed( KGlxEditBoundMenuCommandId, EFalse ); |
|
278 |
} |
|
279 |
||
280 |
// ---------------------------------------------------------------------------- |
|
281 |
// CGlxTagsBoundCommand::HideLocationMenuItem |
|
282 |
// ---------------------------------------------------------------------------- |
|
283 |
// |
|
284 |
void CGlxTagsBoundCommand::HideLocationMenuItem( CEikMenuPane& aMenu ) const |
|
285 |
{ |
|
286 |
TRACER("CGlxTagsBoundCommand::HideLocationMenuItem"); |
|
287 |
aMenu.SetItemDimmed( EGlxCmdAiwBase, ETrue ); |
|
288 |
} |
|
289 |
||
290 |
// ---------------------------------------------------------------------------- |
|
291 |
// CGlxTagsBoundCommand::Close |
|
292 |
// ---------------------------------------------------------------------------- |
|
293 |
// |
|
294 |
void CGlxTagsBoundCommand::Close() |
|
295 |
{ |
|
296 |
delete this; |
|
297 |
} |
|
298 |
||
299 |
// ---------------------------------------------------------------------------- |
|
300 |
// CGlxTagsBoundCommand::ChangeMskL |
|
301 |
// ---------------------------------------------------------------------------- |
|
302 |
// |
|
303 |
void CGlxTagsBoundCommand::ChangeMskL() |
|
304 |
{ |
|
305 |
TRACER("CGlxTagsBoundCommand::ChangeMskL"); |
|
306 |
||
307 |
CGlxUiUtility* uiUtility = CGlxUiUtility::UtilityL(); |
|
308 |
uiUtility->ScreenFurniture()->ModifySoftkeyIdL(CEikButtonGroupContainer::EMiddleSoftkeyPosition, |
|
309 |
EAknSoftkeySelect,R_GLX_METADATA_MSK_ADD); |
|
310 |
if ( uiUtility ) |
|
311 |
{ |
|
312 |
uiUtility->Close(); |
|
313 |
} |
|
314 |
} |
|
315 |
||
316 |
// ---------------------------------------------------------------------------- |
|
317 |
// CGlxTagsBoundCommand::SetDetailsDailogObserver |
|
318 |
// ---------------------------------------------------------------------------- |
|
319 |
// |
|
320 |
void CGlxTagsBoundCommand::SetDetailsDailogObserver( MGlxMetadataDialogObserver& /*aObserver*/ ) |
|
321 |
{ |
|
322 |
||
323 |
} |
|
324 |
||
325 |
||
326 |
// ---------------------------------------------------------------------------- |
|
327 |
// CGlxTagsBoundCommand::SetMediaList |
|
328 |
// ---------------------------------------------------------------------------- |
|
329 |
// |
|
330 |
void CGlxTagsBoundCommand::SetMediaList(MGlxMediaList* aMedialist) |
|
331 |
{ |
|
332 |
TRACER("CGlxTagsBoundCommand::SetMediaList"); |
|
333 |
iMedialist = aMedialist; |
|
334 |
} |
|
335 |
||
336 |
// ---------------------------------------------------------------------------- |
|
337 |
// CGlxTagsBoundCommand::MediaList |
|
338 |
// ---------------------------------------------------------------------------- |
|
339 |
// |
|
340 |
MGlxMediaList& CGlxTagsBoundCommand::MediaList() |
|
341 |
{ |
|
342 |
TRACER("CGlxTagsBoundCommand::MediaList"); |
|
343 |
return *iMedialist; |
|
344 |
} |
|
345 |
||
346 |
// ---------------------------------------------------------------------------- |
|
347 |
// CGlxDescriptionBoundCommand::NewL |
|
348 |
// ---------------------------------------------------------------------------- |
|
349 |
// |
|
350 |
EXPORT_C CGlxDescriptionBoundCommand* CGlxDescriptionBoundCommand::NewL() |
|
351 |
{ |
|
352 |
TRACER("CGlxDescriptionBoundCommand::NewL"); |
|
353 |
CGlxDescriptionBoundCommand* self = CGlxDescriptionBoundCommand::NewLC(); |
|
354 |
CleanupStack::Pop( self ); |
|
355 |
return self; |
|
356 |
} |
|
357 |
||
358 |
// ---------------------------------------------------------------------------- |
|
359 |
// CGlxDescriptionBoundCommand::NewLC |
|
360 |
// ---------------------------------------------------------------------------- |
|
361 |
// |
|
362 |
CGlxDescriptionBoundCommand* CGlxDescriptionBoundCommand::NewLC() |
|
363 |
{ |
|
364 |
TRACER("CGlxDescriptionBoundCommand::NewLC"); |
|
365 |
CGlxDescriptionBoundCommand* self = new ( ELeave ) CGlxDescriptionBoundCommand; |
|
366 |
CleanupStack::PushL( self ); |
|
367 |
return self; |
|
368 |
} |
|
369 |
||
370 |
CGlxDescriptionBoundCommand::~CGlxDescriptionBoundCommand() |
|
371 |
{ |
|
372 |
||
373 |
} |
|
374 |
||
375 |
// ---------------------------------------------------------------------------- |
|
376 |
// CGlxDescriptionBoundCommand::OfferCommandL |
|
377 |
// ---------------------------------------------------------------------------- |
|
378 |
// |
|
379 |
TBool CGlxDescriptionBoundCommand::OfferCommandL( TInt aCommandId , MGlxMediaList& aMedialist ) |
|
380 |
{ |
|
381 |
TRACER("CGlxDescriptionBoundCommand::OfferCommandL"); |
|
382 |
TBool consumed = EFalse; |
|
383 |
iMedialist = &aMedialist; |
|
384 |
const CGlxMedia* media = iMedialist->Item(0).Properties(); |
|
385 |
if ( aCommandId == KGlxEditBoundMenuCommandId ) |
|
386 |
{ |
|
387 |
///@todo - remove popup when editable template is avaliable |
|
388 |
//Popup for testing |
|
75
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
389 |
HBufC* textBuf = HBufC::NewLC( KMaxMediaPopupTitleLength ); |
60 | 390 |
(textBuf->Des()).Copy((media->ValueText(KMPXMediaGeneralComment))); |
391 |
TPtr textPtr = textBuf->Des(); |
|
392 |
/// bug fix - EMPY-7MCKD6 |
|
75
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
393 |
TBuf<KMaxMediaPopupTitleLength> descText(*textBuf); |
60 | 394 |
/// bug fix - EMPY-7MCKD6 |
395 |
///@todo - remove literal for popup title when resource string is avaliable |
|
396 |
||
397 |
HBufC *buf = StringLoader::LoadLC(R_GLX_METADATA_VIEW_DESCRIPTION_NSERIES); |
|
398 |
CGlxTextEntryPopup* popup = CGlxTextEntryPopup::NewL( *buf, textPtr ); |
|
399 |
CleanupStack::PopAndDestroy(buf); |
|
400 |
||
401 |
||
402 |
if ( popup->ExecuteLD() == EEikBidOk ) |
|
403 |
{ |
|
404 |
// Text entry was successful |
|
405 |
/// bug fix - EMPY-7MCKD6 |
|
406 |
//Compare if there is any change in the entry |
|
407 |
if(0 != (descText.Compare(*textBuf))) |
|
408 |
/// bug fix - EMPY-7MCKD6 |
|
409 |
ModifyDescriptionL( *textBuf ); |
|
410 |
} |
|
411 |
CleanupStack::PopAndDestroy( textBuf ); |
|
412 |
consumed = ETrue; |
|
413 |
} |
|
414 |
return consumed; |
|
415 |
} |
|
416 |
||
417 |
// ---------------------------------------------------------------------------- |
|
418 |
// CGlxDescriptionBoundCommand::InitMenuL |
|
419 |
// ---------------------------------------------------------------------------- |
|
420 |
// |
|
421 |
void CGlxDescriptionBoundCommand::InitMenuL( CEikMenuPane& aMenu ) const |
|
422 |
{ |
|
423 |
TRACER("CGlxDescriptionBoundCommand::InitMenuL"); |
|
424 |
aMenu.SetItemTextL( KGlxEditBoundMenuCommandId, R_GLX_METADATA_VIEW_OPTIONS_EDIT ); |
|
425 |
aMenu.SetItemDimmed( KGlxEditBoundMenuCommandId, EFalse ); |
|
426 |
} |
|
427 |
||
428 |
// ---------------------------------------------------------------------------- |
|
429 |
// CGlxDescriptionBoundCommand::HideLocationMenuItem |
|
430 |
// ---------------------------------------------------------------------------- |
|
431 |
// |
|
432 |
void CGlxDescriptionBoundCommand::HideLocationMenuItem( CEikMenuPane& aMenu ) const |
|
433 |
{ |
|
434 |
TRACER("CGlxDescriptionBoundCommand::HideLocationMenuItem"); |
|
435 |
aMenu.SetItemDimmed( EGlxCmdAiwBase, ETrue ); |
|
436 |
} |
|
437 |
||
438 |
// ---------------------------------------------------------------------------- |
|
439 |
// CGlxDescriptionBoundCommand::Close |
|
440 |
// ---------------------------------------------------------------------------- |
|
441 |
// |
|
442 |
void CGlxDescriptionBoundCommand::Close() |
|
443 |
{ |
|
444 |
delete this; |
|
445 |
} |
|
446 |
||
447 |
// ---------------------------------------------------------------------------- |
|
448 |
// CGlxDescriptionBoundCommand::ChangeMskL |
|
449 |
// ---------------------------------------------------------------------------- |
|
450 |
// |
|
451 |
void CGlxDescriptionBoundCommand::ChangeMskL() |
|
452 |
{ |
|
453 |
TRACER("CGlxDescriptionBoundCommand::ChangeMskL"); |
|
454 |
||
455 |
CGlxUiUtility* uiUtility = CGlxUiUtility::UtilityL(); |
|
456 |
uiUtility->ScreenFurniture()->ModifySoftkeyIdL(CEikButtonGroupContainer::EMiddleSoftkeyPosition, |
|
457 |
EAknSoftkeySelect,R_GLX_METADATA_MSK_EDIT); |
|
458 |
if ( uiUtility ) |
|
459 |
{ |
|
460 |
uiUtility->Close(); |
|
461 |
} |
|
462 |
} |
|
463 |
||
464 |
// ---------------------------------------------------------------------------- |
|
465 |
// CGlxDescriptionBoundCommand::SetDetailsDailogObserver |
|
466 |
// ---------------------------------------------------------------------------- |
|
467 |
// |
|
468 |
void CGlxDescriptionBoundCommand::SetDetailsDailogObserver( MGlxMetadataDialogObserver& /*aObserver*/ ) |
|
469 |
{ |
|
470 |
||
471 |
} |
|
472 |
||
473 |
||
474 |
// ----------------------------------------------------------------------------- |
|
475 |
// CGlxDescriptionBoundCommand::ModifyDescriptionL |
|
476 |
// ----------------------------------------------------------------------------- |
|
477 |
// |
|
478 |
void CGlxDescriptionBoundCommand::ModifyDescriptionL(const TDesC& aData ) |
|
479 |
{ |
|
480 |
TRACER("CGlxDescriptionBoundCommand::ModifyDescriptionL"); |
|
481 |
if( iMedialist->Count() > 0 ) |
|
482 |
{ |
|
483 |
iMedialist->SetFocusL(NGlxListDefs::EAbsolute,0);//set focus to first item |
|
484 |
CMPXCollectionPath* path = iMedialist->PathLC(); |
|
485 |
CMPXCommand* command = TGlxCommandFactory::SetDescriptionCommandLC(aData,*path); |
|
486 |
command->SetTObjectValueL<TAny*>(KMPXCommandGeneralSessionId, static_cast<TAny*>(this)); |
|
487 |
||
488 |
iMedialist->CommandL(*command); |
|
489 |
CleanupStack::PopAndDestroy(command); |
|
490 |
CleanupStack::PopAndDestroy(path); |
|
491 |
} |
|
492 |
} |
|
493 |
||
494 |
// ---------------------------------------------------------------------------- |
|
495 |
// CGlxLocationBoundCommand::NewL |
|
496 |
// ---------------------------------------------------------------------------- |
|
497 |
// |
|
498 |
EXPORT_C CGlxLocationBoundCommand* CGlxLocationBoundCommand::NewL() |
|
499 |
{ |
|
500 |
TRACER("CGlxLocationBoundCommand::NewL"); |
|
501 |
CGlxLocationBoundCommand* self = CGlxLocationBoundCommand::NewLC(); |
|
502 |
CleanupStack::Pop( self ); |
|
503 |
return self; |
|
504 |
} |
|
505 |
||
506 |
// ---------------------------------------------------------------------------- |
|
507 |
// CGlxLocationBoundCommand::NewLC |
|
508 |
// ---------------------------------------------------------------------------- |
|
509 |
// |
|
510 |
CGlxLocationBoundCommand* CGlxLocationBoundCommand::NewLC() |
|
511 |
{ |
|
512 |
TRACER("CGlxLocationBoundCommand::NewLC"); |
|
513 |
CGlxLocationBoundCommand* self = new ( ELeave ) CGlxLocationBoundCommand; |
|
514 |
CleanupStack::PushL( self ); |
|
515 |
return self; |
|
516 |
} |
|
517 |
||
518 |
CGlxLocationBoundCommand::~CGlxLocationBoundCommand() |
|
519 |
{ |
|
520 |
iDialogObserver = NULL ; |
|
521 |
} |
|
522 |
||
523 |
// ---------------------------------------------------------------------------- |
|
524 |
// CGlxLocationBoundCommand::OfferCommandL |
|
525 |
// ---------------------------------------------------------------------------- |
|
526 |
// |
|
527 |
TBool CGlxLocationBoundCommand::OfferCommandL( TInt aCommandId , MGlxMediaList& aMedialist ) |
|
528 |
{ |
|
529 |
TRACER("CGlxLocationBoundCommand::OfferCommandL"); |
|
530 |
iMedialist = &aMedialist; |
|
531 |
TBool consumed = EFalse; |
|
532 |
if ( aCommandId == KGlxEditBoundMenuCommandId ) |
|
533 |
{ |
|
534 |
iOnNaviKeySelect = ETrue; |
|
535 |
//get the media item |
|
536 |
const TGlxMedia& media = iMedialist->Item( 0 ); |
|
537 |
// Test to see if the coordinate is present |
|
538 |
TCoordinate coordinate; |
|
539 |
TBool isSupported = media.GetCoordinate(coordinate); |
|
540 |
if(!isSupported) |
|
541 |
{ |
|
542 |
HBufC *buf = StringLoader::LoadLC(R_GLX_METADATA_NOTE_INFO_NO_LOCATION); |
|
543 |
GlxGeneralUiUtilities::ShowInfoNoteL(*buf,ETrue); |
|
544 |
CleanupStack::PopAndDestroy(buf); |
|
545 |
consumed = ETrue; |
|
546 |
} |
|
547 |
else |
|
548 |
{ |
|
549 |
/** Show menu pane options **/ |
|
550 |
if(iDialogObserver) |
|
551 |
{ |
|
552 |
TRAP_IGNORE(iDialogObserver->OnLocationEditL()); |
|
553 |
} |
|
554 |
} |
|
555 |
} |
|
556 |
else |
|
557 |
{ |
|
558 |
iOnNaviKeySelect = EFalse; |
|
559 |
} |
|
560 |
if ( aCommandId == KGlxDeleteBoundMenuCommandId ) |
|
561 |
{ |
|
562 |
RemoveLocationL(); |
|
563 |
consumed = ETrue; |
|
564 |
} |
|
565 |
return consumed; |
|
566 |
} |
|
567 |
||
568 |
// ---------------------------------------------------------------------------- |
|
569 |
// CGlxLocationBoundCommand::InitMenuL |
|
570 |
// ---------------------------------------------------------------------------- |
|
571 |
// |
|
572 |
void CGlxLocationBoundCommand::InitMenuL( CEikMenuPane& aMenu ) const |
|
573 |
{ |
|
574 |
TRACER("CGlxLocationBoundCommand::InitMenuL"); |
|
575 |
aMenu.SetItemTextL( EGlxCmdAiwShowMap, R_GLX_METADATA_SHOW_ON_MAP_OPTIONS_VIEW ); |
|
576 |
aMenu.SetItemDimmed( EGlxCmdAiwShowMap, EFalse ); |
|
577 |
aMenu.SetItemTextL( KGlxDeleteBoundMenuCommandId, R_GLX_METADATA_VIEW_OPTIONS_DELETE ); |
|
578 |
aMenu.SetItemDimmed( KGlxDeleteBoundMenuCommandId, EFalse ); |
|
579 |
if( iOnNaviKeySelect ) |
|
580 |
{ |
|
581 |
aMenu.SetItemDimmed( EAknCmdHelp, ETrue ); |
|
582 |
} |
|
583 |
} |
|
584 |
||
585 |
// ---------------------------------------------------------------------------- |
|
586 |
// CGlxLocationBoundCommand::HideLocationMenuItem |
|
587 |
// ---------------------------------------------------------------------------- |
|
588 |
// |
|
589 |
void CGlxLocationBoundCommand::HideLocationMenuItem(CEikMenuPane& /*aMenu*/) const |
|
590 |
{ |
|
591 |
TRACER("CGlxLocationBoundCommand::HideLocationMenuItem"); |
|
592 |
} |
|
593 |
||
594 |
// ---------------------------------------------------------------------------- |
|
595 |
// CGlxLocationBoundCommand::Close |
|
596 |
// ---------------------------------------------------------------------------- |
|
597 |
// |
|
598 |
void CGlxLocationBoundCommand::Close() |
|
599 |
{ |
|
600 |
delete this; |
|
601 |
} |
|
602 |
||
603 |
// ---------------------------------------------------------------------------- |
|
604 |
// CGlxLocationBoundCommand::ChangeMskL |
|
605 |
// ---------------------------------------------------------------------------- |
|
606 |
// |
|
607 |
void CGlxLocationBoundCommand::ChangeMskL() |
|
608 |
{ |
|
609 |
TRACER("CGlxLocationBoundCommand::ChangeMskL"); |
|
610 |
||
611 |
CGlxUiUtility* uiUtility = CGlxUiUtility::UtilityL(); |
|
612 |
uiUtility->ScreenFurniture()->ModifySoftkeyIdL(CEikButtonGroupContainer::EMiddleSoftkeyPosition, |
|
613 |
EAknSoftkeySelect,R_GLX_METADATA_MSK_BLANK); |
|
614 |
if ( uiUtility ) |
|
615 |
{ |
|
616 |
uiUtility->Close(); |
|
617 |
} |
|
618 |
} |
|
619 |
||
620 |
// ----------------------------------------------------------------------------- |
|
621 |
// CGlxLocationBoundCommand::RemoveLocationL |
|
622 |
// ----------------------------------------------------------------------------- |
|
623 |
// |
|
624 |
void CGlxLocationBoundCommand::RemoveLocationL() |
|
625 |
{ |
|
626 |
TRACER("CGlxLocationBoundCommand::RemoveLocationL"); |
|
627 |
||
628 |
// get the media item |
|
629 |
const TGlxMedia& media = iMedialist->Item( 0 ); |
|
630 |
||
631 |
// Test to see if the coordinate is present |
|
632 |
TCoordinate coordinate; |
|
633 |
TBool isSupported = media.GetCoordinate(coordinate); |
|
634 |
||
635 |
if( !isSupported ) |
|
636 |
{ |
|
637 |
HBufC *buf = StringLoader::LoadLC(R_GLX_METADATA_NOTE_INFO_NO_LOCATION); |
|
638 |
GlxGeneralUiUtilities::ShowInfoNoteL(*buf,ETrue); |
|
639 |
CleanupStack::PopAndDestroy(buf); |
|
640 |
} |
|
641 |
else |
|
642 |
{ |
|
643 |
HBufC *buf = StringLoader::LoadLC(R_GLX_METADATA_NOTE_DELETE_LOCATION); |
|
644 |
TBool response = GlxGeneralUiUtilities::ConfirmQueryL(R_GLX_QUERY_YES_NO,*buf); |
|
645 |
CleanupStack::PopAndDestroy(buf); |
|
646 |
||
647 |
if( response ) |
|
648 |
{ |
|
649 |
//user selected yes, so delete location |
|
650 |
//send command for delete location after successfull removal of command remove this pane |
|
651 |
if( iMedialist->Count() > 0 ) |
|
652 |
{ |
|
653 |
iMedialist->SetFocusL(NGlxListDefs::EAbsolute,0);//set focus to first item |
|
654 |
||
655 |
// Deleting location information from image file |
|
656 |
||
657 |
RFs rFs; |
|
658 |
User::LeaveIfError( rFs.Connect() ); |
|
659 |
CleanupClosePushL( rFs ); |
|
660 |
RFile rFile; |
|
661 |
||
662 |
User::LeaveIfError( rFile.Open(rFs,iMedialist->Item(0).Uri(),EFileWrite )); |
|
663 |
CleanupClosePushL( rFile ); |
|
664 |
||
665 |
TInt imageFileSize = 0; // Image File Size |
|
666 |
User::LeaveIfError( rFile.Size( imageFileSize ) ); |
|
667 |
HBufC8* imageData = HBufC8::NewL( imageFileSize ); //Actual Image Data |
|
668 |
CleanupStack::PushL( imageData ); |
|
669 |
||
670 |
TPtr8 myImagePtr = imageData->Des(); |
|
671 |
TInt readError = rFile.Read( myImagePtr ); |
|
672 |
if ( readError != KErrNone ) |
|
673 |
{ |
|
674 |
User::Leave( KErrGeneral ); |
|
675 |
} |
|
676 |
||
677 |
//CExifModify Interface class for modifying existing Exif v2.2 (or prior) |
|
678 |
//file format or creating Exif v2.2 file format using valid Jpeg image |
|
679 |
CExifModify* exifWriter = CExifModify::NewL( imageData->Des(), CExifModify::EModify, CExifModify::ENoJpegParsing ); |
|
680 |
CleanupStack::PushL( exifWriter ); |
|
681 |
//Removes the specified IFD structure and all its tags from the Exif data |
|
682 |
exifWriter->DeleteIfd ( EIfdGps ); |
|
683 |
||
684 |
HBufC8* modifiedExif = exifWriter->WriteDataL( imageData->Des() ); //Modified Image Data |
|
685 |
CleanupStack::PushL( modifiedExif ); |
|
686 |
||
687 |
const TUint32 fileSize = modifiedExif->Des().Length(); //Size of Modified File |
|
688 |
TInt oldSize; |
|
689 |
rFile.Size( oldSize ); |
|
690 |
// set position to begin of file & write the Modified data (Without Location Information) |
|
691 |
TInt pos = 0; |
|
692 |
User::LeaveIfError( rFile.Seek( ESeekStart, pos ) ); |
|
693 |
User::LeaveIfError( rFile.Write( modifiedExif->Des(), fileSize ) ); |
|
694 |
||
695 |
TTime lastModified; |
|
696 |
lastModified.UniversalTime(); |
|
697 |
||
698 |
User::LeaveIfError( rFile.SetModified( lastModified ) ); //Change the Modified Time |
|
699 |
||
700 |
CleanupStack::PopAndDestroy( modifiedExif); |
|
701 |
CleanupStack::PopAndDestroy( exifWriter); |
|
702 |
CleanupStack::PopAndDestroy( imageData ); |
|
703 |
CleanupStack::PopAndDestroy( &rFile ); |
|
704 |
CleanupStack::PopAndDestroy( &rFs ); |
|
705 |
||
706 |
// Deleting location information from MDS database |
|
707 |
||
708 |
CMPXCollectionPath* path = iMedialist->PathLC(); |
|
709 |
CMPXCommand* command = TGlxCommandFactory::DeleteLocationCommandLC(*path); |
|
710 |
||
711 |
command->SetTObjectValueL<TAny*>(KMPXCommandGeneralSessionId, static_cast<TAny*>(this)); |
|
712 |
||
713 |
iMedialist->CommandL(*command); |
|
714 |
||
715 |
CleanupStack::PopAndDestroy(command); |
|
716 |
CleanupStack::PopAndDestroy(path); |
|
717 |
} |
|
718 |
} |
|
719 |
} |
|
720 |
} |
|
721 |
||
722 |
// ----------------------------------------------------------------------------- |
|
723 |
// CGlxLocationBoundCommand::SetDetailsDailogObserver |
|
724 |
// ----------------------------------------------------------------------------- |
|
725 |
// |
|
726 |
void CGlxLocationBoundCommand::SetDetailsDailogObserver(MGlxMetadataDialogObserver& aObserver) |
|
727 |
{ |
|
728 |
/** Error Id EMPY-7MKDHP **/ |
|
729 |
iDialogObserver = &aObserver ; |
|
730 |
} |
|
731 |
||
732 |
// ---------------------------------------------------------------------------- |
|
733 |
// CGlxAlbumsBoundCommand::NewL |
|
734 |
// ---------------------------------------------------------------------------- |
|
735 |
// |
|
736 |
EXPORT_C CGlxAlbumsBoundCommand* CGlxAlbumsBoundCommand::NewL() |
|
737 |
{ |
|
738 |
TRACER("CGlxAlbumsBoundCommand::NewL"); |
|
739 |
CGlxAlbumsBoundCommand* self = CGlxAlbumsBoundCommand::NewLC(); |
|
740 |
self->ConstructL(); |
|
741 |
CleanupStack::Pop( self ); |
|
742 |
return self; |
|
743 |
} |
|
744 |
||
745 |
// ---------------------------------------------------------------------------- |
|
746 |
// CGlxAlbumsBoundCommand::NewLC |
|
747 |
// ---------------------------------------------------------------------------- |
|
748 |
// |
|
749 |
CGlxAlbumsBoundCommand* CGlxAlbumsBoundCommand::NewLC() |
|
750 |
{ |
|
751 |
TRACER("CGlxAlbumsBoundCommand::NewLC"); |
|
752 |
CGlxAlbumsBoundCommand* self = new ( ELeave ) CGlxAlbumsBoundCommand; |
|
753 |
CleanupStack::PushL( self ); |
|
754 |
return self; |
|
755 |
} |
|
756 |
||
757 |
||
758 |
// ---------------------------------------------------------------------------- |
|
759 |
// CGlxAlbumsBoundCommand::ConstructL |
|
760 |
// ---------------------------------------------------------------------------- |
|
761 |
// |
|
762 |
void CGlxAlbumsBoundCommand::ConstructL() |
|
763 |
{ |
|
764 |
TRACER("CGlxAlbumsBoundCommand::ConstructL"); |
|
765 |
TFileName uiutilitiesrscfile; |
|
766 |
uiutilitiesrscfile.Append( |
|
767 |
CGlxResourceUtilities::GetUiUtilitiesResourceFilenameL()); |
|
768 |
//create command handler |
|
769 |
iAddToAlbum = CGlxCommandHandlerAddToContainer::NewL(this, |
|
770 |
EGlxCmdAddToAlbum, EFalse, uiutilitiesrscfile); |
|
771 |
} |
|
772 |
||
773 |
// ---------------------------------------------------------------------------- |
|
774 |
// CGlxAlbumsBoundCommand::~CGlxAlbumsBoundCommand |
|
775 |
// ---------------------------------------------------------------------------- |
|
776 |
// |
|
777 |
CGlxAlbumsBoundCommand::~CGlxAlbumsBoundCommand() |
|
778 |
{ |
|
779 |
if(iAddToAlbum) |
|
780 |
{ |
|
781 |
delete iAddToAlbum; |
|
782 |
} |
|
783 |
} |
|
784 |
||
785 |
// ---------------------------------------------------------------------------- |
|
786 |
// CGlxAlbumsBoundCommand::OfferCommandL |
|
787 |
// ---------------------------------------------------------------------------- |
|
788 |
// |
|
789 |
TBool CGlxAlbumsBoundCommand::OfferCommandL( TInt aCommandId , MGlxMediaList& aMedialist) |
|
790 |
{ |
|
791 |
TRACER("CGlxAlbumsBoundCommand::OfferCommandL"); |
|
792 |
SetMediaList(&aMedialist); |
|
793 |
TBool consumed = EFalse; |
|
794 |
if ( aCommandId == KGlxEditBoundMenuCommandId ) |
|
795 |
{ |
|
796 |
iAddToAlbum->ExecuteL(EGlxCmdAddToAlbum); |
|
797 |
consumed = ETrue; |
|
798 |
} |
|
799 |
return consumed; |
|
800 |
} |
|
801 |
||
802 |
// ---------------------------------------------------------------------------- |
|
803 |
// CGlxAlbumsBoundCommand::InitMenuL |
|
804 |
// ---------------------------------------------------------------------------- |
|
805 |
// |
|
806 |
void CGlxAlbumsBoundCommand::InitMenuL( CEikMenuPane& aMenu ) const |
|
807 |
{ |
|
808 |
TRACER("CGlxAlbumsBoundCommand::InitMenuL"); |
|
809 |
aMenu.SetItemTextL( KGlxEditBoundMenuCommandId, R_GLX_METADATA_VIEW_OPTIONS_EDIT ); |
|
810 |
aMenu.SetItemDimmed( KGlxEditBoundMenuCommandId, EFalse ); |
|
811 |
} |
|
812 |
||
813 |
// ---------------------------------------------------------------------------- |
|
814 |
// CGlxAlbumsBoundCommand::HideLocationMenuItem |
|
815 |
// ---------------------------------------------------------------------------- |
|
816 |
// |
|
817 |
void CGlxAlbumsBoundCommand::HideLocationMenuItem( CEikMenuPane& aMenu ) const |
|
818 |
{ |
|
819 |
TRACER("CGlxAlbumsBoundCommand::HideLocationMenuItem"); |
|
820 |
aMenu.SetItemDimmed( EGlxCmdAiwBase, ETrue ); |
|
821 |
} |
|
822 |
||
823 |
// ---------------------------------------------------------------------------- |
|
824 |
// CGlxAlbumsBoundCommand::Close |
|
825 |
// ---------------------------------------------------------------------------- |
|
826 |
// |
|
827 |
void CGlxAlbumsBoundCommand::Close() |
|
828 |
{ |
|
829 |
delete this; |
|
830 |
} |
|
831 |
||
832 |
// ---------------------------------------------------------------------------- |
|
833 |
// CGlxAlbumsBoundCommand::ChangeMskL |
|
834 |
// ---------------------------------------------------------------------------- |
|
835 |
// |
|
836 |
void CGlxAlbumsBoundCommand::ChangeMskL() |
|
837 |
{ |
|
838 |
TRACER("CGlxAlbumsBoundCommand::ChangeMskL"); |
|
839 |
||
840 |
CGlxUiUtility* uiUtility = CGlxUiUtility::UtilityL(); |
|
841 |
uiUtility->ScreenFurniture()->ModifySoftkeyIdL(CEikButtonGroupContainer::EMiddleSoftkeyPosition, |
|
842 |
EAknSoftkeySelect,R_GLX_METADATA_MSK_ADD); |
|
843 |
if ( uiUtility ) |
|
844 |
{ |
|
845 |
uiUtility->Close(); |
|
846 |
} |
|
847 |
} |
|
848 |
||
849 |
// ---------------------------------------------------------------------------- |
|
850 |
// CGlxAlbumsBoundCommand::SetDetailsDailogObserver |
|
851 |
// ---------------------------------------------------------------------------- |
|
852 |
// |
|
853 |
void CGlxAlbumsBoundCommand::SetDetailsDailogObserver( MGlxMetadataDialogObserver& /*aObserver*/ ) |
|
854 |
{ |
|
855 |
||
856 |
} |
|
857 |
||
858 |
||
859 |
// ---------------------------------------------------------------------------- |
|
860 |
// CGlxAlbumsBoundCommand::SetMediaList |
|
861 |
// ---------------------------------------------------------------------------- |
|
862 |
// |
|
863 |
void CGlxAlbumsBoundCommand::SetMediaList(MGlxMediaList* aMedialist) |
|
864 |
{ |
|
865 |
TRACER("CGlxAlbumsBoundCommand::SetMediaList"); |
|
866 |
iMedialist = aMedialist; |
|
867 |
} |
|
868 |
||
869 |
// ---------------------------------------------------------------------------- |
|
870 |
// CGlxAlbumsBoundCommand::MediaList |
|
871 |
// ---------------------------------------------------------------------------- |
|
872 |
// |
|
873 |
MGlxMediaList& CGlxAlbumsBoundCommand::MediaList() |
|
874 |
{ |
|
875 |
TRACER("CGlxAlbumsBoundCommand::MediaList"); |
|
876 |
return *iMedialist; |
|
877 |
} |
|
878 |
||
879 |
// ---------------------------------------------------------------------------- |
|
880 |
// CGlxResolutionBoundCommand::NewL |
|
881 |
// ---------------------------------------------------------------------------- |
|
882 |
// |
|
883 |
EXPORT_C CGlxResolutionBoundCommand* CGlxResolutionBoundCommand::NewL() |
|
884 |
{ |
|
885 |
TRACER("CGlxResolutionBoundCommand::NewL"); |
|
886 |
CGlxResolutionBoundCommand* self = CGlxResolutionBoundCommand::NewLC(); |
|
887 |
CleanupStack::Pop( self ); |
|
888 |
return self; |
|
889 |
} |
|
890 |
||
891 |
// ---------------------------------------------------------------------------- |
|
892 |
// CGlxResolutionBoundCommand::NewLC |
|
893 |
// ---------------------------------------------------------------------------- |
|
894 |
// |
|
895 |
CGlxResolutionBoundCommand* CGlxResolutionBoundCommand::NewLC() |
|
896 |
{ |
|
897 |
TRACER("CGlxResolutionBoundCommand::NewLC"); |
|
898 |
CGlxResolutionBoundCommand* self = new ( ELeave ) CGlxResolutionBoundCommand; |
|
899 |
CleanupStack::PushL( self ); |
|
900 |
return self; |
|
901 |
} |
|
902 |
||
903 |
CGlxResolutionBoundCommand::~CGlxResolutionBoundCommand() |
|
904 |
{ |
|
905 |
||
906 |
} |
|
907 |
||
908 |
// ---------------------------------------------------------------------------- |
|
909 |
// CGlxResolutionBoundCommand::OfferCommandL |
|
910 |
// ---------------------------------------------------------------------------- |
|
911 |
// |
|
912 |
TBool CGlxResolutionBoundCommand::OfferCommandL( TInt /*aCommandId*/ , MGlxMediaList& /*aMedialist*/ ) |
|
913 |
{ |
|
914 |
TRACER("CGlxResolutionBoundCommand::OfferCommandL"); |
|
915 |
return ETrue; |
|
916 |
} |
|
917 |
||
918 |
// ---------------------------------------------------------------------------- |
|
919 |
// CGlxResolutionBoundCommand::InitMenuL |
|
920 |
// ---------------------------------------------------------------------------- |
|
921 |
// |
|
922 |
void CGlxResolutionBoundCommand::InitMenuL( CEikMenuPane& /*aMenu*/ ) const |
|
923 |
{ |
|
924 |
// no implementation |
|
925 |
} |
|
926 |
||
927 |
// ---------------------------------------------------------------------------- |
|
928 |
// CGlxResolutionBoundCommand::HideLocationMenuItem |
|
929 |
// ---------------------------------------------------------------------------- |
|
930 |
// |
|
931 |
void CGlxResolutionBoundCommand::HideLocationMenuItem( CEikMenuPane& aMenu ) const |
|
932 |
{ |
|
933 |
TRACER("CGlxResolutionBoundCommand::HideLocationMenuItem"); |
|
934 |
aMenu.SetItemDimmed( EGlxCmdAiwBase, ETrue ); |
|
935 |
} |
|
936 |
||
937 |
// ---------------------------------------------------------------------------- |
|
938 |
// CGlxResolutionBoundCommand::Close |
|
939 |
// ---------------------------------------------------------------------------- |
|
940 |
// |
|
941 |
void CGlxResolutionBoundCommand::Close() |
|
942 |
{ |
|
943 |
delete this; |
|
944 |
} |
|
945 |
||
946 |
// ---------------------------------------------------------------------------- |
|
947 |
// CGlxResolutionBoundCommand::ChangeMskL |
|
948 |
// ---------------------------------------------------------------------------- |
|
949 |
// |
|
950 |
void CGlxResolutionBoundCommand::ChangeMskL() |
|
951 |
{ |
|
952 |
TRACER("CGlxResolutionBoundCommand::ChangeMskL"); |
|
953 |
||
954 |
CGlxUiUtility* uiUtility = CGlxUiUtility::UtilityL(); |
|
955 |
uiUtility->ScreenFurniture()->ModifySoftkeyIdL(CEikButtonGroupContainer::EMiddleSoftkeyPosition, |
|
956 |
EAknSoftkeyEmpty,R_GLX_METADATA_MSK_BLANK); |
|
957 |
if ( uiUtility ) |
|
958 |
{ |
|
959 |
uiUtility->Close(); |
|
960 |
} |
|
961 |
} |
|
962 |
||
963 |
// ---------------------------------------------------------------------------- |
|
964 |
// CGlxResolutionBoundCommand::SetDetailsDailogObserver |
|
965 |
// ---------------------------------------------------------------------------- |
|
966 |
// |
|
967 |
void CGlxResolutionBoundCommand::SetDetailsDailogObserver( MGlxMetadataDialogObserver& /*aObserver*/ ) |
|
968 |
{ |
|
969 |
||
970 |
} |
|
971 |
||
972 |
// ---------------------------------------------------------------------------- |
|
973 |
// CGlxUsageRightsBoundCommand::NewL( |
|
974 |
// ---------------------------------------------------------------------------- |
|
975 |
// |
|
976 |
EXPORT_C CGlxUsageRightsBoundCommand* CGlxUsageRightsBoundCommand::NewL() |
|
977 |
{ |
|
978 |
TRACER("CGlxUsageRightsBoundCommand::NewL"); |
|
979 |
CGlxUsageRightsBoundCommand* self = CGlxUsageRightsBoundCommand::NewLC(); |
|
980 |
CleanupStack::Pop( self ); |
|
981 |
return self; |
|
982 |
} |
|
983 |
||
984 |
// ---------------------------------------------------------------------------- |
|
985 |
// CGlxUsageRightsBoundCommand::NewLC |
|
986 |
// ---------------------------------------------------------------------------- |
|
987 |
// |
|
988 |
CGlxUsageRightsBoundCommand* CGlxUsageRightsBoundCommand::NewLC() |
|
989 |
{ |
|
990 |
TRACER("CGlxUsageRightsBoundCommand::NewLC"); |
|
991 |
CGlxUsageRightsBoundCommand* self = new ( ELeave ) CGlxUsageRightsBoundCommand; |
|
992 |
CleanupStack::PushL( self ); |
|
993 |
return self; |
|
994 |
} |
|
995 |
||
996 |
CGlxUsageRightsBoundCommand::~CGlxUsageRightsBoundCommand() |
|
997 |
{ |
|
998 |
||
999 |
} |
|
1000 |
||
1001 |
// ---------------------------------------------------------------------------- |
|
1002 |
// CGlxUsageRightsBoundCommand::OfferCommandL |
|
1003 |
// ---------------------------------------------------------------------------- |
|
1004 |
// |
|
1005 |
TBool CGlxUsageRightsBoundCommand::OfferCommandL( TInt aCommandId , MGlxMediaList& aMedialist) |
|
1006 |
{ |
|
1007 |
TRACER("CGlxUsageRightsBoundCommand::OfferCommandL"); |
|
1008 |
SetMediaList(&aMedialist); |
|
1009 |
TBool consumed = EFalse; |
|
1010 |
if ( aCommandId == KGlxViewBoundMenuCommandId || aCommandId == KGlxEditBoundMenuCommandId ) |
|
1011 |
{ |
|
1012 |
LaunchDRMViewL(); |
|
1013 |
consumed = ETrue; |
|
1014 |
} |
|
1015 |
return consumed; |
|
1016 |
} |
|
1017 |
||
1018 |
// ---------------------------------------------------------------------------- |
|
1019 |
// CGlxUsageRightsBoundCommand::InitMenuL |
|
1020 |
// ---------------------------------------------------------------------------- |
|
1021 |
// |
|
1022 |
void CGlxUsageRightsBoundCommand::InitMenuL( CEikMenuPane& aMenu ) const |
|
1023 |
{ |
|
1024 |
TRACER("CGlxUsageRightsBoundCommand::InitMenuL"); |
|
75
01504893d9cb
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
60
diff
changeset
|
1025 |
aMenu.SetItemTextL( KGlxViewBoundMenuCommandId, R_GLX_METADATA_VIEW_OPTIONS_VIEW ); |
60 | 1026 |
aMenu.SetItemDimmed( KGlxViewBoundMenuCommandId, EFalse ); |
1027 |
} |
|
1028 |
||
1029 |
// ---------------------------------------------------------------------------- |
|
1030 |
// CGlxUsageRightsBoundCommand::HideLocationMenuItem |
|
1031 |
// ---------------------------------------------------------------------------- |
|
1032 |
// |
|
1033 |
void CGlxUsageRightsBoundCommand::HideLocationMenuItem( CEikMenuPane& aMenu ) const |
|
1034 |
{ |
|
1035 |
TRACER("CGlxUsageRightsBoundCommand::HideLocationMenuItem"); |
|
1036 |
aMenu.SetItemDimmed( EGlxCmdAiwBase, ETrue ); |
|
1037 |
} |
|
1038 |
||
1039 |
// ---------------------------------------------------------------------------- |
|
1040 |
// CGlxUsageRightsBoundCommand::Close |
|
1041 |
// ---------------------------------------------------------------------------- |
|
1042 |
// |
|
1043 |
void CGlxUsageRightsBoundCommand::Close() |
|
1044 |
{ |
|
1045 |
delete this; |
|
1046 |
} |
|
1047 |
||
1048 |
// ---------------------------------------------------------------------------- |
|
1049 |
// CGlxUsageRightsBoundCommand::ChangeMskL |
|
1050 |
// ---------------------------------------------------------------------------- |
|
1051 |
// |
|
1052 |
void CGlxUsageRightsBoundCommand::ChangeMskL() |
|
1053 |
{ |
|
1054 |
TRACER("CGlxUsageRightsBoundCommand::ChangeMskL"); |
|
1055 |
||
1056 |
CGlxUiUtility* uiUtility = CGlxUiUtility::UtilityL(); |
|
1057 |
uiUtility->ScreenFurniture()->ModifySoftkeyIdL(CEikButtonGroupContainer::EMiddleSoftkeyPosition, |
|
1058 |
EAknSoftkeySelect,R_GLX_METADATA_MSK_BLANK); |
|
1059 |
if ( uiUtility ) |
|
1060 |
{ |
|
1061 |
uiUtility->Close(); |
|
1062 |
} |
|
1063 |
} |
|
1064 |
||
1065 |
// ---------------------------------------------------------------------------- |
|
1066 |
// CGlxUsageRightsBoundCommand::SetDetailsDailogObserver |
|
1067 |
// ---------------------------------------------------------------------------- |
|
1068 |
// |
|
1069 |
void CGlxUsageRightsBoundCommand::SetDetailsDailogObserver( MGlxMetadataDialogObserver& /*aObserver*/ ) |
|
1070 |
{ |
|
1071 |
||
1072 |
} |
|
1073 |
||
1074 |
// ---------------------------------------------------------------------------- |
|
1075 |
// CGlxUsageRightsBoundCommand::SetMediaList |
|
1076 |
// ---------------------------------------------------------------------------- |
|
1077 |
// |
|
1078 |
void CGlxUsageRightsBoundCommand::SetMediaList(MGlxMediaList* aMedialist) |
|
1079 |
{ |
|
1080 |
TRACER("CGlxUsageRightsBoundCommand::SetMediaList"); |
|
1081 |
iMedialist = aMedialist; |
|
1082 |
} |
|
1083 |
||
1084 |
// ---------------------------------------------------------------------------- |
|
1085 |
// CGlxUsageRightsBoundCommand::MediaList |
|
1086 |
// ---------------------------------------------------------------------------- |
|
1087 |
// |
|
1088 |
MGlxMediaList& CGlxUsageRightsBoundCommand::MediaList() |
|
1089 |
{ |
|
1090 |
return *iMedialist; |
|
1091 |
} |
|
1092 |
||
1093 |
// ----------------------------------------------------------------------------- |
|
1094 |
// LaunchDRMViewL |
|
1095 |
// ----------------------------------------------------------------------------- |
|
1096 |
// |
|
1097 |
void CGlxUsageRightsBoundCommand::LaunchDRMViewL() |
|
1098 |
{ |
|
1099 |
TRACER("CGlxUsageRightsBoundCommand::LaunchDRMViewL"); |
|
1100 |
CGlxDRMUtility* drmUtility = CGlxDRMUtility::InstanceL(); |
|
1101 |
CleanupClosePushL(*drmUtility); |
|
1102 |
TInt count = MediaList().Count(); |
|
1103 |
if( count > 0) |
|
1104 |
{ |
|
1105 |
const CGlxMedia* media = MediaList().Item(0).Properties(); |
|
1106 |
const TDesC& uri = media->ValueText(KMPXMediaGeneralUri); |
|
1107 |
drmUtility->ShowDRMDetailsPaneL(uri); |
|
1108 |
} |
|
1109 |
CleanupStack::PopAndDestroy(drmUtility); |
|
1110 |
} |
|
1111 |
||
1112 |
// ---------------------------------------------------------------------------- |
|
1113 |
// CGlxDurationBoundCommand::NewL |
|
1114 |
// ---------------------------------------------------------------------------- |
|
1115 |
// |
|
1116 |
EXPORT_C CGlxDurationBoundCommand* CGlxDurationBoundCommand::NewL() |
|
1117 |
{ |
|
1118 |
TRACER("CGlxDurationBoundCommand::NewL"); |
|
1119 |
CGlxDurationBoundCommand* self = CGlxDurationBoundCommand::NewLC(); |
|
1120 |
CleanupStack::Pop( self ); |
|
1121 |
return self; |
|
1122 |
} |
|
1123 |
||
1124 |
// ---------------------------------------------------------------------------- |
|
1125 |
// CGlxDurationBoundCommand::NewLC |
|
1126 |
// ---------------------------------------------------------------------------- |
|
1127 |
// |
|
1128 |
CGlxDurationBoundCommand* CGlxDurationBoundCommand::NewLC() |
|
1129 |
{ |
|
1130 |
TRACER("CGlxDurationBoundCommand::NewLC"); |
|
1131 |
CGlxDurationBoundCommand* self = new ( ELeave ) CGlxDurationBoundCommand; |
|
1132 |
CleanupStack::PushL( self ); |
|
1133 |
return self; |
|
1134 |
} |
|
1135 |
||
1136 |
CGlxDurationBoundCommand::~CGlxDurationBoundCommand() |
|
1137 |
{ |
|
1138 |
||
1139 |
} |
|
1140 |
// ---------------------------------------------------------------------------- |
|
1141 |
// CGlxDurationBoundCommand::OfferCommandL |
|
1142 |
// ---------------------------------------------------------------------------- |
|
1143 |
// |
|
1144 |
TBool CGlxDurationBoundCommand::OfferCommandL( TInt /*aCommandId*/ , MGlxMediaList& /*aMedialist*/ ) |
|
1145 |
{ |
|
1146 |
TRACER("CGlxDurationBoundCommand::OfferCommandL"); |
|
1147 |
return ETrue; |
|
1148 |
} |
|
1149 |
||
1150 |
// ---------------------------------------------------------------------------- |
|
1151 |
// CGlxDurationBoundCommand::InitMenuL |
|
1152 |
// ---------------------------------------------------------------------------- |
|
1153 |
// |
|
1154 |
void CGlxDurationBoundCommand::InitMenuL( CEikMenuPane& /*aMenu*/ ) const |
|
1155 |
{ |
|
1156 |
// no implementation |
|
1157 |
} |
|
1158 |
||
1159 |
// ---------------------------------------------------------------------------- |
|
1160 |
// CGlxDurationBoundCommand::HideLocationMenuItem |
|
1161 |
// ---------------------------------------------------------------------------- |
|
1162 |
// |
|
1163 |
void CGlxDurationBoundCommand::HideLocationMenuItem( CEikMenuPane& aMenu ) const |
|
1164 |
{ |
|
1165 |
TRACER("CGlxDurationBoundCommand::HideLocationMenuItem"); |
|
1166 |
aMenu.SetItemDimmed( EGlxCmdAiwBase, ETrue ); |
|
1167 |
} |
|
1168 |
||
1169 |
// ---------------------------------------------------------------------------- |
|
1170 |
// CGlxDurationBoundCommand::Close |
|
1171 |
// ---------------------------------------------------------------------------- |
|
1172 |
// |
|
1173 |
void CGlxDurationBoundCommand::Close() |
|
1174 |
{ |
|
1175 |
delete this; |
|
1176 |
} |
|
1177 |
||
1178 |
// ---------------------------------------------------------------------------- |
|
1179 |
// CGlxDurationBoundCommand::ChangeMskL |
|
1180 |
// ---------------------------------------------------------------------------- |
|
1181 |
// |
|
1182 |
void CGlxDurationBoundCommand::ChangeMskL() |
|
1183 |
{ |
|
1184 |
TRACER("CGlxDurationBoundCommand::ChangeMskL"); |
|
1185 |
||
1186 |
CGlxUiUtility* uiUtility = CGlxUiUtility::UtilityL(); |
|
1187 |
uiUtility->ScreenFurniture()->ModifySoftkeyIdL(CEikButtonGroupContainer::EMiddleSoftkeyPosition, |
|
1188 |
EAknSoftkeyEmpty,R_GLX_METADATA_MSK_BLANK); |
|
1189 |
||
1190 |
if ( uiUtility ) |
|
1191 |
{ |
|
1192 |
uiUtility->Close(); |
|
1193 |
} |
|
1194 |
} |
|
1195 |
||
1196 |
// ---------------------------------------------------------------------------- |
|
1197 |
// CGlxDurationBoundCommand::SetDetailsDailogObserver |
|
1198 |
// ---------------------------------------------------------------------------- |
|
1199 |
// |
|
1200 |
void CGlxDurationBoundCommand::SetDetailsDailogObserver( MGlxMetadataDialogObserver& /*aObserver*/ ) |
|
1201 |
{ |
|
1202 |
||
1203 |
} |
|
1204 |
||
1205 |
||
1206 |
// ---------------------------------------------------------------------------- |
|
1207 |
// CGlxDateAndTimeBoundCommand::NewL |
|
1208 |
// ---------------------------------------------------------------------------- |
|
1209 |
// |
|
1210 |
EXPORT_C CGlxDateAndTimeBoundCommand* CGlxDateAndTimeBoundCommand::NewL() |
|
1211 |
{ |
|
1212 |
TRACER("CGlxDateAndTimeBoundCommand::NewL"); |
|
1213 |
CGlxDateAndTimeBoundCommand* self = CGlxDateAndTimeBoundCommand::NewLC(); |
|
1214 |
CleanupStack::Pop( self ); |
|
1215 |
return self; |
|
1216 |
} |
|
1217 |
||
1218 |
// ---------------------------------------------------------------------------- |
|
1219 |
// CGlxDateAndTimeBoundCommand::NewLC |
|
1220 |
// ---------------------------------------------------------------------------- |
|
1221 |
// |
|
1222 |
CGlxDateAndTimeBoundCommand* CGlxDateAndTimeBoundCommand::NewLC() |
|
1223 |
{ |
|
1224 |
TRACER("CGlxDateAndTimeBoundCommand::NewLC"); |
|
1225 |
CGlxDateAndTimeBoundCommand* self = new ( ELeave ) CGlxDateAndTimeBoundCommand; |
|
1226 |
CleanupStack::PushL( self ); |
|
1227 |
return self; |
|
1228 |
} |
|
1229 |
||
1230 |
CGlxDateAndTimeBoundCommand::~CGlxDateAndTimeBoundCommand() |
|
1231 |
{ |
|
1232 |
||
1233 |
} |
|
1234 |
// ---------------------------------------------------------------------------- |
|
1235 |
// CGlxDateAndTimeBoundCommand::OfferCommandL |
|
1236 |
// ---------------------------------------------------------------------------- |
|
1237 |
// |
|
1238 |
TBool CGlxDateAndTimeBoundCommand::OfferCommandL( TInt /*aCommandId*/ , MGlxMediaList& /*aMedialist*/ ) |
|
1239 |
{ |
|
1240 |
TRACER("CGlxDateAndTimeBoundCommand::OfferCommandL"); |
|
1241 |
return ETrue; |
|
1242 |
} |
|
1243 |
||
1244 |
// ---------------------------------------------------------------------------- |
|
1245 |
// CGlxDateAndTimeBoundCommand::InitMenuL |
|
1246 |
// ---------------------------------------------------------------------------- |
|
1247 |
// |
|
1248 |
void CGlxDateAndTimeBoundCommand::InitMenuL( CEikMenuPane& /*aMenu*/ ) const |
|
1249 |
{ |
|
1250 |
// no implementation |
|
1251 |
} |
|
1252 |
||
1253 |
// ---------------------------------------------------------------------------- |
|
1254 |
// CGlxDateAndTimeBoundCommand::HideLocationMenuItem |
|
1255 |
// ---------------------------------------------------------------------------- |
|
1256 |
// |
|
1257 |
void CGlxDateAndTimeBoundCommand::HideLocationMenuItem( CEikMenuPane& aMenu ) const |
|
1258 |
{ |
|
1259 |
TRACER("CGlxDateAndTimeBoundCommand::HideLocationMenuItem"); |
|
1260 |
aMenu.SetItemDimmed( EGlxCmdAiwBase, ETrue ); |
|
1261 |
} |
|
1262 |
||
1263 |
// ---------------------------------------------------------------------------- |
|
1264 |
// CGlxDateAndTimeBoundCommand::Close |
|
1265 |
// ---------------------------------------------------------------------------- |
|
1266 |
// |
|
1267 |
void CGlxDateAndTimeBoundCommand::Close() |
|
1268 |
{ |
|
1269 |
delete this; |
|
1270 |
} |
|
1271 |
||
1272 |
// ---------------------------------------------------------------------------- |
|
1273 |
// CGlxDateAndTimeBoundCommand::ChangeMskL |
|
1274 |
// ---------------------------------------------------------------------------- |
|
1275 |
// |
|
1276 |
void CGlxDateAndTimeBoundCommand::ChangeMskL() |
|
1277 |
{ |
|
1278 |
TRACER("CGlxDateAndTimeBoundCommand::ChangeMskL"); |
|
1279 |
||
1280 |
CGlxUiUtility* uiUtility = CGlxUiUtility::UtilityL(); |
|
1281 |
uiUtility->ScreenFurniture()->ModifySoftkeyIdL(CEikButtonGroupContainer::EMiddleSoftkeyPosition, |
|
1282 |
EAknSoftkeyEmpty,R_GLX_METADATA_MSK_BLANK); |
|
1283 |
if ( uiUtility ) |
|
1284 |
{ |
|
1285 |
uiUtility->Close(); |
|
1286 |
} |
|
1287 |
} |
|
1288 |
||
1289 |
// ---------------------------------------------------------------------------- |
|
1290 |
// CGlxDateAndTimeBoundCommand::SetDetailsDailogObserver |
|
1291 |
// ---------------------------------------------------------------------------- |
|
1292 |
// |
|
1293 |
void CGlxDateAndTimeBoundCommand::SetDetailsDailogObserver( MGlxMetadataDialogObserver& /*aObserver*/ ) |
|
1294 |
{ |
|
1295 |
||
1296 |
} |
|
1297 |
||
1298 |
// ---------------------------------------------------------------------------- |
|
1299 |
// CGlxFileSizeBoundCommand::NewL |
|
1300 |
// ---------------------------------------------------------------------------- |
|
1301 |
// |
|
1302 |
EXPORT_C CGlxFileSizeBoundCommand* CGlxFileSizeBoundCommand::NewL() |
|
1303 |
{ |
|
1304 |
TRACER("CGlxFileSizeBoundCommand::NewL"); |
|
1305 |
CGlxFileSizeBoundCommand* self = CGlxFileSizeBoundCommand::NewLC(); |
|
1306 |
CleanupStack::Pop( self ); |
|
1307 |
return self; |
|
1308 |
} |
|
1309 |
||
1310 |
// ---------------------------------------------------------------------------- |
|
1311 |
// CGlxFileSizeBoundCommand::NewLC |
|
1312 |
// ---------------------------------------------------------------------------- |
|
1313 |
// |
|
1314 |
CGlxFileSizeBoundCommand* CGlxFileSizeBoundCommand::NewLC() |
|
1315 |
{ |
|
1316 |
TRACER("CGlxFileSizeBoundCommand::NewLC"); |
|
1317 |
CGlxFileSizeBoundCommand* self = new ( ELeave ) CGlxFileSizeBoundCommand; |
|
1318 |
CleanupStack::PushL( self ); |
|
1319 |
return self; |
|
1320 |
} |
|
1321 |
||
1322 |
CGlxFileSizeBoundCommand::~CGlxFileSizeBoundCommand() |
|
1323 |
{ |
|
1324 |
||
1325 |
} |
|
1326 |
||
1327 |
// ---------------------------------------------------------------------------- |
|
1328 |
// CGlxFileSizeBoundCommand::OfferCommandL |
|
1329 |
// ---------------------------------------------------------------------------- |
|
1330 |
// |
|
1331 |
TBool CGlxFileSizeBoundCommand::OfferCommandL( TInt /*aCommandId*/ , MGlxMediaList& /*aMedialist*/ ) |
|
1332 |
{ |
|
1333 |
TRACER("CGlxFileSizeBoundCommand::OfferCommandL"); |
|
1334 |
return ETrue; |
|
1335 |
} |
|
1336 |
||
1337 |
// ---------------------------------------------------------------------------- |
|
1338 |
// CGlxFileSizeBoundCommand::InitMenuL |
|
1339 |
// ---------------------------------------------------------------------------- |
|
1340 |
// |
|
1341 |
void CGlxFileSizeBoundCommand::InitMenuL( CEikMenuPane& /*aMenu*/ ) const |
|
1342 |
{ |
|
1343 |
// no implementation |
|
1344 |
} |
|
1345 |
||
1346 |
// ---------------------------------------------------------------------------- |
|
1347 |
// CGlxFileSizeBoundCommand::HideLocationMenuItem |
|
1348 |
// ---------------------------------------------------------------------------- |
|
1349 |
// |
|
1350 |
void CGlxFileSizeBoundCommand::HideLocationMenuItem( CEikMenuPane& aMenu ) const |
|
1351 |
{ |
|
1352 |
TRACER("CGlxFileSizeBoundCommand::HideLocationMenuItem"); |
|
1353 |
aMenu.SetItemDimmed( EGlxCmdAiwBase, ETrue ); |
|
1354 |
} |
|
1355 |
||
1356 |
// ---------------------------------------------------------------------------- |
|
1357 |
// CGlxFileSizeBoundCommand::Close |
|
1358 |
// ---------------------------------------------------------------------------- |
|
1359 |
// |
|
1360 |
void CGlxFileSizeBoundCommand::Close() |
|
1361 |
{ |
|
1362 |
delete this; |
|
1363 |
} |
|
1364 |
||
1365 |
// ---------------------------------------------------------------------------- |
|
1366 |
// CGlxFileSizeBoundCommand::ChangeMskL |
|
1367 |
// ---------------------------------------------------------------------------- |
|
1368 |
// |
|
1369 |
void CGlxFileSizeBoundCommand::ChangeMskL() |
|
1370 |
{ |
|
1371 |
TRACER("CGlxFileSizeBoundCommand::ChangeMskL"); |
|
1372 |
||
1373 |
CGlxUiUtility* uiUtility = CGlxUiUtility::UtilityL(); |
|
1374 |
uiUtility->ScreenFurniture()->ModifySoftkeyIdL(CEikButtonGroupContainer::EMiddleSoftkeyPosition, |
|
1375 |
EAknSoftkeyEmpty,R_GLX_METADATA_MSK_BLANK); |
|
1376 |
if ( uiUtility ) |
|
1377 |
{ |
|
1378 |
uiUtility->Close(); |
|
1379 |
} |
|
1380 |
} |
|
1381 |
||
1382 |
// ---------------------------------------------------------------------------- |
|
1383 |
// CGlxFileSizeBoundCommand::SetDetailsDailogObserver |
|
1384 |
// ---------------------------------------------------------------------------- |
|
1385 |
// |
|
1386 |
void CGlxFileSizeBoundCommand::SetDetailsDailogObserver( MGlxMetadataDialogObserver& /*aObserver*/ ) |
|
1387 |
{ |
|
1388 |
||
1389 |
} |
|
1390 |