Index: trunk/src/VBox/Frontends/VirtualBox/VirtualBox1.qrc
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/VirtualBox1.qrc	(revision 45596)
+++ trunk/src/VBox/Frontends/VirtualBox/VirtualBox1.qrc	(revision 45605)
@@ -243,4 +243,6 @@
         <file alias="restore_16px.png">images/restore_16px.png</file>
         <file alias="close_16px.png">images/close_16px.png</file>
+        <file alias="ok_16px.png">images/ok_16px.png</file>
+        <file alias="cancel_16px.png">images/cancel_16px.png</file>
     </qresource>
 </RCC>
Index: trunk/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.cpp	(revision 45596)
+++ trunk/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.cpp	(revision 45605)
@@ -158,10 +158,15 @@
         if (iButton1 == 0 && iButton2 == 0 && iButton3 == 0)
             iButton1 = AlertButton_Ok | AlertButtonOption_Default | AlertButtonOption_Escape;
+        /* Compose button description map: */
+        QMap<int, QString> buttonDescriptions;
+        if (iButton1 != 0 && !buttonDescriptions.contains(iButton1))
+            buttonDescriptions[iButton1] = strButtonText1;
+        if (iButton2 != 0 && !buttonDescriptions.contains(iButton2))
+            buttonDescriptions[iButton2] = strButtonText2;
+        if (iButton3 != 0 && !buttonDescriptions.contains(iButton3))
+            buttonDescriptions[iButton3] = strButtonText3;
         /* Create popup-pane and insert it into our map: */
         QWidget *pPopupBoxParent = windowManager().realParentWindow(pParent ? pParent : windowManager().mainWindowShown());
-        pPopupPane = new UIPopupPane(pPopupBoxParent, strId,
-                                     strMessage, strDetails,
-                                     iButton1, iButton2, iButton3,
-                                     strButtonText1, strButtonText2, strButtonText3);
+        pPopupPane = new UIPopupPane(pPopupBoxParent, strId, strMessage, strDetails, buttonDescriptions);
         m_popups.insert(strId, pPopupPane);
         /* Attach popup-pane connections: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPane.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPane.cpp	(revision 45596)
+++ trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPane.cpp	(revision 45605)
@@ -19,8 +19,10 @@
 
 /* Qt includes: */
+#include <QHBoxLayout>
 #include <QVBoxLayout>
 #include <QLabel>
 #include <QPushButton>
 #include <QEvent>
+#include <QKeyEvent>
 #include <QMainWindow>
 #include <QStatusBar>
@@ -32,5 +34,6 @@
 /* GUI includes: */
 #include "UIPopupPane.h"
-#include "QIDialogButtonBox.h"
+#include "UIIconPool.h"
+#include "QIToolButton.h"
 
 /* Other VBox includes: */
@@ -129,15 +132,13 @@
 public:
 
-    /* Constructor/destructor: */
+    /* Constructor: */
     UIPopupPaneFrame(QWidget *pParent = 0);
-    ~UIPopupPaneFrame();
 
 private:
 
-    /* Helpers: Prepare/cleanup stuff: */
+    /* Helper: Prepare stuff: */
     void prepare();
-    void cleanup();
-
-    /* Handlers: Event stuff: */
+
+    /* Handler: Event stuff: */
     void paintEvent(QPaintEvent *pEvent);
 
@@ -170,7 +171,6 @@
 public:
 
-    /* Constructor/destructor: */
+    /* Constructor: */
     UIPopupPaneTextPane(QWidget *pParent = 0);
-    ~UIPopupPaneTextPane();
 
     /* API: Text stuff: */
@@ -192,9 +192,6 @@
 private:
 
-    /* Helpers: Prepare/cleanup stuff: */
+    /* Helperss: Prepare stuff: */
     void prepare();
-    void cleanup();
-
-    /* Helper: Content stuff: */
     void prepareContent();
 
@@ -219,8 +216,55 @@
 
 
+/* Popup-pane button-pane prototype class: */
+class UIPopupPaneButtonPane : public QWidget
+{
+    Q_OBJECT;
+
+signals:
+
+    /* Notifier: Button stuff: */
+    void sigButtonClicked(int iButtonID);
+
+public:
+
+    /* Constructor: */
+    UIPopupPaneButtonPane(QWidget *pParent = 0);
+
+    /* API: Button stuff: */
+    void setButtons(const QMap<int, QString> &buttonDescriptions);
+
+private slots:
+
+    /* Handler: Button stuff: */
+    void sltButtonClicked();
+
+private:
+
+    /* Helpers: Prepare/cleanup stuff: */
+    void prepare();
+    void prepareLayouts();
+    void prepareButtons();
+    void cleanupButtons();
+
+    /* Handler: Event stuff: */
+    void keyPressEvent(QKeyEvent *pEvent);
+
+    /* Static helpers: Button stuff: */
+    static QIToolButton* addButton(int iButtonID, const QString &strToolTip);
+    static QString defaultToolTip(int iButtonID);
+    static QIcon defaultIcon(int iButtonID);
+
+    /* Widgets: */
+    QHBoxLayout *m_pButtonLayout;
+    QMap<int, QString> m_buttonDescriptions;
+    QMap<int, QIToolButton*> m_buttons;
+    int m_iDefaultButton;
+    int m_iEscapeButton;
+};
+
+
 UIPopupPane::UIPopupPane(QWidget *pParent, const QString &strId,
                          const QString &strMessage, const QString &strDetails,
-                         int iButton1, int iButton2, int iButton3,
-                         const QString &strButtonText1, const QString &strButtonText2, const QString &strButtonText3)
+                         const QMap<int, QString> &buttonDescriptions)
     : QWidget(pParent)
     , m_fPolished(false)
@@ -228,21 +272,10 @@
     , m_iMainLayoutMargin(2), m_iMainFrameLayoutMargin(10), m_iMainFrameLayoutSpacing(5)
     , m_iParentStatusBarHeight(parentStatusBarHeight(pParent))
-    , m_strMessage(strMessage), m_strDetails(strDetails)
-    , m_iButton1(iButton1), m_iButton2(iButton2), m_iButton3(iButton3)
-    , m_strButtonText1(strButtonText1), m_strButtonText2(strButtonText2), m_strButtonText3(strButtonText3)
-    , m_iButtonEsc(0)
-    , m_fHovered(false)
-    , m_fFocused(false)
-    , m_pMainFrame(0), m_pTextPane(0), m_pButtonBox(0)
-    , m_pButton1(0), m_pButton2(0), m_pButton3(0)
+    , m_strMessage(strMessage), m_strDetails(strDetails), m_buttonDescriptions(buttonDescriptions)
+    , m_fHovered(false) , m_fFocused(false)
+    , m_pMainFrame(0), m_pTextPane(0), m_pButtonPane(0)
 {
     /* Prepare: */
     prepare();
-}
-
-UIPopupPane::~UIPopupPane()
-{
-    /* Cleanup: */
-    cleanup();
 }
 
@@ -266,4 +299,9 @@
     /* Fetch new details: */
     m_strDetails = strDetails;
+}
+
+void UIPopupPane::sltButtonClicked(int iButtonID)
+{
+    done(iButtonID & AlertButtonMask);
 }
 
@@ -295,6 +333,37 @@
 }
 
-void UIPopupPane::cleanup()
-{
+void UIPopupPane::prepareContent()
+{
+    /* Prepare this: */
+    installEventFilter(this);
+    /* Create main-frame: */
+    m_pMainFrame = new UIPopupPaneFrame(this);
+    {
+        /* Prepare frame: */
+        m_pMainFrame->installEventFilter(this);
+        m_pMainFrame->setFocusPolicy(Qt::StrongFocus);
+        /* Create message-label: */
+        m_pTextPane = new UIPopupPaneTextPane(m_pMainFrame);
+        {
+            /* Prepare label: */
+            connect(m_pTextPane, SIGNAL(sigSizeChanged()),
+                    this, SLOT(sltAdjustGeomerty()));
+            m_pTextPane->installEventFilter(this);
+            m_pTextPane->setFocusPolicy(Qt::StrongFocus);
+            m_pTextPane->setText(m_strMessage);
+        }
+        /* Create button-box: */
+        m_pButtonPane = new UIPopupPaneButtonPane(m_pMainFrame);
+        {
+            /* Prepare button-box: */
+            connect(m_pButtonPane, SIGNAL(sigButtonClicked(int)),
+                    this, SLOT(sltButtonClicked(int)));
+            m_pButtonPane->installEventFilter(this);
+            m_pButtonPane->setButtons(m_buttonDescriptions);
+            m_pButtonPane->setFocusPolicy(Qt::StrongFocus);
+            m_pMainFrame->setFocusProxy(m_pButtonPane);
+            m_pTextPane->setFocusProxy(m_pButtonPane);
+        }
+    }
 }
 
@@ -349,7 +418,5 @@
             case QEvent::FocusOut:
             {
-                if (m_fFocused && (pWatched == m_pButton1 ||
-                                   pWatched == m_pButton2 ||
-                                   pWatched == m_pButton3))
+                if (m_fFocused)
                 {
                     m_fFocused = false;
@@ -385,16 +452,4 @@
 }
 
-void UIPopupPane::keyPressEvent(QKeyEvent *pEvent)
-{
-    /* Preprocess Escape key: */
-    if (pEvent->key() == Qt::Key_Escape && m_iButtonEsc)
-    {
-        done(m_iButtonEsc);
-        return;
-    }
-    /* Handle all the other keys: */
-    QWidget::keyPressEvent(pEvent);
-}
-
 int UIPopupPane::minimumWidthHint() const
 {
@@ -411,5 +466,5 @@
             iMinimumWidthHint += m_pTextPane->width();
             iMinimumWidthHint += m_iMainFrameLayoutSpacing;
-            iMinimumWidthHint += m_pButtonBox->minimumSizeHint().width();
+            iMinimumWidthHint += m_pButtonPane->minimumSizeHint().width();
         }
     }
@@ -432,5 +487,5 @@
             /* Take into account widgets: */
             const int iTextPaneHeight = m_pTextPane->height();
-            const int iButtonBoxHeight = m_pButtonBox->minimumSizeHint().height();
+            const int iButtonBoxHeight = m_pButtonPane->minimumSizeHint().height();
             iMinimumHeightHint += qMax(iTextPaneHeight, iButtonBoxHeight);
         }
@@ -456,5 +511,5 @@
         m_pTextPane->setDesiredWidth(iWidth - 2 * m_iMainLayoutMargin
                                             - 2 * m_iMainFrameLayoutMargin
-                                            - m_pButtonBox->minimumSizeHint().width());
+                                            - m_pButtonPane->minimumSizeHint().width());
     }
 
@@ -481,5 +536,5 @@
             const int iTextPaneWidth = m_pTextPane->width();
             const int iTextPaneHeight = m_pTextPane->height();
-            const QSize buttonBoxMinimumSizeHint = m_pButtonBox->minimumSizeHint();
+            const QSize buttonBoxMinimumSizeHint = m_pButtonPane->minimumSizeHint();
             const int iButtonBoxWidth = buttonBoxMinimumSizeHint.width();
             const int iButtonBoxHeight = buttonBoxMinimumSizeHint.height();
@@ -493,95 +548,9 @@
             m_pTextPane->resize(iTextPaneWidth, iTextPaneHeight);
             /* Button-box: */
-            m_pButtonBox->move(m_iMainFrameLayoutMargin + iTextPaneWidth + m_iMainFrameLayoutSpacing,
-                               m_iMainFrameLayoutMargin);
-            m_pButtonBox->resize(iButtonBoxWidth,
-                                 iMainFrameHeight - 2 * m_iMainFrameLayoutMargin);
+            m_pButtonPane->move(m_iMainFrameLayoutMargin + iTextPaneWidth + m_iMainFrameLayoutSpacing,
+                                m_iMainFrameLayoutMargin);
+            m_pButtonPane->resize(iButtonBoxWidth,
+                                  iMainFrameHeight - 2 * m_iMainFrameLayoutMargin);
         }
-    }
-}
-
-void UIPopupPane::prepareContent()
-{
-    /* Prepare this: */
-    installEventFilter(this);
-    /* Create main-frame: */
-    m_pMainFrame = new UIPopupPaneFrame(this);
-    {
-        /* Prepare frame: */
-        m_pMainFrame->installEventFilter(this);
-        m_pMainFrame->setFocusPolicy(Qt::StrongFocus);
-        /* Create message-label: */
-        m_pTextPane = new UIPopupPaneTextPane(m_pMainFrame);
-        {
-            /* Prepare label: */
-            connect(m_pTextPane, SIGNAL(sigSizeChanged()),
-                    this, SLOT(sltAdjustGeomerty()));
-            m_pTextPane->installEventFilter(this);
-            m_pTextPane->setFocusPolicy(Qt::StrongFocus);
-            m_pTextPane->setText(m_strMessage);
-        }
-        /* Create button-box: */
-        m_pButtonBox = new QIDialogButtonBox(m_pMainFrame);
-        {
-            /* Prepare button-box: */
-            m_pButtonBox->installEventFilter(this);
-            m_pButtonBox->setOrientation(Qt::Vertical);
-            prepareButtons();
-        }
-    }
-}
-
-void UIPopupPane::prepareButtons()
-{
-    /* Prepare descriptions: */
-    QList<int> descriptions;
-    descriptions << m_iButton1 << m_iButton2 << m_iButton3;
-
-    /* Choose 'escape' button: */
-    foreach (int iButton, descriptions)
-        if (iButton & AlertButtonOption_Escape)
-        {
-            m_iButtonEsc = iButton & AlertButtonMask;
-            break;
-        }
-
-    /* Create buttons: */
-    QList<QPushButton*> buttons = createButtons(m_pButtonBox, descriptions);
-
-    /* Install focus-proxy into the 'default' button: */
-    foreach (QPushButton *pButton, buttons)
-        if (pButton && pButton->isDefault())
-        {
-            m_pMainFrame->setFocusProxy(pButton);
-            m_pTextPane->setFocusProxy(pButton);
-            break;
-        }
-
-    /* Prepare button 1: */
-    m_pButton1 = buttons[0];
-    if (m_pButton1)
-    {
-        m_pButton1->installEventFilter(this);
-        connect(m_pButton1, SIGNAL(clicked()), SLOT(done1()));
-        if (!m_strButtonText1.isEmpty())
-            m_pButton1->setText(m_strButtonText1);
-    }
-    /* Prepare button 2: */
-    m_pButton2 = buttons[1];
-    if (m_pButton2)
-    {
-        m_pButton2->installEventFilter(this);
-        connect(m_pButton2, SIGNAL(clicked()), SLOT(done2()));
-        if (!m_strButtonText2.isEmpty())
-            m_pButton1->setText(m_strButtonText2);
-    }
-    /* Prepare button 3: */
-    m_pButton3 = buttons[2];
-    if (m_pButton3)
-    {
-        m_pButton3->installEventFilter(this);
-        connect(m_pButton3, SIGNAL(clicked()), SLOT(done3()));
-        if (!m_strButtonText3.isEmpty())
-            m_pButton1->setText(m_strButtonText3);
     }
 }
@@ -607,48 +576,4 @@
 }
 
-/* static */
-QList<QPushButton*> UIPopupPane::createButtons(QIDialogButtonBox *pButtonBox, const QList<int> descriptions)
-{
-    /* Create button according descriptions: */
-    QList<QPushButton*> buttons;
-    foreach (int iButton, descriptions)
-        buttons << createButton(pButtonBox, iButton);
-    /* Return buttons: */
-    return buttons;
-}
-
-/* static */
-QPushButton* UIPopupPane::createButton(QIDialogButtonBox *pButtonBox, int iButton)
-{
-    /* Null for AlertButton_NoButton: */
-    if (iButton == 0)
-        return 0;
-
-    /* Prepare button text & role: */
-    QString strText;
-    QDialogButtonBox::ButtonRole role;
-    switch (iButton & AlertButtonMask)
-    {
-        case AlertButton_Ok:      strText = QIMessageBox::tr("OK");     role = QDialogButtonBox::AcceptRole; break;
-        case AlertButton_Cancel:  strText = QIMessageBox::tr("Cancel"); role = QDialogButtonBox::RejectRole; break;
-        case AlertButton_Choice1: strText = QIMessageBox::tr("Yes");    role = QDialogButtonBox::YesRole; break;
-        case AlertButton_Choice2: strText = QIMessageBox::tr("No");     role = QDialogButtonBox::NoRole; break;
-        default: return 0;
-    }
-
-    /* Create push-button: */
-    QPushButton *pButton = pButtonBox->addButton(strText, role);
-
-    /* Configure button: */
-    pButton->setFocusPolicy(Qt::StrongFocus);
-
-    /* Configure 'default' button: */
-    if (iButton & AlertButtonOption_Default)
-        pButton->setDefault(true);
-
-    /* Return button: */
-    return pButton;
-}
-
 
 UIPopupPaneFrame::UIPopupPaneFrame(QWidget *pParent /*= 0*/)
@@ -661,10 +586,4 @@
     /* Prepare: */
     prepare();
-}
-
-UIPopupPaneFrame::~UIPopupPaneFrame()
-{
-    /* Cleanup: */
-    cleanup();
 }
 
@@ -680,8 +599,4 @@
                                                    m_iDefaultOpacity, m_iHoveredOpacity, m_iHoverAnimationDuration,
                                                    SIGNAL(sigHoverEnter()), SIGNAL(sigHoverLeave()));
-}
-
-void UIPopupPaneFrame::cleanup()
-{
 }
 
@@ -732,10 +647,4 @@
 }
 
-UIPopupPaneTextPane::~UIPopupPaneTextPane()
-{
-    /* Cleanup: */
-    cleanup();
-}
-
 void UIPopupPaneTextPane::setText(const QString &strText)
 {
@@ -803,8 +712,4 @@
     /* Prepare content: */
     prepareContent();
-}
-
-void UIPopupPaneTextPane::cleanup()
-{
 }
 
@@ -854,4 +759,172 @@
 }
 
+
+UIPopupPaneButtonPane::UIPopupPaneButtonPane(QWidget *pParent /*= 0*/)
+    : QWidget(pParent)
+    , m_iDefaultButton(0)
+    , m_iEscapeButton(0)
+{
+    /* Prepare: */
+    prepare();
+}
+
+void UIPopupPaneButtonPane::setButtons(const QMap<int, QString> &buttonDescriptions)
+{
+    /* Make sure something changed: */
+    if (m_buttonDescriptions == buttonDescriptions)
+        return;
+
+    /* Assign new button-descriptions: */
+    m_buttonDescriptions = buttonDescriptions;
+    /* Recreate buttons: */
+    cleanupButtons();
+    prepareButtons();
+}
+
+void UIPopupPaneButtonPane::sltButtonClicked()
+{
+    /* Make sure the slot is called by the button: */
+    QIToolButton *pButton = qobject_cast<QIToolButton*>(sender());
+    if (!pButton)
+        return;
+
+    /* Make sure we still have that button: */
+    int iButtonID = m_buttons.key(pButton, 0);
+    if (!iButtonID)
+        return;
+
+    /* Notify listeners button was clicked: */
+    emit sigButtonClicked(iButtonID);
+}
+
+void UIPopupPaneButtonPane::prepare()
+{
+    /* Prepare layouts: */
+    prepareLayouts();
+}
+
+void UIPopupPaneButtonPane::prepareLayouts()
+{
+    /* Create layouts: */
+    m_pButtonLayout = new QHBoxLayout;
+    m_pButtonLayout->setContentsMargins(0, 0, 0, 0);
+    m_pButtonLayout->setSpacing(0);
+    QVBoxLayout *pMainLayout = new QVBoxLayout(this);
+    pMainLayout->setContentsMargins(0, 0, 0, 0);
+    pMainLayout->setSpacing(0);
+    pMainLayout->addLayout(m_pButtonLayout);
+    pMainLayout->addStretch();
+}
+
+void UIPopupPaneButtonPane::prepareButtons()
+{
+    /* Add all the buttons: */
+    const QList<int> &buttonsIDs = m_buttonDescriptions.keys();
+    foreach (int iButtonID, buttonsIDs)
+        if (QIToolButton *pButton = addButton(iButtonID, m_buttonDescriptions[iButtonID]))
+        {
+            m_pButtonLayout->addWidget(pButton);
+            m_buttons[iButtonID] = pButton;
+            connect(pButton, SIGNAL(clicked(bool)), this, SLOT(sltButtonClicked()));
+            if (pButton->property("default").toBool())
+                m_iDefaultButton = iButtonID;
+            if (pButton->property("escape").toBool())
+                m_iEscapeButton = iButtonID;
+        }
+}
+
+void UIPopupPaneButtonPane::cleanupButtons()
+{
+    /* Remove all the buttons: */
+    const QList<int> &buttonsIDs = m_buttons.keys();
+    foreach (int iButtonID, buttonsIDs)
+    {
+        delete m_buttons[iButtonID];
+        m_buttons.remove(iButtonID);
+    }
+}
+
+void UIPopupPaneButtonPane::keyPressEvent(QKeyEvent *pEvent)
+{
+    /* Depending on pressed key: */
+    switch (pEvent->key())
+    {
+        case Qt::Key_Enter:
+        case Qt::Key_Return:
+        {
+            if (m_iDefaultButton)
+            {
+                pEvent->accept();
+                emit sigButtonClicked(m_iDefaultButton);
+                return;
+            }
+            break;
+        }
+        case Qt::Key_Escape:
+        {
+            if (m_iEscapeButton)
+            {
+                pEvent->accept();
+                emit sigButtonClicked(m_iEscapeButton);
+                return;
+            }
+            break;
+        }
+        default:
+            break;
+    }
+    /* Call to base-class: */
+    QWidget::keyPressEvent(pEvent);
+}
+
+/* static */
+QIToolButton* UIPopupPaneButtonPane::addButton(int iButtonID, const QString &strToolTip)
+{
+    /* Create button: */
+    QIToolButton *pButton = new QIToolButton;
+    pButton->setToolTip(strToolTip.isEmpty() ? defaultToolTip(iButtonID) : strToolTip);
+    pButton->setIcon(defaultIcon(iButtonID));
+
+    /* Sign the 'default' button: */
+    if (iButtonID & AlertButtonOption_Default)
+        pButton->setProperty("default", true);
+    /* Sign the 'escape' button: */
+    if (iButtonID & AlertButtonOption_Escape)
+        pButton->setProperty("escape", true);
+
+    /* Return button: */
+    return pButton;
+}
+
+/* static */
+QString UIPopupPaneButtonPane::defaultToolTip(int iButtonID)
+{
+    QString strToolTip;
+    switch (iButtonID & AlertButtonMask)
+    {
+        case AlertButton_Ok:      strToolTip = QIMessageBox::tr("OK");     break;
+        case AlertButton_Cancel:  strToolTip = QIMessageBox::tr("Cancel"); break;
+        case AlertButton_Choice1: strToolTip = QIMessageBox::tr("Yes");    break;
+        case AlertButton_Choice2: strToolTip = QIMessageBox::tr("No");     break;
+        default:                  strToolTip = QString();                  break;
+    }
+    return strToolTip;
+}
+
+/* static */
+QIcon UIPopupPaneButtonPane::defaultIcon(int iButtonID)
+{
+    QIcon icon;
+    switch (iButtonID & AlertButtonMask)
+    {
+        case AlertButton_Ok:      icon = UIIconPool::iconSet(":/ok_16px.png");     break;
+        case AlertButton_Cancel:  icon = UIIconPool::iconSet(":/cancel_16px.png"); break;
+        case AlertButton_Choice1: break;
+        case AlertButton_Choice2: break;
+        default:                  break;
+    }
+    return icon;
+}
+
 #include "UIPopupPane.moc"
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPane.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPane.h	(revision 45596)
+++ trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPopupPane.h	(revision 45605)
@@ -22,4 +22,5 @@
 /* Qt includes: */
 #include <QWidget>
+#include <QMap>
 
 /* GUI includes: */
@@ -30,8 +31,8 @@
 class QLabel;
 class QPushButton;
-class QIDialogButtonBox;
 class UIPopupPane;
 class UIPopupPaneFrame;
 class UIPopupPaneTextPane;
+class UIPopupPaneButtonPane;
 
 /* UIAnimationFramework namespace: */
@@ -68,10 +69,8 @@
 public:
 
-    /* Constructor/destructor: */
+    /* Constructor: */
     UIPopupPane(QWidget *pParent, const QString &strId,
                 const QString &strMessage, const QString &strDetails,
-                int iButton1, int iButton2, int iButton3,
-                const QString &strButtonText1, const QString &strButtonText2, const QString &strButtonText3);
-    ~UIPopupPane();
+                const QMap<int, QString> &buttonDescriptions);
 
     /* API: Id stuff: */
@@ -84,8 +83,6 @@
 private slots:
 
-    /* Handlers: Done slot variants for every button: */
-    void done1() { done(m_iButton1 & AlertButtonMask); }
-    void done2() { done(m_iButton2 & AlertButtonMask); }
-    void done3() { done(m_iButton3 & AlertButtonMask); }
+    /* Handler: Button stuff: */
+    void sltButtonClicked(int iButtonID);
 
     /* Handler: Layout stuff: */
@@ -94,7 +91,7 @@
 private:
 
-    /* Helpers: Prepare/cleanup stuff: */
+    /* Helpers: Prepare stuff: */
     void prepare();
-    void cleanup();
+    void prepareContent();
 
     /* Handler: Event-filter stuff: */
@@ -104,5 +101,4 @@
     virtual void showEvent(QShowEvent *pEvent);
     virtual void polishEvent(QShowEvent *pEvent);
-    virtual void keyPressEvent(QKeyEvent *pEvent);
 
     /* Helper: Layout stuff: */
@@ -113,8 +109,4 @@
     void updateLayout();
 
-    /* Helpers: Prepare stuff: */
-    void prepareContent();
-    void prepareButtons();
-
     /* Helper: Complete stuff: */
     void done(int iButtonCode);
@@ -122,6 +114,4 @@
     /* Static helpers: Prepare stuff: */
     static int parentStatusBarHeight(QWidget *pParent);
-    static QList<QPushButton*> createButtons(QIDialogButtonBox *pButtonBox, const QList<int> description);
-    static QPushButton* createButton(QIDialogButtonBox *pButtonBox, int iButton);
 
     /* Variables: */
@@ -139,7 +129,5 @@
 
     /* Variables: Button stuff: */
-    int m_iButton1, m_iButton2, m_iButton3;
-    QString m_strButtonText1, m_strButtonText2, m_strButtonText3;
-    int m_iButtonEsc;
+    QMap<int, QString> m_buttonDescriptions;
 
     /* Variables: Animation stuff: */
@@ -150,6 +138,5 @@
     UIPopupPaneFrame *m_pMainFrame;
     UIPopupPaneTextPane *m_pTextPane;
-    QIDialogButtonBox *m_pButtonBox;
-    QPushButton *m_pButton1, *m_pButton2, *m_pButton3;
+    UIPopupPaneButtonPane *m_pButtonPane;
 };
 
