equal
deleted
inserted
replaced
347 OstTraceFunctionEntry0( GLXMPXCOMMANDHANDLER_TRYEXITL_ENTRY ); |
347 OstTraceFunctionEntry0( GLXMPXCOMMANDHANDLER_TRYEXITL_ENTRY ); |
348 if (KErrNone != aErrorCode) |
348 if (KErrNone != aErrorCode) |
349 { |
349 { |
350 // @todo error received. Close progress note |
350 // @todo error received. Close progress note |
351 DismissProgressNoteL(); |
351 DismissProgressNoteL(); |
|
352 MGlxMediaList::UnmarkAllL(*iMediaList); |
352 iMediaList->RemoveMediaListObserver(this); |
353 iMediaList->RemoveMediaListObserver(this); |
353 iMediaList->Close(); |
354 iMediaList->Close(); |
354 iMediaList = NULL; |
355 iMediaList = NULL; |
355 // handle error |
356 // handle error |
356 HandleErrorL(aErrorCode); |
357 HandleErrorL(aErrorCode); |
369 |
370 |
370 // ----------------------------------------------------------------------------- |
371 // ----------------------------------------------------------------------------- |
371 // Default implementation shows an error note |
372 // Default implementation shows an error note |
372 // ----------------------------------------------------------------------------- |
373 // ----------------------------------------------------------------------------- |
373 // |
374 // |
374 void GlxMpxCommandHandler::HandleErrorL(TInt aErrorCode) |
375 void GlxMpxCommandHandler::HandleErrorL(TInt aErrorCode) const |
375 { |
376 { |
376 OstTraceFunctionEntry0( GLXMPXCOMMANDHANDLER_HANDLEERRORL_ENTRY ); |
377 OstTraceFunctionEntry0( GLXMPXCOMMANDHANDLER_HANDLEERRORL_ENTRY ); |
377 // show error note |
|
378 // TextResolver instance for error resolving. |
|
379 CTextResolver* textresolver = CTextResolver::NewLC(); |
|
380 // Resolve the error text |
|
381 const TDesC& text = textresolver->ResolveErrorString(aErrorCode); |
|
382 |
|
383 QString qtText = QString::fromUtf16(text.Ptr(), text.Length()); |
|
384 |
|
385 HbNotificationDialog::launchDialog(qtText); |
|
386 CleanupStack::PopAndDestroy(textresolver); |
|
387 OstTraceFunctionExit0( GLXMPXCOMMANDHANDLER_HANDLEERRORL_EXIT ); |
378 OstTraceFunctionExit0( GLXMPXCOMMANDHANDLER_HANDLEERRORL_EXIT ); |
388 } |
379 } |
389 |
380 |
390 void GlxMpxCommandHandler::CompletionNoteL() const |
381 void GlxMpxCommandHandler::CompletionNoteL() const |
391 { |
382 { |
408 |
399 |
409 void GlxMpxCommandHandler::ProgressNoteL(TInt /*aCommandId*/) |
400 void GlxMpxCommandHandler::ProgressNoteL(TInt /*aCommandId*/) |
410 { |
401 { |
411 mProgressDialog = new HbProgressDialog(HbProgressDialog::WaitDialog); |
402 mProgressDialog = new HbProgressDialog(HbProgressDialog::WaitDialog); |
412 mProgressDialog->setText(ProgressTextL()); |
403 mProgressDialog->setText(ProgressTextL()); |
|
404 connect ( mProgressDialog, SIGNAL (cancelled()), this, SLOT(commandCancelled())); |
413 mProgressDialog->show(); |
405 mProgressDialog->show(); |
414 } |
406 } |
415 |
407 |
416 void GlxMpxCommandHandler::DismissProgressNoteL() |
408 void GlxMpxCommandHandler::DismissProgressNoteL() |
417 { |
409 { |
523 |
515 |
524 QString GlxMpxCommandHandler::ConfirmationTextL(bool /*multiSelection */) const |
516 QString GlxMpxCommandHandler::ConfirmationTextL(bool /*multiSelection */) const |
525 { |
517 { |
526 return QString(); |
518 return QString(); |
527 } |
519 } |
|
520 |
|
521 void GlxMpxCommandHandler::commandCancelled() |
|
522 { |
|
523 disconnect ( mProgressDialog, SIGNAL (cancelled()), this, SLOT(commandCancelled())); |
|
524 mProgressDialog = NULL; |
|
525 iMediaList->CancelCommand(); |
|
526 TryExitL(KErrCancel); |
|
527 } |