483 else if ( iLandscape && iMirrored && |
483 else if ( iLandscape && iMirrored && |
484 aKeyEvent.iScanCode == EStdKeyLeftArrow ) |
484 aKeyEvent.iScanCode == EStdKeyLeftArrow ) |
485 { |
485 { |
486 // widget list -> left -> ovi button (landscape mirrored) |
486 // widget list -> left -> ovi button (landscape mirrored) |
487 if ( aType == EEventKey ) |
487 if ( aType == EEventKey ) |
488 SetFocusToPortalButton( 0 ); |
488 SetFocusToPortalButton( OperatorButtonHigherPriority ( 0 ) ); |
489 keyResponse = EKeyWasConsumed; |
489 keyResponse = EKeyWasConsumed; |
490 } |
490 } |
491 } |
491 } |
492 else if ( iPortalButtonOne->IsFocused() ) |
492 else if ( iPortalButtonOne->IsFocused() ) |
493 { |
493 { |
530 if ( aType == EEventKey ) |
530 if ( aType == EEventKey ) |
531 SetFocusToPortalButton( 1 ); |
531 SetFocusToPortalButton( 1 ); |
532 keyResponse = EKeyWasConsumed; |
532 keyResponse = EKeyWasConsumed; |
533 } |
533 } |
534 else if ( !iLandscape && iMirrored && |
534 else if ( !iLandscape && iMirrored && |
|
535 aKeyEvent.iScanCode == EStdKeyRightArrow && |
|
536 iConfiguration->PortalButtonCount() > 1 && |
|
537 iConfiguration->PortalButtonsMirrored() ) |
|
538 { |
|
539 // right portal -> left -> left portal (portrait mirrored) |
|
540 if ( aType == EEventKey ) |
|
541 SetFocusToPortalButton( 1 ); |
|
542 keyResponse = EKeyWasConsumed; |
|
543 } |
|
544 else if ( !iLandscape && iMirrored && |
535 aKeyEvent.iScanCode == EStdKeyLeftArrow && |
545 aKeyEvent.iScanCode == EStdKeyLeftArrow && |
536 iConfiguration->PortalButtonCount() > 1 ) |
546 iConfiguration->PortalButtonCount() > 1 && |
|
547 !iConfiguration->PortalButtonsMirrored() ) |
537 { |
548 { |
538 // right portal -> left -> left portal (portrait mirrored) |
549 // right portal -> left -> left portal (portrait mirrored) |
539 if ( aType == EEventKey ) |
550 if ( aType == EEventKey ) |
540 SetFocusToPortalButton( 1 ); |
551 SetFocusToPortalButton( 1 ); |
541 keyResponse = EKeyWasConsumed; |
552 keyResponse = EKeyWasConsumed; |
619 if ( aType == EEventKey ) |
630 if ( aType == EEventKey ) |
620 SetFocusToPortalButton( 0 ); |
631 SetFocusToPortalButton( 0 ); |
621 keyResponse = EKeyWasConsumed; |
632 keyResponse = EKeyWasConsumed; |
622 } |
633 } |
623 else if ( !iLandscape && iMirrored && |
634 else if ( !iLandscape && iMirrored && |
|
635 aKeyEvent.iScanCode == EStdKeyLeftArrow && |
|
636 iConfiguration->PortalButtonCount() > 1 && |
|
637 iConfiguration->PortalButtonsMirrored() ) |
|
638 { |
|
639 // left portal -> right -> right portal (portrait mirrored) |
|
640 if ( aType == EEventKey ) |
|
641 SetFocusToPortalButton( 0 ); |
|
642 keyResponse = EKeyWasConsumed; |
|
643 } |
|
644 else if ( !iLandscape && iMirrored && |
624 aKeyEvent.iScanCode == EStdKeyRightArrow && |
645 aKeyEvent.iScanCode == EStdKeyRightArrow && |
625 iConfiguration->PortalButtonCount() > 1 ) |
646 iConfiguration->PortalButtonCount() > 1 && |
|
647 !iConfiguration->PortalButtonsMirrored() ) |
626 { |
648 { |
627 // left portal -> right -> right portal (portrait mirrored) |
649 // left portal -> right -> right portal (portrait mirrored) |
628 if ( aType == EEventKey ) |
650 if ( aType == EEventKey ) |
629 SetFocusToPortalButton( 0 ); |
651 SetFocusToPortalButton( 0 ); |
630 keyResponse = EKeyWasConsumed; |
652 keyResponse = EKeyWasConsumed; |
927 // CWmMainContainer::StartLoadingWidgetsL |
949 // CWmMainContainer::StartLoadingWidgetsL |
928 // --------------------------------------------------------- |
950 // --------------------------------------------------------- |
929 // |
951 // |
930 void CWmMainContainer::StartLoadingWidgetsL() |
952 void CWmMainContainer::StartLoadingWidgetsL() |
931 { |
953 { |
|
954 if ( iFindbox && iFindPaneIsVisible ) |
|
955 { |
|
956 iFindbox->ResetL(); |
|
957 iFindbox->SetSearchTextL( KNullDesC ); |
|
958 CAknFilteredTextListBoxModel* m = |
|
959 static_cast <CAknFilteredTextListBoxModel*> ( iWidgetsList->Model() ); |
|
960 if ( m && m->Filter() ) |
|
961 { |
|
962 m->Filter()->ResetFilteringL(); |
|
963 } |
|
964 } |
932 if ( !iWidgetLoader ) |
965 if ( !iWidgetLoader ) |
933 { |
966 { |
934 // create the widget loader AO |
967 // create the widget loader AO |
935 iWidgetLoader = CWmWidgetLoaderAo::NewL( iWmPlugin, *iWidgetsList ); |
968 iWidgetLoader = CWmWidgetLoaderAo::NewL( iWmPlugin, *iWidgetsList ); |
936 } |
969 } |
952 AknLayoutUtils::EMainPane, rect ); |
985 AknLayoutUtils::EMainPane, rect ); |
953 SetRect( rect ); |
986 SetRect( rect ); |
954 |
987 |
955 // notify widgetlist |
988 // notify widgetlist |
956 iWidgetsList->HandleLayoutChanged(); |
989 iWidgetsList->HandleLayoutChanged(); |
957 } |
|
958 else if ( KAknsMessageSkinChange == aType ) |
|
959 { |
|
960 // notify widgetlist , colored add icon need to be updated |
|
961 iWidgetsList->HandleSkinChanged(); |
|
962 } |
990 } |
963 } |
991 } |
964 |
992 |
965 |
993 |
966 // --------------------------------------------------------- |
994 // --------------------------------------------------------- |
1433 // |
1461 // |
1434 void CWmMainContainer::LaunchDetailsDialogL() |
1462 void CWmMainContainer::LaunchDetailsDialogL() |
1435 { |
1463 { |
1436 CWmWidgetData* data = iWidgetsList->WidgetData(); |
1464 CWmWidgetData* data = iWidgetsList->WidgetData(); |
1437 if ( data ) |
1465 if ( data ) |
1438 { |
1466 { |
1439 const CFbsBitmap* logo = ( data->LogoImage() ) ? |
|
1440 data->LogoImage() : iWidgetsList->DefaultLogo(); |
|
1441 const CFbsBitmap* mask = ( data->LogoImageMask() ) ? |
|
1442 data->LogoImageMask() : iWidgetsList->DefaultMask(); |
|
1443 |
|
1444 // Find out if HS is full |
1467 // Find out if HS is full |
1445 TBool hsFull = ETrue; |
1468 TBool hsFull = ETrue; |
1446 MHsContentController& controller = iWmPlugin.ContentController(); |
1469 MHsContentController& controller = iWmPlugin.ContentController(); |
1447 CHsContentInfo* activeView = CHsContentInfo::NewLC(); |
1470 CHsContentInfo* activeView = CHsContentInfo::NewLC(); |
1448 if ( controller.ActiveViewL( *activeView ) == KErrNone ) |
1471 if ( controller.ActiveViewL( *activeView ) == KErrNone ) |
1453 |
1476 |
1454 CWmDetailsDlg* dlg = CWmDetailsDlg::NewL( |
1477 CWmDetailsDlg* dlg = CWmDetailsDlg::NewL( |
1455 data->Name(), |
1478 data->Name(), |
1456 data->Description(), |
1479 data->Description(), |
1457 !hsFull, |
1480 !hsFull, |
1458 logo, mask ); |
1481 data->HsContentInfo().IconPath(), |
1459 |
1482 *iWidgetsList->DefaultLogo(), |
|
1483 *iWidgetsList->DefaultMask() |
|
1484 ); |
|
1485 |
1460 if ( dlg && dlg->ExecuteLD() == ECbaAddToHs ) |
1486 if ( dlg && dlg->ExecuteLD() == ECbaAddToHs ) |
1461 { |
1487 { |
1462 AddWidgetToHomeScreenL(); |
1488 AddWidgetToHomeScreenL(); |
1463 } |
1489 } |
1464 } |
1490 } |