ui/commandhandlers/commandhandlerbase/src/glxmpxcommandhandler.cpp
changeset 67 199e6e1e0b54
parent 55 fb37077c270f
child 69 45459746d5e8
--- a/ui/commandhandlers/commandhandlerbase/src/glxmpxcommandhandler.cpp	Thu Sep 02 20:26:45 2010 +0300
+++ b/ui/commandhandlers/commandhandlerbase/src/glxmpxcommandhandler.cpp	Fri Sep 17 08:29:24 2010 +0300
@@ -349,6 +349,7 @@
         {
         // @todo error received. Close progress note 
         DismissProgressNoteL();
+        MGlxMediaList::UnmarkAllL(*iMediaList);
         iMediaList->RemoveMediaListObserver(this);
         iMediaList->Close();
         iMediaList = NULL;
@@ -371,19 +372,9 @@
 // Default implementation shows an error note
 // -----------------------------------------------------------------------------
 //	
-void GlxMpxCommandHandler::HandleErrorL(TInt aErrorCode)
+void GlxMpxCommandHandler::HandleErrorL(TInt aErrorCode) const
     {
     OstTraceFunctionEntry0( GLXMPXCOMMANDHANDLER_HANDLEERRORL_ENTRY );
-    // show error note
-    // TextResolver instance for error resolving.
-    CTextResolver* textresolver = CTextResolver::NewLC();
-    // Resolve the error text
-    const TDesC& text = textresolver->ResolveErrorString(aErrorCode);
-
-    QString qtText = QString::fromUtf16(text.Ptr(), text.Length());
-
-	HbNotificationDialog::launchDialog(qtText);
-    CleanupStack::PopAndDestroy(textresolver);
     OstTraceFunctionExit0( GLXMPXCOMMANDHANDLER_HANDLEERRORL_EXIT );
     }
 
@@ -410,6 +401,7 @@
     {
     mProgressDialog = new HbProgressDialog(HbProgressDialog::WaitDialog);
     mProgressDialog->setText(ProgressTextL());
+    connect ( mProgressDialog, SIGNAL (cancelled()), this, SLOT(commandCancelled()));
     mProgressDialog->show();
     }
 
@@ -525,3 +517,11 @@
     {
     return QString();
     }
+
+void GlxMpxCommandHandler::commandCancelled()
+    {
+    disconnect ( mProgressDialog, SIGNAL (cancelled()), this, SLOT(commandCancelled()));
+    mProgressDialog = NULL;
+    iMediaList->CancelCommand();
+    TryExitL(KErrCancel);
+    }