|
1 /* |
|
2 * Copyright (c) 2003-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 class CCertManUIViewAuthority |
|
15 * Updates Options list depending of the number of |
|
16 * marked and unmarked certificates in the listbox. |
|
17 * Handles softkey and Option list commands. |
|
18 * Handles certificate deletion including confirmation and |
|
19 * read-only notes. |
|
20 * Shows certificate details view with appropriate |
|
21 * warning notes if certificate is corrupted/expired/not valid. |
|
22 * |
|
23 */ |
|
24 |
|
25 |
|
26 // INCLUDE FILES |
|
27 #include <aknmessagequerydialog.h> |
|
28 #include <aknnotewrappers.h> // for warning & information notes |
|
29 #include <X509CertNameParser.h> |
|
30 #include <hash.h> // SHA-1 fingerprint |
|
31 #include <sysutil.h> |
|
32 #include <ErrorUI.h> |
|
33 #include <x509cert.h> |
|
34 #include <pkixcertchain.h> //for validation |
|
35 #include <certmanui.rsg> |
|
36 #include "CertmanuiCertificateHelper.h" |
|
37 #include "CertmanuiKeeper.h" |
|
38 #include "CertmanuiviewAuthority.h" |
|
39 #include "CertmanuicontainerAuthority.h" |
|
40 #include "Certmanui.hrh" |
|
41 #include "Certmanuitrustids.h" |
|
42 #include "CertmanuiSyncWrapper.h" |
|
43 #include "CertmanuiCommon.h" |
|
44 #include "CertManUILogger.h" |
|
45 #include <hlplch.h> // For HlpLauncher |
|
46 #include <featmgr.h> // For HlpLauncher |
|
47 |
|
48 // ================= MEMBER FUNCTIONS ======================= |
|
49 |
|
50 // --------------------------------------------------------- |
|
51 // CCertManUIViewAuthority::CCertManUIViewAuthority(CCertManUIKeeper& aKeeper) |
|
52 // : iKeeper(aKeeper), iCrMgr(iKeeper.CertManager()) |
|
53 // Constructor |
|
54 // --------------------------------------------------------- |
|
55 // |
|
56 CCertManUIViewAuthority::CCertManUIViewAuthority( CCertManUIKeeper& aKeeper ) |
|
57 : iKeeper( aKeeper ) |
|
58 { |
|
59 CERTMANUILOGGER_WRITE_TIMESTAMP( |
|
60 "CCertManUIViewAuthority::CCertManUIViewAuthority" ); |
|
61 } |
|
62 |
|
63 // --------------------------------------------------------- |
|
64 // CCertManUIViewAuthority::~CCertManUIViewAuthority() |
|
65 // Destructor |
|
66 // --------------------------------------------------------- |
|
67 // |
|
68 CCertManUIViewAuthority::~CCertManUIViewAuthority() |
|
69 { |
|
70 CERTMANUILOGGER_ENTERFN( " CCertManUIViewAuthority::~CCertManUIViewAuthority" ); |
|
71 |
|
72 if ( iContainerAuthority ) |
|
73 { |
|
74 AppUi()->RemoveFromViewStack( *this, iContainerAuthority ); |
|
75 delete iContainerAuthority; |
|
76 } |
|
77 |
|
78 CERTMANUILOGGER_LEAVEFN( " CCertManUIViewAuthority::~CCertManUIViewAuthority" ); |
|
79 } |
|
80 |
|
81 // --------------------------------------------------------- |
|
82 // CCertManUIViewAuthority* CCertManUIViewAuthority::NewL( |
|
83 // const TRect& /*aRect*/, CCertManUIKeeper& aKeeper) |
|
84 // --------------------------------------------------------- |
|
85 // |
|
86 CCertManUIViewAuthority* CCertManUIViewAuthority::NewL( |
|
87 const TRect& /*aRect*/, CCertManUIKeeper& aKeeper ) |
|
88 { |
|
89 CCertManUIViewAuthority* self = |
|
90 new ( ELeave ) CCertManUIViewAuthority( aKeeper ); |
|
91 CleanupStack::PushL( self ); |
|
92 self->ConstructL(); |
|
93 CleanupStack::Pop(); |
|
94 return self; |
|
95 } |
|
96 |
|
97 // --------------------------------------------------------- |
|
98 // CCertManUIViewAuthority* CCertManUIViewAuthority::NewLC( |
|
99 // const TRect& /*aRect*/, CCertManUIKeeper& aKeeper) |
|
100 // --------------------------------------------------------- |
|
101 // |
|
102 CCertManUIViewAuthority* CCertManUIViewAuthority::NewLC( |
|
103 const TRect& /*aRect*/, CCertManUIKeeper& aKeeper ) |
|
104 { |
|
105 CCertManUIViewAuthority* self = |
|
106 new ( ELeave ) CCertManUIViewAuthority( aKeeper ); |
|
107 CleanupStack::PushL( self ); |
|
108 self->ConstructL(); |
|
109 return self; |
|
110 } |
|
111 |
|
112 // --------------------------------------------------------- |
|
113 // CCertManUIViewAuthority::ConstructL() |
|
114 // EPOC two-phased constructor |
|
115 // --------------------------------------------------------- |
|
116 // |
|
117 void CCertManUIViewAuthority::ConstructL() |
|
118 { |
|
119 CERTMANUILOGGER_ENTERFN( " CCertManUIViewAuthority::ConstructL" ); |
|
120 |
|
121 BaseConstructL( R_CERTMANUI_VIEW_MAIN_AUTHORITY ); |
|
122 |
|
123 CERTMANUILOGGER_LEAVEFN( " CCertManUIViewAuthority::ConstructL" ); |
|
124 } |
|
125 |
|
126 // --------------------------------------------------------- |
|
127 // CCertManUIViewAuthority::DynInitMenuPaneL( |
|
128 // TInt aResourceId,CEikMenuPane* aMenuPane) |
|
129 // Updates Options list with correct items depending on |
|
130 // whether the listbox is empty or if it has any marked items |
|
131 // --------------------------------------------------------- |
|
132 // |
|
133 void CCertManUIViewAuthority::DynInitMenuPaneL( |
|
134 TInt aResourceId, CEikMenuPane* aMenuPane ) |
|
135 { |
|
136 CERTMANUILOGGER_ENTERFN( " CCertManUIViewAuthority::DynInitMenuPaneL" ); |
|
137 |
|
138 if (( iKeeper.iWrapper->IsActive()) || |
|
139 ( iContainerAuthority->iListBox->CurrentItemIndex() >= iKeeper.iCALabelEntries.Count()) ) |
|
140 { |
|
141 return; |
|
142 } |
|
143 |
|
144 const CListBoxView::CSelectionIndexArray* selections = |
|
145 iContainerAuthority->iListBox->SelectionIndexes(); |
|
146 const TInt markedCount = selections->Count(); |
|
147 const TInt currentItemIndex = iContainerAuthority->iListBox->CurrentItemIndex(); |
|
148 |
|
149 switch ( aResourceId ) |
|
150 { |
|
151 case R_CERTMANUI_VIEW_MENU_AUTHORITY: |
|
152 { |
|
153 if( !FeatureManager::FeatureSupported( KFeatureIdHelp ) ) |
|
154 { |
|
155 aMenuPane->DeleteMenuItem( EAknCmdHelp ); |
|
156 } |
|
157 |
|
158 // the certificate list is empty, all except Exit are dimmed |
|
159 if ( currentItemIndex == -1 ) |
|
160 { |
|
161 aMenuPane->SetItemDimmed( ECertManUICmdAppViewDtls, ETrue ); |
|
162 aMenuPane->SetItemDimmed( ECertManUICmdAppDelete, ETrue ); |
|
163 aMenuPane->SetItemDimmed( ECertManUICmdAppTrustSet, ETrue ); |
|
164 aMenuPane->SetItemDimmed( ECertManUICmdMarkUnmark, ETrue ); |
|
165 } |
|
166 else |
|
167 { |
|
168 if ( markedCount == 1 ) |
|
169 { |
|
170 aMenuPane->SetItemDimmed( ECertManUICmdAppViewDtls, ETrue ); |
|
171 } |
|
172 |
|
173 if ( markedCount > 0 ) |
|
174 { |
|
175 aMenuPane->SetItemDimmed( ECertManUICmdAppViewDtls, ETrue ); |
|
176 aMenuPane->SetItemDimmed( ECertManUICmdAppTrustSet, ETrue ); |
|
177 } |
|
178 |
|
179 if ( !iKeeper.iCertificateHelper->IsOneMarkedCertificateDeletable( |
|
180 iContainerAuthority->iListBox, KCertTypeAuthority ) ) |
|
181 { |
|
182 aMenuPane->SetItemDimmed( ECertManUICmdAppDelete, ETrue ); |
|
183 } |
|
184 } |
|
185 break; |
|
186 } |
|
187 |
|
188 case R_CERTMANUI_MENUPANE_OPTIONS_MARKED: |
|
189 { |
|
190 if ( !iKeeper.iCertificateHelper->IsOneMarkedCertificateDeletable( |
|
191 iContainerAuthority->iListBox, KCertTypeAuthority ) ) |
|
192 { |
|
193 aMenuPane->SetItemDimmed( ECertManUICmdAppDelete, ETrue ); |
|
194 } |
|
195 |
|
196 // not available for authority certificates |
|
197 aMenuPane->SetItemDimmed( ECertManUICmdMoveToDevice, ETrue ); |
|
198 aMenuPane->SetItemDimmed( ECertManUICmdMoveToPersonal, ETrue ); |
|
199 } |
|
200 // FALLTHROUGH |
|
201 |
|
202 case R_CERTMANUI_MENU_PANE_MARK_UNMARK: |
|
203 { |
|
204 TInt index = 0; |
|
205 TKeyArrayFix key( 0, ECmpTInt ); |
|
206 if ( selections->Find( currentItemIndex, key, index ) ) |
|
207 { // focus is on unmarked item |
|
208 aMenuPane->SetItemDimmed( ECertManUICmdUnmark, ETrue ); |
|
209 } |
|
210 else |
|
211 { // focus is on marked item |
|
212 aMenuPane->SetItemDimmed( ECertManUICmdMark, ETrue ); |
|
213 } |
|
214 |
|
215 // if all items are marked, dim "mark all" option |
|
216 if ( markedCount == iContainerAuthority->iListBox->Model()->NumberOfItems() ) |
|
217 { |
|
218 aMenuPane->SetItemDimmed( ECertManUICmdMarkAll, ETrue ); |
|
219 } |
|
220 |
|
221 // if no items are marked, dim "unmark all" option |
|
222 if ( markedCount == 0 ) |
|
223 { |
|
224 aMenuPane->SetItemDimmed( ECertManUICmdUnmarkAll, ETrue ); |
|
225 } |
|
226 break; |
|
227 } |
|
228 |
|
229 default: |
|
230 break; |
|
231 } |
|
232 |
|
233 CERTMANUILOGGER_LEAVEFN( " CCertManUIViewAuthority::DynInitMenuPaneL" ); |
|
234 } |
|
235 |
|
236 // --------------------------------------------------------- |
|
237 // CCertManUIViewAuthority::Id() const |
|
238 // Returns Authority view id |
|
239 // --------------------------------------------------------- |
|
240 // |
|
241 TUid CCertManUIViewAuthority::Id() const |
|
242 { |
|
243 return KCertManUIViewAuthorityId; |
|
244 } |
|
245 |
|
246 // --------------------------------------------------------- |
|
247 // CCertManUIViewAuthority::HandleCommandL(TInt aCommand) |
|
248 // Handles Softkey and Options list commands |
|
249 // --------------------------------------------------------- |
|
250 // |
|
251 void CCertManUIViewAuthority::HandleCommandL( TInt aCommand ) |
|
252 { |
|
253 CERTMANUILOGGER_ENTERFN( " CCertManUIViewAuthority::HandleCommandL" ); |
|
254 |
|
255 if (( iKeeper.iWrapper->IsActive() ) || |
|
256 ( iContainerAuthority->iListBox->CurrentItemIndex() >= iKeeper.iCALabelEntries.Count() )) |
|
257 { |
|
258 return; |
|
259 } |
|
260 |
|
261 switch ( aCommand ) |
|
262 { |
|
263 case EAknSoftkeyBack: |
|
264 { |
|
265 // Activate main view |
|
266 AppUi()->ActivateLocalViewL( KCertManUIViewMainId ); |
|
267 break; |
|
268 } |
|
269 // put the view specific menu commands here |
|
270 case EAknCmdExit: |
|
271 { |
|
272 ((CAknViewAppUi*)iAvkonAppUi)->HandleCommandL( EAknCmdExit ); |
|
273 break; |
|
274 } |
|
275 case ECertManUICmdAppViewDtls: |
|
276 { |
|
277 iKeeper.iCertificateHelper->MessageQueryViewDetailsL( |
|
278 iContainerAuthority->iListBox->CurrentItemIndex(), |
|
279 KCertTypeAuthority, iEikonEnv ); |
|
280 break; |
|
281 } |
|
282 case ECertManUICmdAppDelete: |
|
283 { |
|
284 if ( iKeeper.iCertificateHelper->ConfirmationQueryDeleteCertL( KCertTypeAuthority, |
|
285 iContainerAuthority->iListBox ) ) |
|
286 { |
|
287 // goes here if at least one certificate is deleted |
|
288 iCurrentPosition = iContainerAuthority->iListBox->CurrentItemIndex(); |
|
289 iTopItem = iContainerAuthority->iListBox->TopItemIndex(); |
|
290 |
|
291 iContainerAuthority->DrawListBoxL(iCurrentPosition, iTopItem ); |
|
292 TRAPD( error, iKeeper.RefreshCAEntriesL() ); |
|
293 if ( error != KErrNone ) |
|
294 { |
|
295 if ( error == KErrCorrupt ) |
|
296 { |
|
297 iKeeper.ShowErrorNoteL( error); |
|
298 User::Exit( KErrNone ); |
|
299 } |
|
300 else |
|
301 { |
|
302 // have to call straight away the Exit |
|
303 // showing any error notes would corrupt the display |
|
304 User::Exit( error ); |
|
305 } |
|
306 } |
|
307 UpdateMenuBar(); |
|
308 } |
|
309 break; |
|
310 } |
|
311 case ECertManUICmdMark: |
|
312 case ECertManUICmdUnmark: |
|
313 case ECertManUICmdMarkAll: |
|
314 case ECertManUICmdUnmarkAll: |
|
315 { |
|
316 // Gets pointer of current listbox. |
|
317 CEikListBox* listbox = iContainerAuthority->iListBox; |
|
318 if ( listbox ) |
|
319 { |
|
320 AknSelectionService::HandleMarkableListProcessCommandL( |
|
321 aCommand, listbox ); |
|
322 |
|
323 iKeeper.iCertificateHelper->HandleMarkableListCommandL( |
|
324 aCommand, iContainerAuthority->iListBox ); |
|
325 |
|
326 UpdateMenuBar(); |
|
327 } |
|
328 break; |
|
329 } |
|
330 case ECertManUICmdAppTrustSet: |
|
331 { |
|
332 TInt helpIndex3 = iContainerAuthority->iListBox->CurrentItemIndex(); |
|
333 CEikStatusPane* sp = STATIC_CAST( |
|
334 CAknAppUi*, iEikonEnv->EikAppUi())->StatusPane(); |
|
335 // Fetch pointer to the default title pane control |
|
336 CAknTitlePane* title = STATIC_CAST( |
|
337 CAknTitlePane*, |
|
338 sp->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) )); |
|
339 |
|
340 // Creating the correct title text for Trust Settings view |
|
341 HBufC* buf = HBufC::NewLC( KMaxLengthTextCertLabel ); |
|
342 |
|
343 // Get Cert entries |
|
344 buf->Des() = |
|
345 (iKeeper.iCALabelEntries)[helpIndex3]->iCAEntryLabel->Des(); |
|
346 buf->Des().TrimLeft(); |
|
347 // Cut CertLabel after fourth semi colon |
|
348 TPtrC trimmedCertLabel = iKeeper.iCertificateHelper->CutCertificateField( buf->Des() ); |
|
349 buf->Des().Copy( trimmedCertLabel ); |
|
350 TInt length = buf->Des().Length(); |
|
351 if (length == 0) |
|
352 { |
|
353 HBufC* stringHolder = NULL; |
|
354 |
|
355 stringHolder = StringLoader::LoadLC( |
|
356 R_TEXT_RESOURCE_VIEW_NO_SUBJECT_TITLE ); |
|
357 |
|
358 title->SetTextL(stringHolder->Des()); |
|
359 CleanupStack::PopAndDestroy(); // stringHolder |
|
360 } |
|
361 else |
|
362 { |
|
363 title->SetTextL( buf->Des() ); |
|
364 } |
|
365 CleanupStack::PopAndDestroy(); // buf |
|
366 |
|
367 ((CAknViewAppUi*)iAvkonAppUi)->ActivateLocalViewL( |
|
368 KCertManUIViewTrustId, TUid::Uid( helpIndex3), KNullDesC8 ); |
|
369 break; |
|
370 } |
|
371 case EAknCmdHelp: |
|
372 { |
|
373 if( FeatureManager::FeatureSupported( KFeatureIdHelp ) ) |
|
374 { |
|
375 HlpLauncher::LaunchHelpApplicationL( |
|
376 iEikonEnv->WsSession(), AppUi()->AppHelpContextL() ); |
|
377 } |
|
378 break; |
|
379 } |
|
380 |
|
381 default: |
|
382 { |
|
383 AppUi()->HandleCommandL( aCommand ); |
|
384 break; |
|
385 } |
|
386 } |
|
387 |
|
388 CERTMANUILOGGER_LEAVEFN( " CCertManUIViewAuthority::HandleCommandL" ); |
|
389 } |
|
390 |
|
391 // --------------------------------------------------------- |
|
392 // CCertManUIViewAuthority::HandleClientRectChange() |
|
393 // --------------------------------------------------------- |
|
394 // |
|
395 void CCertManUIViewAuthority::HandleClientRectChange() |
|
396 { |
|
397 CERTMANUILOGGER_ENTERFN( " CCertManUIViewAuthority::HandleClientRectChange" ); |
|
398 |
|
399 if ( iContainerAuthority ) |
|
400 { |
|
401 iContainerAuthority->SetRect( ClientRect() ); |
|
402 } |
|
403 |
|
404 CERTMANUILOGGER_LEAVEFN( " CCertManUIViewAuthority::HandleClientRectChange" ); |
|
405 } |
|
406 |
|
407 // --------------------------------------------------------- |
|
408 // CCertManUIViewAuthority::DoActivateL(const TVwsViewId& /*aPrevViewId*/, |
|
409 // TUid /*aCustomMessageId*/, const TDesC8& /*aCustomMessage*/) |
|
410 // Updates the view when opening it |
|
411 // --------------------------------------------------------- |
|
412 // |
|
413 void CCertManUIViewAuthority::DoActivateL( |
|
414 const TVwsViewId& aPrevViewId, |
|
415 TUid /*aCustomMessageId*/, const TDesC8& /*aCustomMessage*/) |
|
416 { |
|
417 CERTMANUILOGGER_ENTERFN( " CCertManUIViewAuthority::DoActivateL" ); |
|
418 |
|
419 iKeeper.StartWaitDialogL( ECertmanUiWaitDialog ); |
|
420 CleanupCloseWaitDialogPushL( iKeeper ); |
|
421 |
|
422 TRAPD ( error, iKeeper.RefreshCAEntriesL() ); |
|
423 if ( error != KErrNone ) |
|
424 { |
|
425 if ( error == KErrCorrupt ) |
|
426 { |
|
427 iKeeper.ShowErrorNoteL( error ); |
|
428 User::Exit( KErrNone ); |
|
429 } |
|
430 else |
|
431 { |
|
432 // have to call straight away the Exit |
|
433 // showing any error notes would corrupt the display |
|
434 User::Exit( error ); |
|
435 } |
|
436 } |
|
437 |
|
438 // If this view is being activated from main view, |
|
439 // current position is 0. The declaration of KCertManUIViewMainId is |
|
440 // located in certmanuiviewid.h which is not public header --> constant |
|
441 // is being used. |
|
442 if( aPrevViewId.iViewUid == KCertManUIViewMainId ) |
|
443 { |
|
444 iCurrentPosition = 0; |
|
445 } |
|
446 |
|
447 if ( iContainerAuthority ) |
|
448 { |
|
449 ((CAknViewAppUi*)iAvkonAppUi)->RemoveFromViewStack( |
|
450 *this, iContainerAuthority ); |
|
451 |
|
452 delete iContainerAuthority; |
|
453 iContainerAuthority = NULL; |
|
454 } |
|
455 iContainerAuthority = new (ELeave) CCertManUIContainerAuthority( |
|
456 *this, iKeeper ); |
|
457 |
|
458 iContainerAuthority->SetMopParent( this ); |
|
459 iContainerAuthority->ConstructL( |
|
460 ClientRect(), iCurrentPosition, iTopItem ); |
|
461 |
|
462 if ( !iKeeper.iCertsDatOK ) |
|
463 { |
|
464 iCurrentPosition = 0; |
|
465 iTopItem = 0; |
|
466 } |
|
467 |
|
468 iKeeper.ActivateTitleL( KViewTitleCertManUIAuthority ); |
|
469 |
|
470 iContainerAuthority->DrawListBoxL( iCurrentPosition, iTopItem ); |
|
471 ((CAknViewAppUi*)iAvkonAppUi)->AddToStackL( *this, iContainerAuthority ); |
|
472 |
|
473 UpdateMenuBar(); |
|
474 |
|
475 CleanupStack::PopAndDestroy(); // closes wait dialog |
|
476 |
|
477 iKeeper.iStartup = EFalse; |
|
478 |
|
479 CERTMANUILOGGER_LEAVEFN( " CCertManUIViewAuthority::DoActivateL" ); |
|
480 } |
|
481 |
|
482 // --------------------------------------------------------- |
|
483 // CCertManUIViewAuthority::DoDeactivate() |
|
484 // Saves focus position when closing view |
|
485 // --------------------------------------------------------- |
|
486 // |
|
487 void CCertManUIViewAuthority::DoDeactivate() |
|
488 { |
|
489 CERTMANUILOGGER_ENTERFN( " CCertManUIViewAuthority::DoDeactivate" ); |
|
490 |
|
491 if ( iKeeper.iCertsDatOK ) |
|
492 { |
|
493 iCurrentPosition = iContainerAuthority->iListBox->CurrentItemIndex(); |
|
494 iTopItem = iContainerAuthority->iListBox->TopItemIndex(); |
|
495 // do not destroy iContainerAuthority here because |
|
496 // TrustSettings view needs it ! |
|
497 } |
|
498 else |
|
499 { |
|
500 iCurrentPosition = 0; |
|
501 iTopItem = 0; |
|
502 } |
|
503 |
|
504 CERTMANUILOGGER_LEAVEFN( " CCertManUIViewAuthority::DoDeactivate" ); //lint !e539 |
|
505 } |
|
506 |
|
507 // --------------------------------------------------------- |
|
508 // CCertManUIViewAuthority::Container() |
|
509 // Returns iContainerAuthority to be used in CertManUIContainerAuthority |
|
510 // --------------------------------------------------------- |
|
511 // |
|
512 CCoeControl* CCertManUIViewAuthority::Container() |
|
513 { |
|
514 return iContainerAuthority; |
|
515 } |
|
516 |
|
517 // --------------------------------------------------------- |
|
518 // CCertManUIViewAuthority::UpdateMenuBar() |
|
519 // Updates the menu bar |
|
520 // --------------------------------------------------------- |
|
521 // |
|
522 void CCertManUIViewAuthority::UpdateMenuBar() |
|
523 { |
|
524 CEikButtonGroupContainer* cba = Cba(); |
|
525 |
|
526 if ( cba == NULL ) |
|
527 { |
|
528 return; |
|
529 } |
|
530 |
|
531 if ( iKeeper.iCALabelEntries.Count() == 0 ) |
|
532 { |
|
533 // No certificate. Don't show MSK |
|
534 UpdateCba( R_CERTMANUI_OPTIONS_OPEN_BACK ); |
|
535 cba->MakeCommandVisible( ECertManUICmdAppViewDtls, EFalse ); |
|
536 } |
|
537 else |
|
538 { |
|
539 if ( iContainerAuthority->iListBox->SelectionIndexes()->Count() > 0 ) |
|
540 { |
|
541 MenuBar()->SetContextMenuTitleResourceId( R_CERTMANUI_MENUBAR_OPTIONS_MARKED ); |
|
542 UpdateCba( R_CERTMANUI_OPTIONS_CONTEXT_BACK ); |
|
543 } |
|
544 else |
|
545 { |
|
546 MenuBar()->SetMenuTitleResourceId( R_CERTMANUI_MENUBAR_VIEW_AUTHORITY ); |
|
547 UpdateCba( R_CERTMANUI_OPTIONS_OPEN_BACK ); |
|
548 } |
|
549 } |
|
550 } |
|
551 |
|
552 // --------------------------------------------------------- |
|
553 // CCertManUIViewAuthority::UpdateCba( TInt aCbaResourceId ) |
|
554 // Updates cba |
|
555 // --------------------------------------------------------- |
|
556 // |
|
557 void CCertManUIViewAuthority::UpdateCba( TInt aCbaResourceId ) |
|
558 { |
|
559 CEikButtonGroupContainer* cba = Cba(); |
|
560 |
|
561 if ( cba ) |
|
562 { |
|
563 cba->SetCommandSetL( aCbaResourceId ); |
|
564 cba->DrawNow(); |
|
565 } |
|
566 } |
|
567 |
|
568 |
|
569 // End of File |
|
570 |
|
571 |
|
572 |