Index: /trunk/src/VBox/Frontends/VirtualBox/src/UIMediumTypeChangeDialog.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/UIMediumTypeChangeDialog.cpp	(revision 45291)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/UIMediumTypeChangeDialog.cpp	(revision 45292)
@@ -92,5 +92,5 @@
     {
         /* Show error message: */
-        msgCenter().cannotChangeMediumType(this, m_medium, m_oldMediumType, m_newMediumType);
+        msgCenter().cannotChangeMediumType(m_medium, m_oldMediumType, m_newMediumType, this);
         return;
     }
Index: /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp	(revision 45291)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp	(revision 45292)
@@ -927,115 +927,135 @@
 }
 
-void UIMessageCenter::cannotChangeMediumType(QWidget *pParent,
-                                             const CMedium &medium,
-                                             KMediumType oldMediumType,
-                                             KMediumType newMediumType)
+void UIMessageCenter::cannotChangeMediumType(const CMedium &medium, KMediumType oldMediumType, KMediumType newMediumType,
+                                             QWidget *pParent /*= 0*/)
 {
     message(pParent ? pParent : mainWindowShown(), MessageType_Error,
             tr("<p>Error changing medium type from <b>%1</b> to <b>%2</b>.</p>")
-                .arg(gpConverter->toString(oldMediumType)).arg(gpConverter->toString(newMediumType)),
+               .arg(gpConverter->toString(oldMediumType)).arg(gpConverter->toString(newMediumType)),
             formatErrorInfo(medium));
 }
 
-bool UIMessageCenter::confirmReleaseMedium(QWidget *pParent,
-                                           const UIMedium &aMedium,
-                                           const QString &strUsage)
-{
-    /** @todo (translation-related): the gender of "the" in translations
-     * will depend on the gender of aMedium.type(). */
-    return messageOkCancel(pParent, MessageType_Question,
-        tr("<p>Are you sure you want to release the %1 "
-            "<nobr><b>%2</b></nobr>?</p>"
-            "<p>This will detach it from the "
-            "following virtual machine(s): <b>%3</b>.</p>")
-            .arg(mediumToAccusative(aMedium.type()))
-            .arg(aMedium.location())
-            .arg(strUsage),
-        0 /* auto-confirm id */,
-        tr("Release", "detach medium"));
-}
-
-bool UIMessageCenter::confirmRemoveMedium(QWidget *pParent,
-                                          const UIMedium &aMedium)
-{
-    /** @todo (translation-related): the gender of "the" in translations
-     * will depend on the gender of aMedium.type(). */
-    QString msg =
-        tr("<p>Are you sure you want to remove the %1 "
-           "<nobr><b>%2</b></nobr> from the list of known media?</p>")
-            .arg(mediumToAccusative(aMedium.type()))
-            .arg(aMedium.location());
-
-    qulonglong caps = 0;
-    QVector<KMediumFormatCapabilities> capabilities;
-    capabilities = aMedium.medium().GetMediumFormat().GetCapabilities();
-    for (int i = 0; i < capabilities.size(); i++)
-        caps |= capabilities[i];
-
-    if (aMedium.type() == UIMediumType_HardDisk &&
-        caps & MediumFormatCapabilities_File)
-    {
-        if (aMedium.state() == KMediumState_Inaccessible)
-            msg +=
-                tr("Note that as this hard disk is inaccessible its "
-                   "storage unit cannot be deleted right now.");
-        else
-            msg +=
-                tr("The next dialog will let you choose whether you also "
-                   "want to delete the storage unit of this hard disk or "
-                   "keep it for later usage.");
-    }
-    else
-        msg +=
-            tr("<p>Note that the storage unit of this medium will not be "
-               "deleted and that it will be possible to use it later again.</p>");
-
-    return messageOkCancel(pParent, MessageType_Question, msg,
-        "confirmRemoveMedium" /* auto-confirm id */,
-        tr("Remove", "medium"));
-}
-
-int UIMessageCenter::confirmDeleteHardDiskStorage(QWidget *pParent, const QString &strLocation)
-{
-    return message(pParent, MessageType_Question,
-        tr("<p>Do you want to delete the storage unit of the hard disk "
-           "<nobr><b>%1</b></nobr>?</p>"
-           "<p>If you select <b>Delete</b> then the specified storage unit "
-           "will be permanently deleted. This operation <b>cannot be "
-           "undone</b>.</p>"
-           "<p>If you select <b>Keep</b> then the hard disk will be only "
-           "removed from the list of known hard disks, but the storage unit "
-           "will be left untouched which makes it possible to add this hard "
-           "disk to the list later again.</p>")
-        .arg(strLocation),
-        0 /* auto-confirm id */,
-        QIMessageBox::Yes,
-        QIMessageBox::No | QIMessageBox::Default,
-        QIMessageBox::Cancel | QIMessageBox::Escape,
-        tr("Delete", "hard disk storage"),
-        tr("Keep", "hard disk storage"));
-}
-
-void UIMessageCenter::cannotDeleteHardDiskStorage(QWidget *pParent,
-                                                  const CMedium &medium,
-                                                  const CProgress &progress)
-{
-    /* below, we use CMedium (medium) to preserve current error info
-     * for formatErrorInfo() */
-
-    message(pParent, MessageType_Error,
-        tr("Failed to delete the storage unit of the hard disk <b>%1</b>.")
-        .arg(CMedium(medium).GetLocation()),
-        !medium.isOk() ? formatErrorInfo(medium) :
-        !progress.isOk() ? formatErrorInfo(progress) :
-        formatErrorInfo(progress.GetErrorInfo()));
-}
-
-void UIMessageCenter::cannotDetachDevice(QWidget *pParent,
-                                         const CMachine &machine,
-                                         UIMediumType type,
-                                         const QString &strLocation,
-                                         const StorageSlot &storageSlot)
-{
+bool UIMessageCenter::confirmMediumRelease(const UIMedium &medium, const QString &strUsage, QWidget *pParent /*= 0*/)
+{
+    /* Prepare the message: */
+    QString strMessage;
+    switch (medium.type())
+    {
+        case UIMediumType_HardDisk:
+        {
+            strMessage = tr("<p>Are you sure you want to release the virtual hard disk <nobr><b>%1</b></nobr>?</p>"
+                            "<p>This will detach it from the following virtual machine(s): <b>%2</b>.</p>");
+            break;
+        }
+        case UIMediumType_DVD:
+        {
+            strMessage = tr("<p>Are you sure you want to release the virtual optical disk <nobr><b>%1</b></nobr>?</p>"
+                            "<p>This will detach it from the following virtual machine(s): <b>%2</b>.</p>");
+            break;
+        }
+        case UIMediumType_Floppy:
+        {
+            strMessage = tr("<p>Are you sure you want to release the virtual floppy disk <nobr><b>%1</b></nobr>?</p>"
+                            "<p>This will detach it from the following virtual machine(s): <b>%2</b>.</p>");
+            break;
+        }
+        default:
+            break;
+    }
+    /* Show the message: */
+    return messageOkCancel(pParent ? pParent : mainWindowShown(), MessageType_Question,
+                           strMessage.arg(medium.location(), strUsage),
+                           0 /* auto-confirm id */, tr("Release", "detach medium"));
+}
+
+bool UIMessageCenter::confirmMediumRemoval(const UIMedium &medium, QWidget *pParent /*= 0*/)
+{
+    /* Prepare the message: */
+    QString strMessage;
+    switch (medium.type())
+    {
+        case UIMediumType_HardDisk:
+        {
+            strMessage = tr("<p>Are you sure you want to remove the virtual hard disk "
+                            "<nobr><b>%1</b></nobr> from the list of known media?</p>");
+            /* Compose capabilities flag: */
+            qulonglong caps = 0;
+            QVector<KMediumFormatCapabilities> capabilities;
+            capabilities = medium.medium().GetMediumFormat().GetCapabilities();
+            for (int i = 0; i < capabilities.size(); ++i)
+                caps |= capabilities[i];
+            /* Check capabilities for additional options: */
+            if (caps & MediumFormatCapabilities_File)
+            {
+                if (medium.state() == KMediumState_Inaccessible)
+                    strMessage += tr("<p>Note that as this hard disk is inaccessible its "
+                                     "storage unit cannot be deleted right now.</p>");
+            }
+            break;
+        }
+        case UIMediumType_DVD:
+        {
+            strMessage = tr("<p>Are you sure you want to remove the virtual optical disk "
+                            "<nobr><b>%1</b></nobr> from the list of known media?</p>");
+            strMessage += tr("<p>Note that the storage unit of this medium will not be "
+                             "deleted and that it will be possible to use it later again.</p>");
+            break;
+        }
+        case UIMediumType_Floppy:
+        {
+            strMessage = tr("<p>Are you sure you want to remove the virtual floppy disk "
+                            "<nobr><b>%1</b></nobr> from the list of known media?</p>");
+            strMessage += tr("<p>Note that the storage unit of this medium will not be "
+                             "deleted and that it will be possible to use it later again.</p>");
+            break;
+        }
+        default:
+            break;
+    }
+    /* Show the message: */
+    return messageOkCancel(pParent ? pParent : mainWindowShown(), MessageType_Question,
+                           strMessage.arg(medium.location()),
+                           "confirmMediumRemoval" /* auto-confirm id */, tr("Remove", "medium"));
+}
+
+int UIMessageCenter::confirmDeleteHardDiskStorage(const QString &strLocation, QWidget *pParent /*= 0*/)
+{
+    return message(pParent ? pParent : mainWindowShown(), MessageType_Question,
+                   tr("<p>Do you want to delete the storage unit of the hard disk "
+                      "<nobr><b>%1</b></nobr>?</p>"
+                      "<p>If you select <b>Delete</b> then the specified storage unit "
+                      "will be permanently deleted. This operation <b>cannot be "
+                      "undone</b>.</p>"
+                      "<p>If you select <b>Keep</b> then the hard disk will be only "
+                      "removed from the list of known hard disks, but the storage unit "
+                      "will be left untouched which makes it possible to add this hard "
+                      "disk to the list later again.</p>")
+                      .arg(strLocation),
+                   0 /* auto-confirm id */,
+                   QIMessageBox::Yes,
+                   QIMessageBox::No | QIMessageBox::Default,
+                   QIMessageBox::Cancel | QIMessageBox::Escape,
+                   tr("Delete", "hard disk storage"),
+                   tr("Keep", "hard disk storage"));
+}
+
+void UIMessageCenter::cannotDeleteHardDiskStorage(const CMedium &medium, const CProgress &progress, QWidget *pParent /*= 0*/)
+{
+    /* Preserve error-info: */
+    QString strErrorInfo = !medium.isOk() ? formatErrorInfo(medium) :
+                           !progress.isOk() ? formatErrorInfo(progress) :
+                           formatErrorInfo(progress.GetErrorInfo());
+    /* Show the message: */
+    message(pParent ? pParent : mainWindowShown(), MessageType_Error,
+            tr("Failed to delete the storage unit of the hard disk <b>%1</b>.")
+               .arg(medium.GetLocation()),
+            strErrorInfo);
+}
+
+void UIMessageCenter::cannotDetachDevice(const CMachine &machine, UIMediumType type, const QString &strLocation, const StorageSlot &storageSlot, QWidget *pParent /*= 0*/)
+{
+    /* Preserve error-info: */
+    QString strErrorInfo = formatErrorInfo(machine);
+    /* Prepare the message: */
     QString strMessage;
     switch (type)
@@ -1044,5 +1064,5 @@
         {
             strMessage = tr("Failed to detach the hard disk (<nobr><b>%1</b></nobr>) from the slot <i>%2</i> of the machine <b>%3</b>.")
-                           .arg(strLocation).arg(gpConverter->toString(storageSlot)).arg(CMachine(machine).GetName());
+                            .arg(strLocation).arg(gpConverter->toString(storageSlot)).arg(machine.GetName());
             break;
         }
@@ -1050,5 +1070,5 @@
         {
             strMessage = tr("Failed to detach the CD/DVD device (<nobr><b>%1</b></nobr>) from the slot <i>%2</i> of the machine <b>%3</b>.")
-                           .arg(strLocation).arg(gpConverter->toString(storageSlot)).arg(CMachine(machine).GetName());
+                            .arg(strLocation).arg(gpConverter->toString(storageSlot)).arg(machine.GetName());
             break;
         }
@@ -1056,5 +1076,5 @@
         {
             strMessage = tr("Failed to detach the floppy device (<nobr><b>%1</b></nobr>) from the slot <i>%2</i> of the machine <b>%3</b>.")
-                           .arg(strLocation).arg(gpConverter->toString(storageSlot)).arg(CMachine(machine).GetName());
+                            .arg(strLocation).arg(gpConverter->toString(storageSlot)).arg(machine.GetName());
             break;
         }
@@ -1062,71 +1082,119 @@
             break;
     }
-    message(pParent ? pParent : mainWindowShown(), MessageType_Error, strMessage, formatErrorInfo(machine));
-}
-
-int UIMessageCenter::cannotRemountMedium(QWidget *pParent,
-                                         const CMachine &machine,
-                                         const UIMedium &aMedium,
-                                         bool fMount,
-                                         bool fRetry)
-{
-    /** @todo (translation-related): the gender of "the" in translations
-     * will depend on the gender of aMedium.type(). */
-    QString text;
-    if (fMount)
-    {
-        text = tr("Unable to mount the %1 <nobr><b>%2</b></nobr> on the machine <b>%3</b>.");
-        if (fRetry) text += tr(" Would you like to force mounting of this medium?");
-    }
-    else
-    {
-        text = tr("Unable to unmount the %1 <nobr><b>%2</b></nobr> from the machine <b>%3</b>.");
-        if (fRetry) text += tr(" Would you like to force unmounting of this medium?");
-    }
+    /* Show the message: */
+    message(pParent ? pParent : mainWindowShown(), MessageType_Error, strMessage, strErrorInfo);
+}
+
+int UIMessageCenter::cannotRemountMedium(const CMachine &machine, const UIMedium &medium, bool fMount, bool fRetry, QWidget *pParent /*= 0*/)
+{
+    /* Preserve error-info: */
+    QString strErrorInfo = formatErrorInfo(machine);
+    /* Compose the message: */
+    QString strMessage;
+    switch (medium.type())
+    {
+        case UIMediumType_DVD:
+        {
+            if (fMount)
+            {
+                strMessage = tr("<p>Unable to mount the virtual optical disk <nobr><b>%1</b></nobr> on the machine <b>%2</b>.</p>");
+                if (fRetry)
+                    strMessage += tr("<p>Would you like to try force mounting of this medium?</p>");
+            }
+            else
+            {
+                strMessage = tr("<p>Unable to unmount the virtual optical disk <nobr><b>%1</b></nobr> from the machine <b>%2</b>.</p>");
+                if (fRetry)
+                    strMessage += tr("<p>Would you like to try force unmounting of this medium?</p>");
+            }
+            break;
+        }
+        case UIMediumType_Floppy:
+        {
+            if (fMount)
+            {
+                strMessage = tr("<p>Unable to mount the virtual floppy disk <nobr><b>%1</b></nobr> on the machine <b>%2</b>.</p>");
+                if (fRetry)
+                    strMessage += tr("<p>Would you like to try force mounting of this medium?</p>");
+            }
+            else
+            {
+                strMessage = tr("<p>Unable to unmount the virtual floppy disk <nobr><b>%1</b></nobr> from the machine <b>%2</b>.</p>");
+                if (fRetry)
+                    strMessage += tr("<p>Would you like to try force unmounting of this medium?</p>");
+            }
+            break;
+        }
+        default:
+            break;
+    }
+    /* Show the messsage: */
     if (fRetry)
-    {
-        return messageOkCancel(pParent ? pParent : mainWindowShown(), MessageType_Question, text
-            .arg(mediumToAccusative(aMedium.type(), aMedium.isHostDrive()))
-            .arg(aMedium.isHostDrive() ? aMedium.name() : aMedium.location())
-            .arg(CMachine(machine).GetName()),
-            formatErrorInfo(machine),
-            0 /* Auto Confirm ID */,
-            tr("Force Unmount"));
-    }
-    else
-    {
-        return message(pParent ? pParent : mainWindowShown(), MessageType_Error, text
-            .arg(mediumToAccusative(aMedium.type(), aMedium.isHostDrive()))
-            .arg(aMedium.isHostDrive() ? aMedium.name() : aMedium.location())
-            .arg(CMachine(machine).GetName()),
-            formatErrorInfo(machine));
-    }
-}
-
-void UIMessageCenter::cannotOpenMedium(QWidget *pParent,
-                                       const CVirtualBox &vbox,
-                                       UIMediumType type,
-                                       const QString &strLocation)
-{
-    /** @todo (translation-related): the gender of "the" in translations
-     * will depend on the gender of aMedium.type(). */
+        return messageOkCancel(pParent ? pParent : mainWindowShown(), MessageType_Question,
+                               strMessage.arg(medium.isHostDrive() ? medium.name() : medium.location()).arg(machine.GetName()),
+                               strErrorInfo,
+                               0 /* Auto Confirm ID */,
+                               tr("Force Unmount"));
+    return message(pParent ? pParent : mainWindowShown(), MessageType_Error,
+                   strMessage.arg(medium.isHostDrive() ? medium.name() : medium.location()).arg(machine.GetName()),
+                   strErrorInfo);
+}
+
+void UIMessageCenter::cannotOpenMedium(const CVirtualBox &vbox, UIMediumType type, const QString &strLocation, QWidget *pParent /*= 0*/)
+{
+    /* Prepare the message: */
+    QString strMessage;
+    switch (type)
+    {
+        case UIMediumType_HardDisk:
+        {
+            strMessage = tr("Failed to open the hard disk file <nobr><b>%1</b></nobr>.");
+            break;
+        }
+        case UIMediumType_DVD:
+        {
+            strMessage = tr("Failed to open the optical disk file <nobr><b>%1</b></nobr>.");
+            break;
+        }
+        case UIMediumType_Floppy:
+        {
+            strMessage = tr("Failed to open the floppy disk file <nobr><b>%1</b></nobr>.");
+            break;
+        }
+        default:
+            break;
+    }
+    /* Show the message: */
     message(pParent ? pParent : mainWindowShown(), MessageType_Error,
-        tr("Failed to open the %1 <nobr><b>%2</b></nobr>.")
-            .arg(mediumToAccusative(type))
-            .arg(strLocation),
-        formatErrorInfo(vbox));
-}
-
-void UIMessageCenter::cannotCloseMedium(QWidget *pParent,
-                                        const UIMedium &aMedium,
-                                        const COMResult &rc)
-{
-    /** @todo (translation-related): the gender of "the" in translations
-     * will depend on the gender of aMedium.type(). */
-    message(pParent, MessageType_Error,
-        tr("Failed to close the %1 <nobr><b>%2</b></nobr>.")
-            .arg(mediumToAccusative(aMedium.type()))
-            .arg(aMedium.location()),
-        formatErrorInfo(rc));
+            strMessage.arg(strLocation), formatErrorInfo(vbox));
+}
+
+void UIMessageCenter::cannotCloseMedium(const UIMedium &medium, const COMResult &rc, QWidget *pParent /*= 0*/)
+{
+    /* Prepare the message: */
+    QString strMessage;
+    switch (medium.type())
+    {
+        case UIMediumType_HardDisk:
+        {
+            strMessage = tr("Failed to close the hard disk file <nobr><b>%2</b></nobr>.");
+            break;
+        }
+        case UIMediumType_DVD:
+        {
+            strMessage = tr("Failed to close the optical disk file <nobr><b>%2</b></nobr>.");
+            break;
+        }
+        case UIMediumType_Floppy:
+        {
+            strMessage = tr("Failed to close the floppy disk file <nobr><b>%2</b></nobr>.");
+            break;
+        }
+        default:
+            break;
+    }
+    /* Show the message: */
+    message(pParent ? pParent : mainWindowShown(), MessageType_Error,
+            strMessage.arg(medium.location()), formatErrorInfo(rc));
 }
 
@@ -2397,24 +2465,4 @@
 
 /* static */
-QString UIMessageCenter::mediumToAccusative(UIMediumType type, bool fIsHostDrive /* = false */)
-{
-    QString strType =
-        type == UIMediumType_HardDisk ?
-            tr("hard disk", "failed to mount ...") :
-        type == UIMediumType_DVD && fIsHostDrive ?
-            tr("CD/DVD", "failed to mount ... host-drive") :
-        type == UIMediumType_DVD && !fIsHostDrive ?
-            tr("CD/DVD image", "failed to mount ...") :
-        type == UIMediumType_Floppy && fIsHostDrive ?
-            tr("floppy", "failed to mount ... host-drive") :
-        type == UIMediumType_Floppy && !fIsHostDrive ?
-            tr("floppy image", "failed to mount ...") :
-        QString();
-
-    Assert(!strType.isNull());
-    return strType;
-}
-
-/* static */
 QString UIMessageCenter::formatRC(HRESULT rc)
 {
Index: /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h	(revision 45291)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h	(revision 45292)
@@ -255,19 +255,13 @@
 
     /* API: Virtual Medium Manager warnings: */
-    void cannotChangeMediumType(QWidget *pParent, const CMedium &medium, KMediumType oldMediumType, KMediumType newMediumType);
-    bool confirmReleaseMedium(QWidget *pParent, const UIMedium &aMedium,
-                              const QString &strUsage);
-    bool confirmRemoveMedium(QWidget *pParent, const UIMedium &aMedium);
-    int confirmDeleteHardDiskStorage(QWidget *pParent,
-                                     const QString &strLocation);
-    void cannotDeleteHardDiskStorage(QWidget *pParent, const CMedium &medium,
-                                     const CProgress &progress);
-    void cannotDetachDevice(QWidget *pParent, const CMachine &machine,
-                            UIMediumType type, const QString &strLocation, const StorageSlot &storageSlot);
-    int cannotRemountMedium(QWidget *pParent, const CMachine &machine, const UIMedium &aMedium, bool fMount, bool fRetry);
-    void cannotOpenMedium(QWidget *pParent, const CVirtualBox &vbox,
-                          UIMediumType type, const QString &strLocation);
-    void cannotCloseMedium(QWidget *pParent, const UIMedium &aMedium,
-                           const COMResult &rc);
+    void cannotChangeMediumType(const CMedium &medium, KMediumType oldMediumType, KMediumType newMediumType, QWidget *pParent = 0);
+    bool confirmMediumRelease(const UIMedium &medium, const QString &strUsage, QWidget *pParent = 0);
+    bool confirmMediumRemoval(const UIMedium &medium, QWidget *pParent = 0);
+    int confirmDeleteHardDiskStorage(const QString &strLocation, QWidget *pParent = 0);
+    void cannotDeleteHardDiskStorage(const CMedium &medium, const CProgress &progress, QWidget *pParent = 0);
+    void cannotDetachDevice(const CMachine &machine, UIMediumType type, const QString &strLocation, const StorageSlot &storageSlot, QWidget *pParent = 0);
+    int cannotRemountMedium(const CMachine &machine, const UIMedium &medium, bool fMount, bool fRetry, QWidget *pParent = 0);
+    void cannotOpenMedium(const CVirtualBox &vbox, UIMediumType type, const QString &strLocation, QWidget *pParent = 0);
+    void cannotCloseMedium(const UIMedium &medium, const COMResult &rc, QWidget *pParent = 0);
 
     /* API: Wizards warnings: */
@@ -374,7 +368,4 @@
     bool askForOverridingFilesIfExists(const QVector<QString> &strPaths, QWidget *pParent = 0);
 
-    /* Helpers: */
-    static QString mediumToAccusative(UIMediumType type, bool fIsHostDrive = false);
-
     static QString formatRC(HRESULT rc);
     static QString formatErrorInfo(const COMErrorInfo &info, HRESULT wrapperRC = S_OK);
Index: /trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp	(revision 45291)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp	(revision 45292)
@@ -2286,5 +2286,5 @@
     }
     else
-        msgCenter().cannotOpenMedium(pParent, vbox, mediumType, strMediumLocation);
+        msgCenter().cannotOpenMedium(vbox, mediumType, strMediumLocation, pParent);
 
     return QString();
Index: /trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp	(revision 45291)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp	(revision 45292)
@@ -1132,5 +1132,6 @@
     UIMediumType type = item->type();
 
-    if (!msgCenter().confirmRemoveMedium (this, item->medium()))
+    /* Confirm medium removal: */
+    if (!msgCenter().confirmMediumRemoval(item->medium(), this))
         return;
 
@@ -1143,9 +1144,8 @@
             bool deleteStorage = false;
 
-            /* We don't want to try to delete inaccessible storage as it will
-             * most likely fail. Note that
-             * UIMessageCenter::confirmRemoveMedium() is aware of that and
-             * will give a corresponding hint. Therefore, once the code is
-             * changed below, the hint should be re-checked for validity. */
+            /* We don't want to try to delete inaccessible storage as it will most likely fail.
+             * Note that UIMessageCenter::confirmMediumRemoval() is aware of that and
+             * will give a corresponding hint. Therefore, once the code is changed below,
+             * the hint should be re-checked for validity. */
 
             qulonglong caps = 0;
@@ -1158,6 +1158,5 @@
                 caps & MediumFormatCapabilities_File)
             {
-                int rc = msgCenter().
-                    confirmDeleteHardDiskStorage (this, item->location());
+                int rc = msgCenter().confirmDeleteHardDiskStorage(item->location(), this);
                 if (rc == QIMessageBox::Cancel)
                     return;
@@ -1175,5 +1174,5 @@
                     if (!(progress.isOk() && progress.GetResultCode() == S_OK))
                     {
-                        msgCenter().cannotDeleteHardDiskStorage(this, hardDisk, progress);
+                        msgCenter().cannotDeleteHardDiskStorage(hardDisk, progress, this);
                         return;
                     }
@@ -1204,7 +1203,7 @@
 
     if (result.isOk())
-        vboxGlobal().removeMedium (type, id);
+        vboxGlobal().removeMedium(type, id);
     else
-        msgCenter().cannotCloseMedium (this, item->medium(), result);
+        msgCenter().cannotCloseMedium(item->medium(), result, this);
 }
 
@@ -1247,5 +1246,5 @@
     AssertReturnVoid (machines.size() > 0);
 
-    if (!msgCenter().confirmReleaseMedium (this, item->medium(), usage))
+    if (!msgCenter().confirmMediumRelease(item->medium(), usage, this))
         return;
 
@@ -1300,6 +1299,6 @@
                     {
                         CStorageController controller = machine.GetStorageControllerByName (attachment.GetController());
-                        msgCenter().cannotDetachDevice (this, machine, UIMediumType_HardDisk, aMedium.location(),
-                                                          StorageSlot(controller.GetBus(), attachment.GetPort(), attachment.GetDevice()));
+                        msgCenter().cannotDetachDevice(machine, UIMediumType_HardDisk, aMedium.location(),
+                                                       StorageSlot(controller.GetBus(), attachment.GetPort(), attachment.GetDevice()), this);
                         success = false;
                         break;
@@ -1322,5 +1321,5 @@
                     if (!machine.isOk())
                     {
-                        msgCenter().cannotRemountMedium (this, machine, aMedium, false /* mount? */, false /* retry? */);
+                        msgCenter().cannotRemountMedium(machine, aMedium, false /* mount? */, false /* retry? */, this);
                         success = false;
                         break;
@@ -1343,5 +1342,5 @@
                     if (!machine.isOk())
                     {
-                        msgCenter().cannotRemountMedium (this, machine, aMedium, false /* mount? */, false /* retry? */);
+                        msgCenter().cannotRemountMedium(machine, aMedium, false /* mount? */, false /* retry? */, this);
                         success = false;
                         break;
@@ -1645,5 +1644,5 @@
 
     if (!mVBox.isOk())
-        msgCenter().cannotOpenMedium(this, mVBox, aType, aLocation);
+        msgCenter().cannotOpenMedium(mVBox, aType, aLocation, this);
     else
         vboxGlobal().addMedium(medium);
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp	(revision 45291)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp	(revision 45292)
@@ -1492,5 +1492,6 @@
     {
         /* Ask for force remounting: */
-        if (msgCenter().cannotRemountMedium(0, machine, vboxGlobal().findMedium (fMount ? newId : currentId), fMount, true /* retry? */) == QIMessageBox::Ok)
+        if (msgCenter().cannotRemountMedium(machine, vboxGlobal().findMedium(fMount ? newId : currentId),
+                                            fMount, true /* retry? */, activeMachineWindow()) == QIMessageBox::Ok)
         {
             /* Force remount medium to the predefined port/device: */
@@ -1499,5 +1500,6 @@
                 fWasMounted = true;
             else
-                msgCenter().cannotRemountMedium(0, machine, vboxGlobal().findMedium (fMount ? newId : currentId), fMount, false /* retry? */);
+                msgCenter().cannotRemountMedium(machine, vboxGlobal().findMedium(fMount ? newId : currentId),
+                                                fMount, false /* retry? */, activeMachineWindow());
         }
     }
@@ -1551,5 +1553,6 @@
         {
             /* Ask for force remounting: */
-            if (msgCenter().cannotRemountMedium(0, machine, vboxGlobal().findMedium(fMount ? strNewId : strCurrentId), fMount, true /* retry? */) == QIMessageBox::Ok)
+            if (msgCenter().cannotRemountMedium(machine, vboxGlobal().findMedium(fMount ? strNewId : strCurrentId),
+                                                fMount, true /* retry? */, activeMachineWindow()) == QIMessageBox::Ok)
             {
                 /* Force remount medium to the predefined port/device: */
@@ -1558,5 +1561,6 @@
                     fWasMounted = true;
                 else
-                    msgCenter().cannotRemountMedium(0, machine, vboxGlobal().findMedium(fMount ? strNewId : strCurrentId), fMount, false /* retry? */);
+                    msgCenter().cannotRemountMedium(machine, vboxGlobal().findMedium(fMount ? strNewId : strCurrentId),
+                                                    fMount, false /* retry? */, activeMachineWindow());
             }
         }
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp	(revision 45291)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp	(revision 45292)
@@ -547,5 +547,5 @@
         if (!vbox.isOk())
         {
-            msgCenter().cannotOpenMedium(0, vbox, UIMediumType_DVD, strSource);
+            msgCenter().cannotOpenMedium(vbox, UIMediumType_DVD, strSource, mainMachineWindow());
             return;
         }
@@ -591,10 +591,12 @@
             {
                 /* Ask for force mounting: */
-                if (msgCenter().cannotRemountMedium(0, machine, vboxMedium, true /* mount? */, true /* retry? */) == QIMessageBox::Ok)
+                if (msgCenter().cannotRemountMedium(machine, vboxMedium, true /* mount? */,
+                                                    true /* retry? */, mainMachineWindow()) == QIMessageBox::Ok)
                 {
                     /* Force mount medium to the predefined port/device: */
                     machine.MountMedium(strCntName, iCntPort, iCntDevice, vboxMedium.medium(), true /* force */);
                     if (!machine.isOk())
-                        msgCenter().cannotRemountMedium(0, machine, vboxMedium, true /* mount? */, false /* retry? */);
+                        msgCenter().cannotRemountMedium(machine, vboxMedium, true /* mount? */,
+                                                        false /* retry? */, mainMachineWindow());
                 }
             }
Index: /trunk/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIWizardFirstRun.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIWizardFirstRun.cpp	(revision 45291)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/wizards/firstrun/UIWizardFirstRun.cpp	(revision 45292)
@@ -82,5 +82,5 @@
     else
     {
-        msgCenter().cannotRemountMedium(this, m_machine, vmedium, true /* mount? */, false /* retry? */);
+        msgCenter().cannotRemountMedium(m_machine, vmedium, true /* mount? */, false /* retry? */, this);
         return false;
     }
Index: /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic3.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic3.cpp	(revision 45291)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVMPageBasic3.cpp	(revision 45292)
@@ -121,5 +121,5 @@
         vboxGlobal().removeMedium(UIMediumType_HardDisk, strId);
     else
-        msgCenter().cannotDeleteHardDiskStorage(thisImp(), m_virtualDisk, progress);
+        msgCenter().cannotDeleteHardDiskStorage(m_virtualDisk, progress, thisImp());
 
     /* Detach virtual-disk finally: */
