camerauis/cameraapp/generic/src/CamVideoPostCaptureView.cpp
branchRCL_3
changeset 67 756ad29ed18e
parent 54 bac7acad7cb3
equal deleted inserted replaced
62:f0c0788c4de2 67:756ad29ed18e
   238         menuBar->SetMenuTitleResourceId(
   238         menuBar->SetMenuTitleResourceId(
   239                 ROID( R_CAM_VIDEO_POST_CAPTURE_MENUBAR_ID ) );
   239                 ROID( R_CAM_VIDEO_POST_CAPTURE_MENUBAR_ID ) );
   240         }
   240         }
   241 
   241 
   242     CCamAppUi* appUi = static_cast<CCamAppUi*>( AppUi() );
   242     CCamAppUi* appUi = static_cast<CCamAppUi*>( AppUi() );
   243     /*if ( iController.IsTouchScreenSupported() )
       
   244         {
       
   245         if ( appUi->IsSecondCameraEnabled() )
       
   246             {
       
   247             if ( iOneClickUploadUtility->OneClickUploadSupported() )
       
   248                 {
       
   249                 TInt resourceId = appUi->IsQwerty2ndCamera()? 
       
   250                               R_CAM_VIDEO_POSTCAPTURE_TOOLBAR_LANDSCAPE_UPLOAD:
       
   251                               R_CAM_VIDEO_POSTCAPTURE_TOOLBAR_PORTRAIT_UPLOAD; 
       
   252                 CreateAndSetToolbarL( resourceId );
       
   253                 }
       
   254             else
       
   255                 {
       
   256                 TInt resourceId = appUi->IsQwerty2ndCamera()? 
       
   257                               R_CAM_VIDEO_POSTCAPTURE_TOOLBAR_LANDSCAPE:
       
   258                               R_CAM_VIDEO_POSTCAPTURE_TOOLBAR_PORTRAIT; 
       
   259                 CreateAndSetToolbarL( resourceId );
       
   260                 }
       
   261             }
       
   262         else
       
   263             {
       
   264             if ( iOneClickUploadUtility->OneClickUploadSupported() )
       
   265                 {
       
   266                 CreateAndSetToolbarL( R_CAM_VIDEO_POSTCAPTURE_TOOLBAR_UPLOAD );
       
   267                 }
       
   268             else
       
   269                 {
       
   270                 CreateAndSetToolbarL( R_CAM_VIDEO_POSTCAPTURE_TOOLBAR );
       
   271                 }
       
   272             }
       
   273         }*/
       
   274 
       
   275     iAiwServiceHandler->Reset();
   243     iAiwServiceHandler->Reset();
       
   244     
       
   245     // Attach share interest: toolbar item
   276     iAiwServiceHandler->AttachMenuL( ROID( R_CAM_VIDEO_POST_CAPTURE_MENU_ID ),
   246     iAiwServiceHandler->AttachMenuL( ROID( R_CAM_VIDEO_POST_CAPTURE_MENU_ID ),
   277             R_CAM_SHARE_ON_OVI_INTEREST );
   247             R_CAM_SHARE_ON_OVI_INTEREST );
   278 
   248 
   279     // SHARE_AIW
   249     // Attach share interest: menu item
   280     iAiwServiceHandler->AttachMenuL( ROID( R_CAM_VIDEO_POST_CAPTURE_MENU_ID),
   250     iAiwServiceHandler->AttachMenuL( ROID( R_CAM_VIDEO_POST_CAPTURE_MENU_ID),
   281                                      R_CAM_AIW_VIEW_INTEREST );
   251                                      R_CAM_AIW_VIEW_INTEREST );
   282 
   252 
   283     CCamPostCaptureViewBase::DoActivateL(
   253     CCamPostCaptureViewBase::DoActivateL(
   284             aPreViewId, aCustomMessageId, aCustomMessage );
   254             aPreViewId, aCustomMessageId, aCustomMessage );
   312             }
   282             }
   313         else
   283         else
   314             {   
   284             {   
   315             }
   285             }
   316         }
   286         }
   317     if ( iController.IntegerSettingValue(ECamSettingItemVideoEditorSupport) != ECamNoEditorSupport )
   287     if ( iController.IntegerSettingValue(ECamSettingItemVideoEditorSupport) )
   318         {
   288         {
   319         iAiwServiceHandler->AttachMenuL( ROID( R_CAM_VIDEO_POST_CAPTURE_MENU_ID ), 
   289         iAiwServiceHandler->AttachMenuL( ROID( R_CAM_VIDEO_POST_CAPTURE_MENU_ID ), 
   320                 R_CAM_SET_AS_RING_TONE_INTEREST_EDITOR );
   290                 R_CAM_SET_AS_RING_TONE_INTEREST_EDITOR );
   321         }
   291         }
   322     else
   292     else
   474     TInt itemPos(0);
   444     TInt itemPos(0);
   475 
   445 
   476     if ( aResourceId == ROID( R_CAM_VIDEO_POST_CAPTURE_MENU_ID ) ||
   446     if ( aResourceId == ROID( R_CAM_VIDEO_POST_CAPTURE_MENU_ID ) ||
   477          aResourceId == ROID( R_CAM_VIDEO_POST_CAPTURE_OK_MENU_ID ) )
   447          aResourceId == ROID( R_CAM_VIDEO_POST_CAPTURE_OK_MENU_ID ) )
   478         {
   448         {
       
   449         TBool showSend = ETrue;
       
   450         TBool showSendToCaller = EFalse;
       
   451 
       
   452 /*#ifndef __WINS__
       
   453         if ( iSFIUtils->IsCLIValidL() )
       
   454             {
       
   455             showSend = EFalse;
       
   456             showSendToCaller = ETrue;
       
   457 
       
   458             if ( iController.IntegerSettingValue( ECamSettingItemVideoQuality ) 
       
   459                 == ECamVideoQualityHigh )
       
   460                 {
       
   461                 showSendToCaller = EFalse;
       
   462                 }
       
   463             }
       
   464 #endif*/
       
   465 
       
   466         if ( !iController.IsTouchScreenSupported() ||
       
   467              !iOneClickUploadUtility->OneClickUploadSupported() )
       
   468             {
       
   469             // In non-touch UI Send/Send to caller are always in AP.
       
   470             // No need for Options menu items.
       
   471 
       
   472             // If 1-click upload is not supported in touch UI, then there is
       
   473             // a send button in the fixed toolbar. There is no need to
       
   474             // have it in Options menu.
       
   475             showSend = EFalse;
       
   476             showSendToCaller = EFalse;
       
   477             }
   479 
   478 
   480         if( aMenuPane->MenuItemExists( ECamCmdSendToCallerMultimedia, itemPos ) )
   479         if( aMenuPane->MenuItemExists( ECamCmdSendToCallerMultimedia, itemPos ) )
   481             {
   480             {
   482             aMenuPane->SetItemDimmed(
   481             aMenuPane->SetItemDimmed(
   483                 ECamCmdSendToCallerMultimedia, ETrue );
   482                 ECamCmdSendToCallerMultimedia, !showSendToCaller );
   484             }
   483             }
   485 		TInt editorSupport = iController.IntegerSettingValue(ECamSettingItemPhotoEditorSupport);
   484 
   486 		
   485         if(iController.IntegerSettingValue(ECamSettingItemVideoEditorSupport))
   487 		if( editorSupport == ECamNoEditorSupport || 
   486             {
   488 			editorSupport == ECamEditorSupportInOptions )
   487             showSend = ETrue;
   489             {
   488             }
   490 			if ( aMenuPane->MenuItemExists( ECamCmdSend, itemPos ) )
   489         
   491 				{
   490         if( aMenuPane->MenuItemExists( ECamCmdSend, itemPos ) )
   492 				aMenuPane->SetItemDimmed(
   491             {
   493 					ECamCmdSend, ETrue );
   492             aMenuPane->SetItemDimmed(
   494 				}
   493                 ECamCmdSend, !showSend );
   495 			}
   494             }
   496 		if( editorSupport == ECamNoEditorSupport || 
   495 
   497 			editorSupport == ECamEditorSupportInToolbar )
       
   498 			{
       
   499 			if ( aMenuPane->MenuItemExists( ECamCmdEditPhoto, itemPos ) )
       
   500 				{
       
   501 				aMenuPane->SetItemDimmed(
       
   502 					ECamCmdEditPhoto, ETrue );
       
   503 				}			
       
   504 			}
       
   505         /*
   496         /*
   506          * MSK : ContextOptions --> We just hide Help and Exit from the Options Menu when
   497          * MSK : ContextOptions --> We just hide Help and Exit from the Options Menu when
   507          *       the MSK is pressed in the postcapture still view
   498          *       the MSK is pressed in the postcapture still view
   508          *       iRockerKeyPress represents MSK key event in still postcapture view
   499          *       iRockerKeyPress represents MSK key event in still postcapture view
   509          */
   500          */
   571 			aToolbar->HideItem( ECamCmdOneClickUpload, ETrue, EFalse );
   562 			aToolbar->HideItem( ECamCmdOneClickUpload, ETrue, EFalse );
   572 			aToolbar->HideItem( ECamCmdPlay, ETrue, EFalse );
   563 			aToolbar->HideItem( ECamCmdPlay, ETrue, EFalse );
   573 			}
   564 			}
   574         else
   565         else
   575 			{
   566 			{
   576 			TInt editorSupport = iController.IntegerSettingValue(ECamSettingItemPhotoEditorSupport);
   567             if(iController.IntegerSettingValue(ECamSettingItemVideoEditorSupport))
   577             if( editorSupport == ECamEditorSupportInToolbar )
       
   578                 {
   568                 {
   579                 aToolbar->RemoveItem( ECamCmdSend );
   569                 aToolbar->RemoveItem( ECamCmdSend );
   580                 CAknButton* editButton = dynamic_cast<CAknButton*>(aToolbar->ControlOrNull( ECamCmdEdit ));
   570                 CAknButton* editButton = dynamic_cast<CAknButton*>(aToolbar->ControlOrNull( ECamCmdEdit ));
   581                 if( editButton )
   571                 if( editButton )
   582                     {
   572                     {