voicerecorder/RecViewSrc/CVRRecView.cpp
branchRCL_3
changeset 15 487b46c8e1a4
parent 13 4e5b531d23cb
child 19 2f5c9ee7098c
equal deleted inserted replaced
14:f962425b9f8b 15:487b46c8e1a4
   217     iSendUi = CSendUi::NewL();
   217     iSendUi = CSendUi::NewL();
   218 
   218 
   219     iModelActivator = new (ELeave) CVRRecViewModelActivator(iModel);
   219     iModelActivator = new (ELeave) CVRRecViewModelActivator(iModel);
   220 
   220 
   221     iUSBStateHandler = CVRUSBStateHanlder::NewL(this);
   221     iUSBStateHandler = CVRUSBStateHanlder::NewL(this);
   222 
       
   223     if (CVRUSBStateHanlder::IsUsbActive())
       
   224         {
       
   225         ShowDialogForWaitUSBPluggingOutL();
       
   226         AppUi()->Exit();
       
   227         }
       
   228     }
   222     }
   229 
   223 
   230 // ---------------------------------------------------------------------------
   224 // ---------------------------------------------------------------------------
   231 // CVRRecView::Id
   225 // CVRRecView::Id
   232 // 
   226 // 
   383                 aMenuPane->SetItemDimmed(ECmdDelete, ETrue);
   377                 aMenuPane->SetItemDimmed(ECmdDelete, ETrue);
   384                 aMenuPane->SetItemDimmed(ECmdRename, ETrue);
   378                 aMenuPane->SetItemDimmed(ECmdRename, ETrue);
   385                 aMenuPane->SetItemDimmed(ECmdGoToMyClips, ETrue);
   379                 aMenuPane->SetItemDimmed(ECmdGoToMyClips, ETrue);
   386                 }
   380                 }
   387 
   381 
   388 			AddSendToMenuL( aResourceId, aMenuPane );
   382 			TRAP_IGNORE(AddSendToMenuL( aResourceId, aMenuPane ));
       
   383 			
   389 			break;
   384 			break;
   390 			}
   385 			}
   391 
   386 
   392 		case R_VR_REC_MENUPANE_VIEWER:
   387 		case R_VR_REC_MENUPANE_VIEWER:
   393 			{
   388 			{
   411                     {
   406                     {
   412                     aMenuPane->SetItemDimmed(ECmdSaveAttachment, ETrue);
   407                     aMenuPane->SetItemDimmed(ECmdSaveAttachment, ETrue);
   413                     }
   408                     }
   414                 else
   409                 else
   415                     {
   410                     {
   416                     AddSendToMenuL(aResourceId, aMenuPane);
   411 					TRAP_IGNORE(AddSendToMenuL(aResourceId, aMenuPane));
   417                     }
   412                     }
   418                 }
   413                 }
   419 
   414 
   420 			break;
   415 			break;
   421 			}
   416 			}
   832 		return iModel->Quality();
   827 		return iModel->Quality();
   833 	}
   828 	}
   834 
   829 
   835 TInt CVRRecView::HandleUsbPlugInL()
   830 TInt CVRRecView::HandleUsbPlugInL()
   836     {
   831     {
       
   832 	if(MenuBar()->IsDisplayed())
       
   833 		{
       
   834 		MenuBar()->StopDisplayingMenuBar();
       
   835 		MenuBar()->TryDisplayMenuBarL();
       
   836 		}
       
   837 	
   837     if (EStateRecording == iModel->VisualStateId() || EStateRecordingPaused
   838     if (EStateRecording == iModel->VisualStateId() || EStateRecordingPaused
   838             == iModel->VisualStateId() || EStatePlaying
   839             == iModel->VisualStateId() || EStatePlaying
   839             == iModel->VisualStateId() || EStatePlayingPaused
   840             == iModel->VisualStateId() || EStatePlayingPaused
   840             == iModel->VisualStateId())
   841             == iModel->VisualStateId())
   841         {
   842         {
   849         ShowDialogForWaitUSBPluggingOutL();
   850         ShowDialogForWaitUSBPluggingOutL();
   850         AppUi()->Exit();
   851         AppUi()->Exit();
   851         }
   852         }
   852 
   853 
   853     HandleCommandL(ECmdUSBChange);
   854     HandleCommandL(ECmdUSBChange);
   854     WaitDialogForUSBPluggingOut(iUsbWaitDialog);
   855     if(iUsbWaitDialog == NULL)
       
   856         WaitDialogForUSBPluggingOut(iUsbWaitDialog);
   855     return KErrNone;
   857     return KErrNone;
   856     }
   858     }
   857 
   859 
   858 TInt CVRRecView::HandleUsbPlugOutL()
   860 TInt CVRRecView::HandleUsbPlugOutL()
   859     {
   861     {
   860     if (iUsbWaitDialog)
   862 	if(MenuBar()->IsDisplayed())
   861         {
   863 		{
   862         iUsbWaitDialog->ProcessFinishedL();
   864 		MenuBar()->StopDisplayingMenuBar();
   863         }
   865 		MenuBar()->TryDisplayMenuBarL();
       
   866 		}
       
   867 	
   864 
   868 
   865     HandleCommandL(ECmdUSBChange);
   869     HandleCommandL(ECmdUSBChange);
   866     return KErrNone;
   870     return KErrNone;
   867     }
   871     }
   868 
   872