voicerecorder/RecViewSrc/CVRRecView.cpp
branchRCL_3
changeset 19 487b46c8e1a4
parent 17 4e5b531d23cb
child 23 2f5c9ee7098c
--- 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;