camerauis/cameraapp/generic/src/CamPostCaptureViewBase.cpp
branchRCL_3
changeset 20 38fb6f7eacd5
parent 16 d486e5e3cc9a
child 35 e32fcfe0045f
equal deleted inserted replaced
18:51dda465e618 20:38fb6f7eacd5
     1 /*
     1 /*
     2 * Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies). 
     2 * Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies). 
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
   237             inputParams.AppendL( param2 );
   237             inputParams.AppendL( param2 );
   238 
   238 
   239             iAiwServiceHandler->ExecuteServiceCmdL(KAiwCmdEdit, inputParams, iAiwServiceHandler->OutParamListL());        
   239             iAiwServiceHandler->ExecuteServiceCmdL(KAiwCmdEdit, inputParams, iAiwServiceHandler->OutParamListL());        
   240             }
   240             }
   241             break;
   241             break;
   242         case KAiwCmdView: // SHARE_AIW
   242         case ECamCmdShareSettings: // SHARE_AIW
   243             {
   243         case KAiwCmdView:
   244             iAiwServiceHandler->ExecuteServiceCmdL(KAiwCmdView, iAiwServiceHandler->InParamListL(), iAiwServiceHandler->OutParamListL());        
   244             {
       
   245             PRINT1( _L("Camera <> CCamPostCaptureViewBase::HandleCommandL - ECamCmdShareSettings start, cmd:%d"), aCommand );
       
   246             iOneClickUploadUtility->LaunchShareSettings();
       
   247             PRINT( _L("Camera <> CCamPostCaptureViewBase::HandleCommandL - ECamCmdShareSettings end") );            
   245             }
   248             }
   246             break;
   249             break;
   247         default:
   250         default:
   248             {
   251             {
   249             CCamViewBase::HandleCommandL( aCommand );
   252             CCamViewBase::HandleCommandL( aCommand );
   440           SetSoftKeysL( R_CAM_SOFTKEYS_BLANK );
   443           SetSoftKeysL( R_CAM_SOFTKEYS_BLANK );
   441           }
   444           }
   442       }
   445       }
   443     else
   446     else
   444       {
   447       {
       
   448       // Update the one click, in case it was modified
       
   449       if ( iOneClickUploadUtility && iOneClickUploadUtility->OneClickUploadSupported() )
       
   450           {
       
   451           iOneClickUploadUtility->UpdateUploadIconL( Toolbar(), 
       
   452 						  ( Id().iUid == ECamViewIdVideoPostCapture ) ? 
       
   453         				    ECamControllerVideo : ECamControllerImage );
       
   454           }
       
   455 
   445       // ensure cba is reset if we're not embedded
   456       // ensure cba is reset if we're not embedded
   446       if ( !iWaitForImageSave )
   457       if ( !iWaitForImageSave )
   447         {
   458         {
   448         if ( static_cast<CCamAppUiBase*>( AppUi() )->IsSecondCameraEnabled() && 
   459         if ( static_cast<CCamAppUiBase*>( AppUi() )->IsSecondCameraEnabled() && 
   449             !static_cast<CCamAppUiBase*>( AppUi() )->IsQwerty2ndCamera() )
   460             !static_cast<CCamAppUiBase*>( AppUi() )->IsQwerty2ndCamera() )
   569                 }
   580                 }
   570             else
   581             else
   571                 {
   582                 {
   572                 fixedToolbar->SetToolbarObserver( this );
   583                 fixedToolbar->SetToolbarObserver( this );
   573                 UpdateToolbarIconsL();
   584                 UpdateToolbarIconsL();
   574                 if(Id().iUid != ECamViewIdVideoPostCapture)
   585                 if( Id().iUid != ECamViewIdVideoPostCapture && !appui->IsSelfTimedCapture() )
   575                     {
   586                     {
   576                     fixedToolbar->SetDimmed(ETrue);
   587                     fixedToolbar->SetDimmed(ETrue);
   577                     }
   588                     }
   578                 fixedToolbar->SetToolbarVisibility( ETrue );
   589                 fixedToolbar->SetToolbarVisibility( ETrue );
   579                 }
   590                 }
   681         if( aMenuPane->MenuItemExists(ECamCmdAddToAlbum, itemPos) )
   692         if( aMenuPane->MenuItemExists(ECamCmdAddToAlbum, itemPos) )
   682             {
   693             {
   683             aMenuPane->SetItemDimmed( ECamCmdAddToAlbum, ETrue );
   694             aMenuPane->SetItemDimmed( ECamCmdAddToAlbum, ETrue );
   684             }
   695             }
   685         }
   696         }
   686     // Hide menu item, if Share not available
   697     // SHARE_AIW: Hide menu item, if Share not available
   687     if ( !iOneClickUploadUtility->OneClickUploadSupported() && 
   698     if ( !iOneClickUploadUtility->OneClickUploadSupported() && 
   688          aMenuPane->MenuItemExists( KAiwCmdView, itemPos ) )
   699          aMenuPane->MenuItemExists( ECamCmdShareSettings, itemPos ) )
   689         {
   700         {
   690         aMenuPane->SetItemDimmed( KAiwCmdView, ETrue );
   701         aMenuPane->SetItemDimmed( ECamCmdShareSettings, ETrue );
   691         }
   702         }
   692     }
   703     }
   693 
   704 
   694 // ---------------------------------------------------------------------------
   705 // ---------------------------------------------------------------------------
   695 // CCamPostCaptureViewBase::CCamPostCaptureViewBase
   706 // CCamPostCaptureViewBase::CCamPostCaptureViewBase
   989             if ( button && iOneClickUploadUtility->OneClickUploadSupported())
  1000             if ( button && iOneClickUploadUtility->OneClickUploadSupported())
   990                 {
  1001                 {
   991                CAknButtonState* state = button->State();
  1002                CAknButtonState* state = button->State();
   992                if ( state )
  1003                if ( state )
   993                    {
  1004                    {
   994                    state->SetHelpTextL(
  1005                    TRAP_IGNORE( state->SetHelpTextL( iOneClickUploadUtility->ButtonTooltipL() ) );
   995                            iOneClickUploadUtility->ButtonTooltipL() );
  1006                    iOneClickUploadUtility->UpdateUploadIconL( toolbar, iController.CurrentMode() );
   996                    
       
   997                    iOneClickUploadUtility->UpdateUploadIcon( toolbar, iController.CurrentMode() );
       
   998                    }
  1007                    }
   999                }
  1008                }
  1000             button = dynamic_cast<CAknButton*>(toolbar->ControlOrNull( ECamCmdEdit ));
  1009             button = dynamic_cast<CAknButton*>(toolbar->ControlOrNull( ECamCmdEdit ));
  1001             if( button )
  1010             if( button )
  1002                 {
  1011                 {