diff -r e11368ed4880 -r 4f2773374eff screengrabber/src/notifications.cpp --- a/screengrabber/src/notifications.cpp Mon May 03 12:32:02 2010 +0300 +++ b/screengrabber/src/notifications.cpp Fri May 14 15:53:02 2010 +0300 @@ -27,28 +27,27 @@ void Notifications::imageCaptured() { - showGlobalNote("Screen shot saved to Media Gallery", HbMessageBox::MessageTypeInformation); + HbDeviceMessageBox::information("Screen shot saved to Media Gallery"); } // --------------------------------------------------------------------------- void Notifications::about() { - - HbMessageBox dlg; - - dlg.setText("Version 5.0.0 - March 10th 2010. Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. Licensed under Eclipse Public License v1.0."); - HbLabel header("About Screen Grabber"); - dlg.setHeadingWidget(&header); - dlg.setTimeout(HbPopup::NoTimeout); - dlg.exec(); + HbMessageBox *messageBox = new HbMessageBox(HbMessageBox::MessageTypeInformation); + messageBox->setText("Version 5.0.0 - March 10th 2010. Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies). All rights reserved. Licensed under Eclipse Public License v1.0."); + HbLabel *header = new HbLabel("About Screen Grabber", messageBox); + messageBox->setHeadingWidget(header); + messageBox->setAttribute(Qt::WA_DeleteOnClose); + messageBox->setTimeout(HbPopup::NoTimeout); + messageBox->open(); } // --------------------------------------------------------------------------- void Notifications::error(const QString& errorMessage) { - showGlobalNote(errorMessage, HbMessageBox::MessageTypeWarning); + HbDeviceMessageBox::warning(errorMessage); } @@ -60,7 +59,7 @@ text.setNum(amount, 10); text.append(" screen shots saved to Media Gallery"); - showGlobalNote(text, HbMessageBox::MessageTypeInformation); + HbDeviceMessageBox::information(text); } @@ -68,7 +67,7 @@ void Notifications::videoCaptured() { - showGlobalNote("Video saved to Media Gallery", HbMessageBox::MessageTypeInformation); + HbDeviceMessageBox::information("Video saved to Media Gallery"); } @@ -84,14 +83,3 @@ } // --------------------------------------------------------------------------- - -void Notifications::showGlobalNote(const QString& text, HbMessageBox::MessageBoxType type) -{ - // Code below launches a global note - - HbDeviceMessageBox note(text, type); - note.information(text); - -} - -// ---------------------------------------------------------------------------