equal
deleted
inserted
replaced
369 iKeyCaptureControl->ConstructL(*this); |
369 iKeyCaptureControl->ConstructL(*this); |
370 |
370 |
371 TFileName fileName(KEikSrvUIResFileName); |
371 TFileName fileName(KEikSrvUIResFileName); |
372 BaflUtils::NearestLanguageFile(iEikonEnv->FsSession(),fileName); |
372 BaflUtils::NearestLanguageFile(iEikonEnv->FsSession(),fileName); |
373 iResourceFileOffset=iCoeEnv->AddResourceFileL(fileName); |
373 iResourceFileOffset=iCoeEnv->AddResourceFileL(fileName); |
374 |
|
375 // Create FSW |
|
376 iFSControl= new (ELeave) CAknFastSwapWindowControl(*this); |
|
377 iFSControl->ConstructL(); |
|
378 |
374 |
379 // MMC unlocker |
375 // MMC unlocker |
380 iMMCUnlock = CAknMMCPasswordRequester::NewL(); |
376 iMMCUnlock = CAknMMCPasswordRequester::NewL(); |
381 |
377 |
382 // Boost our priority similar to eikon server. |
378 // Boost our priority similar to eikon server. |
487 } |
483 } |
488 #endif |
484 #endif |
489 |
485 |
490 // Create capserver discreetpopuphandler |
486 // Create capserver discreetpopuphandler |
491 CAknCapServerDiscreetPopupHandler::CreateDiscreetPopupHandlerL(); |
487 CAknCapServerDiscreetPopupHandler::CreateDiscreetPopupHandlerL(); |
492 LoadAlternateFsPlugin(); |
488 |
493 |
489 LoadAlternateFsPlugin(); |
|
490 // Create FSW |
|
491 if ( iAlternateFS == NULL ) |
|
492 { |
|
493 iFSControl= new (ELeave) CAknFastSwapWindowControl(*this); |
|
494 iFSControl->ConstructL(); |
|
495 } |
494 ProcessInitFlipStatus(); |
496 ProcessInitFlipStatus(); |
495 } |
497 } |
496 |
498 |
497 TKeyResponse CAknCapAppServerAppUi::HandleKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType) |
499 TKeyResponse CAknCapAppServerAppUi::HandleKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType) |
498 { |
500 { |
582 iAlternateFS->Dismiss(); |
584 iAlternateFS->Dismiss(); |
583 } |
585 } |
584 } |
586 } |
585 else |
587 else |
586 { |
588 { |
587 if ( aMessage.Int0() ) |
589 if ( iFSControl ) |
588 { |
590 { |
589 TInt err = KErrNone; |
591 if ( aMessage.Int0() ) |
590 TRAP( err, iFSControl->InitializeWindowGroupListL( EFalse )); |
592 { |
591 if ( !err ) |
593 TInt err = KErrNone; |
592 { |
594 TRAP( err, iFSControl->InitializeWindowGroupListL( EFalse )); |
593 iFSControl->RunFastSwapL(); |
595 if ( !err ) |
|
596 { |
|
597 iFSControl->RunFastSwapL(); |
|
598 } |
594 } |
599 } |
595 } |
600 else |
596 else |
601 { |
597 { |
602 iFSControl->CloseFastSwap(); |
598 iFSControl->CloseFastSwap(); |
603 } |
599 } |
604 } |
600 } |
605 } |
601 } |
606 } |
602 aMessage.Complete(KErrNone); |
607 aMessage.Complete(KErrNone); |
603 break; |
608 break; |
604 } |
609 } |
605 case EAknSRefreshTaskList: |
610 case EAknSRefreshTaskList: |
606 { |
611 { |
607 TInt err = UpdateTaskListL( ETrue ); |
612 TInt err = UpdateTaskListL( ETrue ); |
608 if ( err != KErrNone ) |
613 if ( err != KErrNone ) |
609 { |
614 { |
610 iFSControl->CloseFastSwap(); |
615 if ( iFSControl ) |
|
616 { |
|
617 iFSControl->CloseFastSwap(); |
|
618 } |
611 } |
619 } |
612 aMessage.Complete(err); |
620 aMessage.Complete(err); |
613 break; |
621 break; |
614 } |
622 } |
615 default: |
623 default: |
800 if(iAlternateFS && iAlternateFS->IsReady() && iAlternateFS->IsVisible()) |
808 if(iAlternateFS && iAlternateFS->IsReady() && iAlternateFS->IsVisible()) |
801 { |
809 { |
802 iAlternateFS->HandleShortAppKeyPress(); |
810 iAlternateFS->HandleShortAppKeyPress(); |
803 return ETrue; |
811 return ETrue; |
804 } |
812 } |
805 if (iFSControl->IsVisible()) |
813 if ( iFSControl ) |
806 { |
814 { |
807 iFSControl->HandleShortAppsKeyPressL(); |
815 if (iFSControl->IsVisible()) |
808 return ETrue; |
816 { |
809 } |
817 iFSControl->HandleShortAppsKeyPressL(); |
|
818 return ETrue; |
|
819 } |
|
820 } |
|
821 |
810 |
822 |
811 return EFalse; |
823 return EFalse; |
812 } |
824 } |
813 |
825 |
814 TBool CAknCapAppServerAppUi::HandleLongAppsKeyPressL() |
826 TBool CAknCapAppServerAppUi::HandleLongAppsKeyPressL() |
819 { |
831 { |
820 ShowOrDismissAlternateFs(); |
832 ShowOrDismissAlternateFs(); |
821 } |
833 } |
822 else |
834 else |
823 { |
835 { |
824 if (iFSControl->IsVisible()) |
836 if ( iFSControl ) |
825 { |
837 { |
826 iFSControl->HandleLongAppsKeyPressL(); |
838 if ( iFSControl->IsVisible()) |
827 } |
|
828 else |
|
829 { |
|
830 if (iFSControl->VisibleWindowGroupsCountL()<1) |
|
831 { |
839 { |
832 return EFalse; |
840 iFSControl->HandleLongAppsKeyPressL(); |
833 } |
841 } |
834 else |
842 else |
835 { |
843 { |
836 iFSControl->RunFastSwapL(); |
844 if (iFSControl->VisibleWindowGroupsCountL()<1) |
|
845 { |
|
846 return EFalse; |
|
847 } |
|
848 else |
|
849 { |
|
850 iFSControl->RunFastSwapL(); |
|
851 } |
837 } |
852 } |
838 } |
853 } |
|
854 |
839 } |
855 } |
840 } |
856 } |
841 return ETrue; |
857 return ETrue; |
842 } |
858 } |
843 |
859 |
1005 } |
1021 } |
1006 } |
1022 } |
1007 |
1023 |
1008 void CAknCapAppServerAppUi::HandleWsEventL(const TWsEvent& aEvent,CCoeControl* aDestination) |
1024 void CAknCapAppServerAppUi::HandleWsEventL(const TWsEvent& aEvent,CCoeControl* aDestination) |
1009 { |
1025 { |
1010 if ( iMessageReaderLongPressDetector && !IsAppsKeySuppressed() && !iFSControl->IsDisplayed() ) |
1026 if ( iMessageReaderLongPressDetector && |
|
1027 !IsAppsKeySuppressed() && |
|
1028 ( iFSControl == NULL || !iFSControl->IsDisplayed() ) ) |
1011 { |
1029 { |
1012 // Message Reader can be launched by long pressing left soft key |
1030 // Message Reader can be launched by long pressing left soft key |
1013 // events need to be intercepted/consumed before they are forwarded to cba |
1031 // events need to be intercepted/consumed before they are forwarded to cba |
1014 if ( iMessageReaderLongPressDetector->HandleWsEventL( aEvent, aDestination ) ) |
1032 if ( iMessageReaderLongPressDetector->HandleWsEventL( aEvent, aDestination ) ) |
1015 { |
1033 { |
1065 // --------------------------------------------------------- |
1083 // --------------------------------------------------------- |
1066 // |
1084 // |
1067 TInt CAknCapAppServerAppUi::UpdateTaskListL( TBool aTaskListRefreshNeeded ) |
1085 TInt CAknCapAppServerAppUi::UpdateTaskListL( TBool aTaskListRefreshNeeded ) |
1068 { |
1086 { |
1069 TInt err = KErrNone; |
1087 TInt err = KErrNone; |
1070 if ( iFSControl->IsDisplayed() ) |
1088 if ( iFSControl && iFSControl->IsDisplayed() ) |
1071 { |
1089 { |
1072 // update window group list (task list) |
1090 // update window group list (task list) |
1073 TInt windowGroupListChanged = ETrue; |
1091 TInt windowGroupListChanged = ETrue; |
1074 |
1092 |
1075 TRAP( err, windowGroupListChanged = iFSControl->InitializeWindowGroupListL( |
1093 TRAP( err, windowGroupListChanged = iFSControl->InitializeWindowGroupListL( |