270 DEBUG1( CLmkCategoryContentsView::DynInitMenuPaneL markedCount=%d,markedCount ); |
268 DEBUG1( CLmkCategoryContentsView::DynInitMenuPaneL markedCount=%d,markedCount ); |
271 DEBUG1( CLmkCategoryContentsView::DynInitMenuPaneL visibleCount=%d,visibleCount ); |
269 DEBUG1( CLmkCategoryContentsView::DynInitMenuPaneL visibleCount=%d,visibleCount ); |
272 |
270 |
273 switch (aResourceId) |
271 switch (aResourceId) |
274 { |
272 { |
275 case R_LMK_APP_CALL_SUBMENU: |
|
276 { |
|
277 // Initialise the call UI AIW menu via selector |
|
278 selector.AttachToAIWMenuL(R_LMK_APP_CALL_SUBMENU, |
|
279 R_LMK_APP_AIW_INTEREST); |
|
280 selector.InitializeMenuPaneL(*aMenuPane, aResourceId); |
|
281 selector.AttachInterestL(R_LMK_APP_AIW_INTEREST); |
|
282 break; |
|
283 } |
|
284 case R_LMK_BYLM_MENU1: |
273 case R_LMK_BYLM_MENU1: |
285 { |
274 { |
|
275 if (iContainer->IsUncategorizedCategory() || visibleCount == 0) |
|
276 { |
|
277 aMenuPane->SetItemDimmed(ERemoveFromCat, ETrue); |
|
278 } |
286 aMenuPane->SetItemDimmed(ELmkCmdSendDummy, ETrue); |
279 aMenuPane->SetItemDimmed(ELmkCmdSendDummy, ETrue); |
287 aMenuPane->SetItemDimmed(ELmkAppMenuAiwId, ETrue); |
280 |
288 aMenuPane->SetItemDimmed(ELmkCmdGoToUrl, ETrue); |
281 // Send menu is handled by the sender: |
|
282 if ( FeatureManager::FeatureSupported( KFeatureIdLandmarksConverter ) ) |
|
283 { |
|
284 iLmkSender.DisplaySendMenuL( *aMenuPane, visibleCount ); |
|
285 if( visibleCount > 0 ) |
|
286 { |
|
287 TInt pos( 0 ); |
|
288 aMenuPane->ItemAndPos( ELmkCmdSend, pos ); |
|
289 if( pos > 0 ) |
|
290 { |
|
291 aMenuPane->SetItemDimmed(ELmkCmdSend,EFalse ); |
|
292 aMenuPane->SetItemSpecific(ELmkCmdSend,ETrue); |
|
293 } |
|
294 } |
|
295 } |
289 |
296 |
290 /* |
297 /* |
291 If multiple landmarks are selected then we have to dim |
298 If multiple landmarks are selected then we have to dim |
292 Navigate To option. |
299 Navigate To option. |
293 if only one landmark is in focus then we have to dim |
300 if only one landmark is in focus then we have to dim |
342 } |
349 } |
343 if (showOnMapCmd < 0 && navigateToCmd < 0) |
350 if (showOnMapCmd < 0 && navigateToCmd < 0) |
344 { |
351 { |
345 break; |
352 break; |
346 } |
353 } |
347 |
354 // dimming navigate to item |
|
355 aMenuPane->SetItemDimmed(navigateToCmd, ETrue); |
|
356 |
|
357 // handling of showonmap item |
348 if (isLandmarkDataEmpty || markedCount > 1) |
358 if (isLandmarkDataEmpty || markedCount > 1) |
349 { |
359 { |
350 aMenuPane->SetItemDimmed(showOnMapCmd, ETrue); |
360 aMenuPane->SetItemDimmed(showOnMapCmd, ETrue); |
351 aMenuPane->SetItemDimmed(navigateToCmd, ETrue); |
|
352 } |
361 } |
353 else |
362 else |
354 { |
363 { |
355 aMenuPane->SetItemDimmed(showOnMapCmd, EFalse); |
364 aMenuPane->SetItemDimmed(showOnMapCmd, EFalse); |
356 aMenuPane->SetItemSpecific(showOnMapCmd, ETrue); |
365 aMenuPane->SetItemSpecific(showOnMapCmd, ETrue); |
357 if (iContainer->IsUncategorizedCategory()) |
|
358 { |
|
359 aMenuPane->SetItemDimmed(navigateToCmd, EFalse); |
|
360 aMenuPane->SetItemSpecific(navigateToCmd, ETrue); |
|
361 } |
|
362 else |
|
363 aMenuPane->SetItemDimmed(navigateToCmd, ETrue); |
|
364 } |
|
365 break; |
|
366 } |
|
367 case R_LMK_BYLM_MENU2: |
|
368 { |
|
369 aMenuPane->SetItemDimmed(ELmkCmdChangeIcon, ETrue); |
|
370 if (iContainer->IsUncategorizedCategory() || visibleCount == 0) |
|
371 { |
|
372 aMenuPane->SetItemDimmed(ERemoveFromCat, ETrue); |
|
373 } |
366 } |
374 break; |
367 break; |
375 } |
368 } |
376 case R_LMK_OK_MENU: |
369 case R_LMK_OK_MENU: |
377 { |
370 { |
458 return; |
451 return; |
459 } |
452 } |
460 |
453 |
461 CLmkAppSelectorImplBase& selector = iContainer->SelectorImpl(); |
454 CLmkAppSelectorImplBase& selector = iContainer->SelectorImpl(); |
462 AppUi()->AddToStackL(*this, iContainer); |
455 AppUi()->AddToStackL(*this, iContainer); |
463 // Attach CAll UI base service Interest |
|
464 selector.AttachInterestL(R_LMK_APP_AIW_INTEREST); |
|
465 |
456 |
466 #ifdef RD_SCALABLE_UI_V2 |
457 #ifdef RD_SCALABLE_UI_V2 |
467 //for touch event |
458 //for touch event |
468 iContainer->SetListBoxObserver(this); |
459 iContainer->SetListBoxObserver(this); |
469 #endif//RD_SCALABLE_UI_V2 |
460 #endif//RD_SCALABLE_UI_V2 |
651 RPointerArray<CPosLandmark> lmkArray; |
642 RPointerArray<CPosLandmark> lmkArray; |
652 switch (aServiceCommand) |
643 switch (aServiceCommand) |
653 { |
644 { |
654 case KAiwCmdMnNavigateTo: |
645 case KAiwCmdMnNavigateTo: |
655 { |
646 { |
656 iContainer->GetSelectedLandmarksL(lmkArray); |
647 if (iContainer->GetSelectedLandmarksL(lmkArray) == KErrNone) |
657 CleanupStack::PushL(TCleanupItem(CleanupArray, &lmkArray)); |
648 { |
658 iMapNavInterface->NavigateToLandmarkL(lmkArray[0], aMenuCommand); |
649 CleanupStack::PushL(TCleanupItem(CleanupArray, &lmkArray)); |
659 CleanupStack::PopAndDestroy(); // lmkArray |
650 iMapNavInterface->NavigateToLandmarkL(lmkArray[0], |
|
651 aMenuCommand); |
|
652 CleanupStack::PopAndDestroy(); // lmkArray |
|
653 } |
660 break; |
654 break; |
661 } |
655 } |
662 case KAiwCmdMnShowMap: |
656 case KAiwCmdMnShowMap: |
663 { |
657 { |
664 TInt retval = iContainer->GetSelectedLandmarksL(lmkArray); |
658 if (iContainer->GetSelectedLandmarksL(lmkArray) == KErrNone) |
665 CleanupStack::PushL(TCleanupItem(CleanupArray, &lmkArray)); |
659 { |
666 iMapNavInterface->ShowLandmarksOnMapL(lmkArray, aMenuCommand, |
660 CleanupStack::PushL(TCleanupItem(CleanupArray, &lmkArray)); |
667 CLmkMapNavigationInterface::EByLmkView); |
661 iMapNavInterface->ShowLandmarksOnMapL(lmkArray, aMenuCommand, |
668 CleanupStack::PopAndDestroy(); // lmkArray |
662 CLmkMapNavigationInterface::EByLmkView); |
|
663 CleanupStack::PopAndDestroy(); // lmkArray |
|
664 } |
669 break; |
665 break; |
670 } |
666 } |
671 case KAiwCmdMnSelectFromMap: |
667 case KAiwCmdMnSelectFromMap: |
672 { |
668 { |
673 // category view |
669 // category view |