diff -r f962425b9f8b -r 487b46c8e1a4 voicerecorder/RecViewSrc/CVRRecView.cpp --- a/voicerecorder/RecViewSrc/CVRRecView.cpp Tue May 25 12:45:15 2010 +0300 +++ b/voicerecorder/RecViewSrc/CVRRecView.cpp Wed Jun 09 09:44:44 2010 +0300 @@ -219,12 +219,6 @@ iModelActivator = new (ELeave) CVRRecViewModelActivator(iModel); iUSBStateHandler = CVRUSBStateHanlder::NewL(this); - - if (CVRUSBStateHanlder::IsUsbActive()) - { - ShowDialogForWaitUSBPluggingOutL(); - AppUi()->Exit(); - } } // --------------------------------------------------------------------------- @@ -385,7 +379,8 @@ aMenuPane->SetItemDimmed(ECmdGoToMyClips, ETrue); } - AddSendToMenuL( aResourceId, aMenuPane ); + TRAP_IGNORE(AddSendToMenuL( aResourceId, aMenuPane )); + break; } @@ -413,7 +408,7 @@ } else { - AddSendToMenuL(aResourceId, aMenuPane); + TRAP_IGNORE(AddSendToMenuL(aResourceId, aMenuPane)); } } @@ -834,6 +829,12 @@ TInt CVRRecView::HandleUsbPlugInL() { + if(MenuBar()->IsDisplayed()) + { + MenuBar()->StopDisplayingMenuBar(); + MenuBar()->TryDisplayMenuBarL(); + } + if (EStateRecording == iModel->VisualStateId() || EStateRecordingPaused == iModel->VisualStateId() || EStatePlaying == iModel->VisualStateId() || EStatePlayingPaused @@ -851,16 +852,19 @@ } HandleCommandL(ECmdUSBChange); - WaitDialogForUSBPluggingOut(iUsbWaitDialog); + if(iUsbWaitDialog == NULL) + WaitDialogForUSBPluggingOut(iUsbWaitDialog); return KErrNone; } TInt CVRRecView::HandleUsbPlugOutL() { - if (iUsbWaitDialog) - { - iUsbWaitDialog->ProcessFinishedL(); - } + if(MenuBar()->IsDisplayed()) + { + MenuBar()->StopDisplayingMenuBar(); + MenuBar()->TryDisplayMenuBarL(); + } + HandleCommandL(ECmdUSBChange); return KErrNone;