26 #include <eikmenub.h> |
26 #include <eikmenub.h> |
27 #include <StringLoader.h> |
27 #include <StringLoader.h> |
28 #include <AknQueryDialog.h> |
28 #include <AknQueryDialog.h> |
29 #include <AiwCommon.hrh> |
29 #include <AiwCommon.hrh> |
30 #include <akntoolbar.h> |
30 #include <akntoolbar.h> |
|
31 #include <aknbutton.h> |
31 #include "CamUtility.h" |
32 #include "CamUtility.h" |
32 |
33 |
33 #include "Cam.hrh" |
34 #include "Cam.hrh" |
34 |
35 |
35 #include <cameraapp.rsg> |
36 #include <cameraapp.rsg> |
283 { |
286 { |
284 menuBar->SetMenuTitleResourceId( |
287 menuBar->SetMenuTitleResourceId( |
285 ROID(R_CAM_STILL_POST_CAPTURE_MENUBAR_ID)); |
288 ROID(R_CAM_STILL_POST_CAPTURE_MENUBAR_ID)); |
286 } |
289 } |
287 } |
290 } |
288 if ( iController.IsTouchScreenSupported() ) |
291 /*if ( iController.IsTouchScreenSupported() ) |
289 { |
292 { |
290 if ( appUi->IsSecondCameraEnabled() ) |
293 if ( appUi->IsSecondCameraEnabled() ) |
291 { |
294 { |
292 if ( iOneClickUploadUtility->OneClickUploadSupported() ) |
295 if ( iOneClickUploadUtility->OneClickUploadSupported() ) |
293 { |
296 { |
294 TInt resourceId = appUi->IsQwerty2ndCamera()? |
297 TInt resourceId = appUi->IsQwerty2ndCamera()? |
295 R_CAM_STILL_POSTCAPTURE_TOOLBAR_LANDSCAPE_UPLOAD: |
298 R_CAM_STILL_POSTCAPTURE_TOOLBAR_LANDSCAPE_UPLOAD: |
296 R_CAM_STILL_POSTCAPTURE_TOOLBAR_PORTRAIT_UPLOAD; |
299 R_CAM_STILL_POSTCAPTURE_TOOLBAR_PORTRAIT_UPLOAD; |
297 CreateAndSetToolbarL( resourceId ); |
300 //CreateAndSetToolbarL( resourceId ); |
298 } |
301 } |
299 else |
302 else |
300 { |
303 { |
301 TInt resourceId = appUi->IsQwerty2ndCamera()? |
304 TInt resourceId = appUi->IsQwerty2ndCamera()? |
302 R_CAM_STILL_POSTCAPTURE_TOOLBAR_LANDSCAPE: |
305 R_CAM_STILL_POSTCAPTURE_TOOLBAR_LANDSCAPE: |
315 { |
318 { |
316 CreateAndSetToolbarL( |
319 CreateAndSetToolbarL( |
317 R_CAM_STILL_POSTCAPTURE_TOOLBAR ); |
320 R_CAM_STILL_POSTCAPTURE_TOOLBAR ); |
318 } |
321 } |
319 } |
322 } |
320 } |
323 }*/ |
321 |
324 |
|
325 iAiwServiceHandler->Reset(); |
322 CCamPostCaptureViewBase::DoActivateL( |
326 CCamPostCaptureViewBase::DoActivateL( |
323 aPreViewId, aCustomMessageId, aCustomMessage ); |
327 aPreViewId, aCustomMessageId, aCustomMessage ); |
324 |
328 |
325 PERF_EVENT_END_L2( EPerfEventStillPostCaptureViewActivation ); |
329 PERF_EVENT_END_L2( EPerfEventStillPostCaptureViewActivation ); |
326 iAiwServiceHandler->Reset(); |
330 //iAiwServiceHandler->Reset(); |
327 // attach interest for PRINT from Active Toolbar |
331 // attach interest for PRINT from Active Toolbar |
328 iAiwServiceHandler->AttachL( R_CAM_MOVE_TO_STILL_IMAGE_INTEREST_AT ); |
332 iAiwServiceHandler->AttachL( R_CAM_MOVE_TO_STILL_IMAGE_INTEREST_AT ); |
329 |
333 |
330 iAiwServiceHandler->AttachMenuL( ROID(R_CAM_STILL_POST_CAPTURE_MENU_ID), |
334 iAiwServiceHandler->AttachMenuL( ROID(R_CAM_STILL_POST_CAPTURE_MENU_ID), |
331 R_CAM_MOVE_TO_STILL_IMAGE_INTEREST ); |
335 R_CAM_MOVE_TO_STILL_IMAGE_INTEREST ); |
332 |
336 |
333 iAiwServiceHandler->AttachMenuL( ROID( R_CAM_STILL_POST_CAPTURE_MENU_ID), |
337 iAiwServiceHandler->AttachMenuL( ROID( R_CAM_STILL_POST_CAPTURE_MENU_ID), |
334 R_CAM_SHARE_ON_OVI_INTEREST ); |
338 R_CAM_SHARE_ON_OVI_INTEREST ); |
335 |
339 |
|
340 // SHARE_AIW |
|
341 iAiwServiceHandler->AttachMenuL( ROID( R_CAM_STILL_POST_CAPTURE_MENU_ID), |
|
342 R_CAM_AIW_VIEW_INTEREST ); |
|
343 |
336 iAiwServiceHandler->AttachMenuL( ROID( R_CAM_STILL_POST_CAPTURE_MENU_ID), |
344 iAiwServiceHandler->AttachMenuL( ROID( R_CAM_STILL_POST_CAPTURE_MENU_ID), |
337 R_CAM_SET_AS_CALL_IMAGE_INTEREST ); |
345 R_CAM_SET_AS_CALL_IMAGE_INTEREST ); |
338 OstTrace0( CAMERAAPP_PERFORMANCE_DETAIL, DUP1_CCAMSTILLPOSTCAPTUREVIEW_DOACTIVATEL, "e_CCamStillPostCaptureView_DoActivateL 0" ); |
346 OstTrace0( CAMERAAPP_PERFORMANCE_DETAIL, DUP1_CCAMSTILLPOSTCAPTUREVIEW_DOACTIVATEL, "e_CCamStillPostCaptureView_DoActivateL 0" ); |
339 } |
347 } |
340 |
348 |
420 { |
428 { |
421 BaseConstructL( ROID(R_CAM_STILL_POST_CAPTURE_VIEW_ID)); |
429 BaseConstructL( ROID(R_CAM_STILL_POST_CAPTURE_VIEW_ID)); |
422 CCamPostCaptureViewBase::ConstructL(); |
430 CCamPostCaptureViewBase::ConstructL(); |
423 |
431 |
424 iAiwServiceHandler->AttachMenuL( ROID( R_CAM_STILL_POST_CAPTURE_MENU_ID), R_CAM_SHARE_ON_OVI_INTEREST ); |
432 iAiwServiceHandler->AttachMenuL( ROID( R_CAM_STILL_POST_CAPTURE_MENU_ID), R_CAM_SHARE_ON_OVI_INTEREST ); |
|
433 // SHARE_AIW |
|
434 iAiwServiceHandler->AttachMenuL( ROID( R_CAM_STILL_POST_CAPTURE_MENU_ID), R_CAM_AIW_VIEW_INTEREST ); |
|
435 |
425 iRockerKeyPress = EFalse; |
436 iRockerKeyPress = EFalse; |
426 } |
437 } |
427 |
438 |
428 |
439 |
429 // --------------------------------------------------------------------------- |
440 // --------------------------------------------------------------------------- |
567 if ( aMenuPane->MenuItemExists( ECamCmdSendToCallerMultimedia, itemPos ) ) |
578 if ( aMenuPane->MenuItemExists( ECamCmdSendToCallerMultimedia, itemPos ) ) |
568 { |
579 { |
569 aMenuPane->SetItemDimmed( |
580 aMenuPane->SetItemDimmed( |
570 ECamCmdSendToCallerMultimedia, !showSendToCaller ); |
581 ECamCmdSendToCallerMultimedia, !showSendToCaller ); |
571 } |
582 } |
572 |
583 |
|
584 if(iController.IntegerSettingValue(ECamSettingItemPhotoEditorSupport)) |
|
585 { |
|
586 showSend = ETrue; |
|
587 } |
|
588 |
573 if ( aMenuPane->MenuItemExists( ECamCmdSend, itemPos ) ) |
589 if ( aMenuPane->MenuItemExists( ECamCmdSend, itemPos ) ) |
574 { |
590 { |
575 aMenuPane->SetItemDimmed( |
591 aMenuPane->SetItemDimmed( |
576 ECamCmdSend, !showSend ); |
592 ECamCmdSend, !showSend ); |
577 } |
593 } |
630 CAknToolbar* aToolbar ) |
646 CAknToolbar* aToolbar ) |
631 { |
647 { |
632 PRINT2( _L("Camera => CCamStillPostCaptureView::DynInitToolbarL(%d, 0x%X)" ), aResourceId, aToolbar ); |
648 PRINT2( _L("Camera => CCamStillPostCaptureView::DynInitToolbarL(%d, 0x%X)" ), aResourceId, aToolbar ); |
633 (void)aResourceId; //remove compiler warning |
649 (void)aResourceId; //remove compiler warning |
634 |
650 |
635 if( iEmbedded && aToolbar && iController.IsTouchScreenSupported() ) |
651 if( aToolbar && iController.IsTouchScreenSupported() ) |
636 { |
652 { |
637 // HideItem will not do anything if a button for the given |
653 // HideItem will not do anything if a button for the given |
638 // command ID is not found. |
654 // command ID is not found. |
639 aToolbar->HideItem( ECamCmdSend, ETrue, EFalse ); |
655 if( iEmbedded ) |
640 aToolbar->HideItem( ECamCmdPhotos, ETrue, EFalse ); |
656 { |
641 aToolbar->HideItem( ECamCmdOneClickUpload, ETrue, EFalse ); |
657 aToolbar->HideItem( ECamCmdSend, ETrue, EFalse ); |
642 aToolbar->HideItem( ECamCmdDelete, ETrue, EFalse ); |
658 aToolbar->HideItem( ECamCmdEdit, ETrue, EFalse ); |
|
659 aToolbar->HideItem( ECamCmdPhotos, ETrue, EFalse ); |
|
660 aToolbar->HideItem( ECamCmdOneClickUpload, ETrue, EFalse ); |
|
661 aToolbar->HideItem( ECamCmdDelete, ETrue, EFalse ); |
|
662 } |
|
663 else |
|
664 { |
|
665 if(iController.IntegerSettingValue(ECamSettingItemPhotoEditorSupport)) |
|
666 { |
|
667 aToolbar->RemoveItem( ECamCmdSend ); |
|
668 CAknButton* editButton = dynamic_cast<CAknButton*>(aToolbar->ControlOrNull( ECamCmdEdit )); |
|
669 if( editButton ) |
|
670 { |
|
671 CAknButtonState* state = editButton->State(); |
|
672 if( state ) |
|
673 { |
|
674 HBufC* helpText = StringLoader::LoadLC( R_QTN_LCAM_TT_IMAGE_EDITOR ); |
|
675 state->SetHelpTextL(*helpText); |
|
676 CleanupStack::PopAndDestroy(helpText); |
|
677 } |
|
678 } |
|
679 } |
|
680 else |
|
681 { |
|
682 aToolbar->RemoveItem( ECamCmdEdit ); |
|
683 } |
|
684 |
|
685 if(iOneClickUploadUtility->OneClickUploadSupported()) |
|
686 { |
|
687 aToolbar->RemoveItem( ECamCmdPhotos ); |
|
688 } |
|
689 else |
|
690 { |
|
691 aToolbar->RemoveItem( ECamCmdOneClickUpload ); |
|
692 } |
|
693 } |
643 } |
694 } |
644 |
695 |
645 PRINT2( _L("Camera <= CCamStillPostCaptureView::DynInitToolbarL(%d, 0x%X)" ), aResourceId, aToolbar ); |
696 PRINT2( _L("Camera <= CCamStillPostCaptureView::DynInitToolbarL(%d, 0x%X)" ), aResourceId, aToolbar ); |
646 } |
697 } |
647 |
698 |