Index: trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp	(revision 45224)
+++ trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp	(revision 45225)
@@ -71,38 +71,15 @@
 #include <iprt/path.h>
 
-bool UIMessageCenter::isAnyWarningShown()
-{
-    /* Check if at least one warning is alive!
-     * All warnings are stored in m_warnings list as live pointers,
-     * this is why if some warning was deleted from another place,
-     * its pointer here will equal NULL... */
-    for (int i = 0; i < m_warnings.size(); ++i)
-        if (m_warnings[i])
-            return true;
-    return false;
-}
-
-bool UIMessageCenter::isAlreadyShown(const QString &strWarningName) const
-{
-    return m_strShownWarnings.contains(strWarningName);
-}
-
-void UIMessageCenter::setShownStatus(const QString &strWarningName)
-{
-    if (!m_strShownWarnings.contains(strWarningName))
-        m_strShownWarnings.append(strWarningName);
-}
-
-void UIMessageCenter::clearShownStatus(const QString &strWarningName)
-{
-    if (m_strShownWarnings.contains(strWarningName))
-        m_strShownWarnings.removeAll(strWarningName);
-}
-
-void UIMessageCenter::closeAllWarnings()
-{
-    /* Broadcast signal to perform emergent
-     * closing + deleting all the opened warnings. */
-    emit sigToCloseAllWarnings();
+bool UIMessageCenter::warningShown(const QString &strWarningName) const
+{
+    return m_warnings.contains(strWarningName);
+}
+
+void UIMessageCenter::setWarningShown(const QString &strWarningName, bool fWarningShown)
+{
+    if (fWarningShown && !m_warnings.contains(strWarningName))
+        m_warnings.append(strWarningName);
+    else if (!fWarningShown && m_warnings.contains(strWarningName))
+        m_warnings.removeAll(strWarningName);
 }
 
@@ -249,7 +226,4 @@
         pBox->setDetailsText(strDetails);
 
-    /* Add to warnings: */
-    m_warnings << pBox;
-
     /* Show box: */
     int rc = pBox->exec();
@@ -258,7 +232,4 @@
     if (!pBox)
         return rc;
-
-    /* Remove from warnings: */
-    m_warnings.removeAll(pBox);
 
     /* Cleanup confirmation: */
@@ -373,7 +344,4 @@
         pBox->setDetailsText(strDetails);
 
-    /* Add to warnings: */
-    m_warnings << pBox;
-
     /* Show box: */
     int rc = pBox->exec();
@@ -382,7 +350,4 @@
     if (!pBox)
         return rc;
-
-    /* Remove from warnings: */
-    m_warnings.removeAll(pBox);
 
     /* Save option: */
@@ -826,7 +791,7 @@
 void UIMessageCenter::warnAboutStateChange(QWidget *pParent)
 {
-    if (isAlreadyShown("warnAboutStateChange"))
+    if (warningShown("warnAboutStateChange"))
         return;
-    setShownStatus("warnAboutStateChange");
+    setWarningShown("warnAboutStateChange", true);
 
     message(pParent ? pParent : mainWindowShown(), Warning,
@@ -835,5 +800,5 @@
                "All other changes will be lost if you close this window now."));
 
-    clearShownStatus("warnAboutStateChange");
+    setWarningShown("warnAboutStateChange", false);
 }
 
@@ -2110,7 +2075,7 @@
 void UIMessageCenter::remindAboutMouseIntegration(bool fSupportsAbsolute)
 {
-    if (isAlreadyShown("remindAboutMouseIntegration"))
+    if (warningShown("remindAboutMouseIntegration"))
         return;
-    setShownStatus("remindAboutMouseIntegration");
+    setWarningShown("remindAboutMouseIntegration", true);
 
     static const char *kNames [2] =
@@ -2165,5 +2130,5 @@
     }
 
-    clearShownStatus("remindAboutMouseIntegration");
+    setWarningShown("remindAboutMouseIntegration", false);
 }
 
@@ -3273,7 +3238,7 @@
 void UIMessageCenter::sltRemindAboutUnsupportedUSB2(const QString &strExtPackName, QWidget *pParent)
 {
-    if (isAlreadyShown("sltRemindAboutUnsupportedUSB2"))
+    if (warningShown("sltRemindAboutUnsupportedUSB2"))
         return;
-    setShownStatus("sltRemindAboutUnsupportedUSB2");
+    setWarningShown("sltRemindAboutUnsupportedUSB2", true);
 
     message(pParent ? pParent : mainMachineWindowShown(), Warning,
@@ -3285,5 +3250,5 @@
                .arg(strExtPackName));
 
-    clearShownStatus("sltRemindAboutUnsupportedUSB2");
+    setWarningShown("sltRemindAboutUnsupportedUSB2", false);
 }
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h	(revision 45224)
+++ trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h	(revision 45225)
@@ -74,9 +74,7 @@
     };
 
-    bool isAnyWarningShown();
-    bool isAlreadyShown(const QString &strGuardBlockName) const;
-    void setShownStatus(const QString &strGuardBlockName);
-    void clearShownStatus(const QString &strGuardBlockName);
-    void closeAllWarnings();
+    /* API: Shown warning registration stuff: */
+    bool warningShown(const QString &strWarningName) const;
+    void setWarningShown(const QString &strWarningName, bool fWarningShown);
 
     int message(QWidget *pParent, Type type, const QString &strMessage,
@@ -502,6 +500,6 @@
                                      HRESULT wrapperRC = S_OK);
 
-    QStringList m_strShownWarnings;
-    mutable QList<QPointer<QIMessageBox> > m_warnings;
+    /* Variables: */
+    QStringList m_warnings;
 };
 
