Index: trunk/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.cpp	(revision 47614)
+++ trunk/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.cpp	(revision 47615)
@@ -91,5 +91,5 @@
 {
     /* Make sure parent is set! */
-    AssertMsg(pParent, ("Parent is NULL!"));
+    AssertMsg(pParent, ("Parent is NULL!\n"));
     if (!pParent)
         return;
@@ -109,5 +109,5 @@
 {
     /* Make sure parent is set! */
-    AssertMsg(pParent, ("Parent is NULL!"));
+    AssertMsg(pParent, ("Parent is NULL!\n"));
     if (!pParent)
         return;
@@ -127,5 +127,5 @@
 {
     /* Make sure parent is set! */
-    AssertMsg(pParent, ("Parent is NULL!"));
+    AssertMsg(pParent, ("Parent is NULL!\n"));
     if (!pParent)
         return;
@@ -151,5 +151,4 @@
 void UIPopupCenter::message(QWidget *pParent, const QString &strPopupPaneID,
                             const QString &strMessage, const QString &strDetails,
-                            int iButton1 /*= 0*/, int iButton2 /*= 0*/,
                             const QString &strButtonText1 /*= QString()*/,
                             const QString &strButtonText2 /*= QString()*/,
@@ -158,17 +157,19 @@
     showPopupPane(pParent, strPopupPaneID,
                   strMessage, strDetails,
-                  iButton1, iButton2,
                   strButtonText1, strButtonText2,
                   fProposeAutoConfirmation);
 }
 
-void UIPopupCenter::error(QWidget *pParent, const QString &strPopupPaneID,
-                          const QString &strMessage, const QString &strDetails,
+void UIPopupCenter::popup(QWidget *pParent, const QString &strPopupPaneID,
+                          const QString &strMessage)
+{
+    message(pParent, strPopupPaneID, strMessage, QString());
+}
+
+void UIPopupCenter::alert(QWidget *pParent, const QString &strPopupPaneID,
+                          const QString &strMessage,
                           bool fProposeAutoConfirmation /*= false*/)
 {
-    message(pParent, strPopupPaneID,
-            strMessage, strDetails,
-            AlertButton_Cancel | AlertButtonOption_Default | AlertButtonOption_Escape /* 1st button */,
-            0 /* 2nd button */,
+    message(pParent, strPopupPaneID, strMessage, QString(),
             QApplication::translate("UIMessageCenter", "Close") /* 1st button text */,
             QString() /* 2nd button text */,
@@ -176,42 +177,15 @@
 }
 
-void UIPopupCenter::alert(QWidget *pParent, const QString &strPopupPaneID,
-                          const QString &strMessage,
-                          bool fProposeAutoConfirmation /*= false*/)
-{
-    error(pParent, strPopupPaneID,
-          strMessage, QString(),
-          fProposeAutoConfirmation);
-}
-
 void UIPopupCenter::question(QWidget *pParent, const QString &strPopupPaneID,
                              const QString &strMessage,
-                             int iButton1 /*= 0*/, int iButton2 /*= 0*/,
                              const QString &strButtonText1 /*= QString()*/,
                              const QString &strButtonText2 /*= QString()*/,
                              bool fProposeAutoConfirmation /*= false*/)
 {
-    message(pParent, strPopupPaneID,
-            strMessage, QString(),
-            iButton1, iButton2,
+    message(pParent, strPopupPaneID, strMessage, QString(),
             strButtonText1, strButtonText2,
             fProposeAutoConfirmation);
 }
 
-void UIPopupCenter::questionBinary(QWidget *pParent, const QString &strPopupPaneID,
-                                   const QString &strMessage,
-                                   const QString &strOkButtonText /*= QString()*/,
-                                   const QString &strCancelButtonText /*= QString()*/,
-                                   bool fProposeAutoConfirmation /*= false*/)
-{
-    question(pParent, strPopupPaneID,
-             strMessage,
-             AlertButton_Ok | AlertButtonOption_Default,
-             AlertButton_Cancel | AlertButtonOption_Escape,
-             strOkButtonText,
-             strCancelButtonText,
-             fProposeAutoConfirmation);
-}
-
 void UIPopupCenter::recall(QWidget *pParent, const QString &strPopupPaneID)
 {
@@ -221,22 +195,35 @@
 void UIPopupCenter::showPopupPane(QWidget *pParent, const QString &strPopupPaneID,
                                   const QString &strMessage, const QString &strDetails,
-                                  int iButton1, int iButton2,
-                                  QString strButtonText1, QString strButtonText2,
-                                  bool fProposeAutoConfirmation)
-{
-    /* Make sure parent is set! */
-    AssertMsg(pParent, ("Parent is NULL!"));
-    if (!pParent)
-        return;
-
-    /* Make sure at least one button is valid: */
-    if (iButton1 == 0 && iButton2 == 0)
-    {
+                                  QString strButtonText1 /*= QString()*/, QString strButtonText2 /*= QString()*/,
+                                  bool fProposeAutoConfirmation /*= false*/)
+{
+    /* Make sure parent is set! */
+    AssertMsg(pParent, ("Parent is NULL!\n"));
+    if (!pParent)
+        return;
+
+    /* Prepare buttons: */
+    int iButton1 = 0;
+    int iButton2 = 0;
+    /* Make sure single button is properly configured: */
+    if (!strButtonText1.isEmpty() && strButtonText2.isEmpty())
         iButton1 = AlertButton_Cancel | AlertButtonOption_Default | AlertButtonOption_Escape;
-        strButtonText1 = QApplication::translate("UIMessageCenter", "Close");
+    else if (strButtonText1.isEmpty() && !strButtonText2.isEmpty())
+        iButton2 = AlertButton_Cancel | AlertButtonOption_Default | AlertButtonOption_Escape;
+    /* Make sure buttons are unique if set both: */
+    else if (!strButtonText1.isEmpty() && !strButtonText2.isEmpty())
+    {
+        iButton1 = AlertButton_Ok | AlertButtonOption_Default;
+        iButton2 = AlertButton_Cancel | AlertButtonOption_Escape;
+        /* If user made a mistake in button names, we will fix that: */
+        if (strButtonText1 == strButtonText2)
+        {
+            strButtonText1 = QApplication::translate("UIMessageCenter", "Ok");
+            strButtonText1 = QApplication::translate("UIMessageCenter", "Cancel");
+        }
     }
 
     /* Check if popup-pane was auto-confirmed before: */
-    if (fProposeAutoConfirmation)
+    if ((iButton1 || iButton2) && fProposeAutoConfirmation)
     {
         QStringList confirmedPopupList = vboxGlobal().virtualBox().GetExtraData(GUI_SuppressMessages).split(',');
@@ -285,7 +272,7 @@
         /* Compose button description map: */
         QMap<int, QString> buttonDescriptions;
-        if (iButton1 != 0 && !buttonDescriptions.contains(iButton1))
+        if (iButton1 != 0)
             buttonDescriptions[iButton1] = strButtonText1;
-        if (iButton2 != 0 && !buttonDescriptions.contains(iButton2))
+        if (iButton2 != 0)
             buttonDescriptions[iButton2] = strButtonText2;
         /* Create new one: */
@@ -298,5 +285,5 @@
 {
     /* Make sure parent is set! */
-    AssertMsg(pParent, ("Parent is NULL!"));
+    AssertMsg(pParent, ("Parent is NULL!\n"));
     if (!pParent)
         return;
@@ -336,5 +323,5 @@
     if (!m_stacks.contains(strPopupStackID))
     {
-        AssertMsgFailed(("Popup-stack already destroyed!"));
+        AssertMsgFailed(("Popup-stack already destroyed!\n"));
         return;
     }
@@ -351,5 +338,5 @@
 {
     /* Make sure parent is set! */
-    AssertMsg(pParent, ("Parent is NULL!"));
+    AssertMsg(pParent, ("Parent is NULL!\n"));
     if (!pParent)
         return QString();
@@ -367,5 +354,5 @@
 {
     /* Make sure parent is set! */
-    AssertMsg(pParent, ("Parent is NULL!"));
+    AssertMsg(pParent, ("Parent is NULL!\n"));
     if (!pParent)
         return;
@@ -395,5 +382,5 @@
 {
     /* Make sure parent is set! */
-    AssertMsg(pParent, ("Parent is NULL!"));
+    AssertMsg(pParent, ("Parent is NULL!\n"));
     if (!pParent)
         return;
Index: trunk/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.h	(revision 47614)
+++ trunk/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.h	(revision 47615)
@@ -58,9 +58,8 @@
 
     /* API: Main message function.
-     * Provides one-two buttons.
-     * Used directly only in exceptional cases: */
+     * Provides up to two buttons.
+     * Its interface, do NOT use it directly! */
     void message(QWidget *pParent, const QString &strPopupPaneID,
                  const QString &strMessage, const QString &strDetails,
-                 int iButton1 = 0, int iButton2 = 0,
                  const QString &strButtonText1 = QString(),
                  const QString &strButtonText2 = QString(),
@@ -68,11 +67,10 @@
 
     /* API: Wrapper to 'message' function.
-     * Provides single OK button: */
-    void error(QWidget *pParent, const QString &strPopupPaneID,
-               const QString &strMessage, const QString &strDetails,
-               bool fProposeAutoConfirmation = false);
+     * Omits details, provides no buttons: */
+    void popup(QWidget *pParent, const QString &strPopupPaneID,
+               const QString &strMessage);
 
-    /* API: Wrapper to 'error' function.
-     * Omits details: */
+    /* API: Wrapper to 'message' function.
+     * Omits details, provides one button: */
     void alert(QWidget *pParent, const QString &strPopupPaneID,
                const QString &strMessage,
@@ -80,20 +78,10 @@
 
     /* API: Wrapper to 'message' function.
-     * Omits details, provides up to two buttons.
-     * Used directly only in exceptional cases: */
+     * Omits details, provides up to two buttons: */
     void question(QWidget *pParent, const QString &strPopupPaneID,
                   const QString &strMessage,
-                  int iButton1 = 0, int iButton2 = 0,
                   const QString &strButtonText1 = QString(),
                   const QString &strButtonText2 = QString(),
                   bool fProposeAutoConfirmation = false);
-
-    /* API: Wrapper to 'question' function,
-     * Question providing two buttons (OK and Cancel by default): */
-    void questionBinary(QWidget *pParent, const QString &strPopupPaneID,
-                        const QString &strMessage,
-                        const QString &strOkButtonText = QString(),
-                        const QString &strCancelButtonText = QString(),
-                        bool fProposeAutoConfirmation = false);
 
     /* API: Recall function,
@@ -131,7 +119,6 @@
     void showPopupPane(QWidget *pParent, const QString &strPopupPaneID,
                        const QString &strMessage, const QString &strDetails,
-                       int iButton1, int iButton2,
-                       QString strButtonText1, QString strButtonText2,
-                       bool fProposeAutoConfirmation);
+                       QString strButtonText1 = QString(), QString strButtonText2 = QString(),
+                       bool fProposeAutoConfirmation = false);
     void hidePopupPane(QWidget *pParent, const QString &strPopupPaneID);
 
