Index: trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp	(revision 56937)
+++ trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp	(revision 56953)
@@ -537,4 +537,11 @@
              .arg(strKey, CMachine(machine).GetName(), strValue),
           formatErrorInfo(machine));
+}
+
+void UIMessageCenter::warnAboutInvalidEncryptionPassword(const QString &strPasswordId, QWidget *pParent /* = 0 */)
+{
+    alert(pParent, MessageType_Error,
+          tr("Encryption password for <nobr>ID = '%1'</nobr> is invalid.")
+             .arg(strPasswordId));
 }
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h	(revision 56937)
+++ trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h	(revision 56953)
@@ -174,4 +174,5 @@
     void cannotSetExtraData(const CVirtualBox &vbox, const QString &strKey, const QString &strValue);
     void cannotSetExtraData(const CMachine &machine, const QString &strKey, const QString &strValue);
+    void warnAboutInvalidEncryptionPassword(const QString &strPasswordId, QWidget *pParent = 0);
 
     /* API: Selector warnings: */
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIAddDiskEncryptionPasswordDialog.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIAddDiskEncryptionPasswordDialog.cpp	(revision 56937)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIAddDiskEncryptionPasswordDialog.cpp	(revision 56953)
@@ -35,4 +35,5 @@
 # include "UIIconPool.h"
 # include "VBoxGlobal.h"
+# include "UIMessageCenter.h"
 # include "QIDialogButtonBox.h"
 # include "QIWithRetranslateUI.h"
@@ -48,5 +49,4 @@
 enum UIEncryptionDataTableSection
 {
-    UIEncryptionDataTableSection_Status,
     UIEncryptionDataTableSection_Id,
     UIEncryptionDataTableSection_Password,
@@ -79,6 +79,6 @@
 private slots:
 
-    /** Handles @s strPassword changes. */
-    void sltPasswordChanged(const QString &strPassword);
+    /** Commits data to the listeners. */
+    void sltCommitData() { emit sigCommitData(this); }
 
 private:
@@ -112,7 +112,4 @@
     EncryptionPasswordMap encryptionPasswords() const { return m_encryptionPasswords; }
 
-    /** Returns whether the model is valid. */
-    bool isValid() const;
-
     /** Returns the row count, taking optional @a parent instead of root if necessary. */
     virtual int rowCount(const QModelIndex &parent = QModelIndex()) const;
@@ -136,7 +133,4 @@
     void prepare();
 
-    /** Returns whether passed @a strPassword is valid for medium with passed @a strMediumId. */
-    bool isPasswordValid(const QString strMediumId, const QString strPassword);
-
     /** Holds the encrypted medium map reference. */
     const EncryptedMediumMap &m_encryptedMediums;
@@ -144,6 +138,4 @@
     /** Holds the encryption password map instance. */
     EncryptionPasswordMap m_encryptionPasswords;
-    /** Holds the encryption password status map instance. */
-    EncryptionPasswordStatusMap m_encryptionPasswordStatus;
 };
 
@@ -157,7 +149,4 @@
 signals:
 
-    /** Notifies listeners about data change. */
-    void sigDataChanged();
-
     /** Notifies listeners about editor's Enter/Return key triggering. */
     void sigEditorEnterKeyTriggered();
@@ -173,7 +162,4 @@
     EncryptionPasswordMap encryptionPasswords() const;
 
-    /** Returns whether the table is valid. */
-    bool isValid() const;
-
     /** Initiates the editor for the first index available. */
     void editFirstIndex();
@@ -196,11 +182,4 @@
     /* Prepare: */
     prepare();
-}
-
-void UIPasswordEditor::sltPasswordChanged(const QString &strPassword)
-{
-    Q_UNUSED(strPassword);
-    /* Commit data to the listener: */
-    emit sigCommitData(this);
 }
 
@@ -211,5 +190,5 @@
     /* Listen for the text changes: */
     connect(this, SIGNAL(textChanged(const QString&)),
-            this, SLOT(sltPasswordChanged(const QString&)));
+            this, SLOT(sltCommitData()));
 }
 
@@ -237,14 +216,4 @@
     /* Prepare: */
     prepare();
-}
-
-bool UIEncryptionDataModel::isValid() const
-{
-    /* Check whether the model contains invalid passwords: */
-    foreach (const bool &fValue, m_encryptionPasswordStatus.values())
-        if (!fValue)
-            return false;
-    /* Valid by default: */
-    return true;
 }
 
@@ -269,5 +238,4 @@
     switch (index.column())
     {
-        case UIEncryptionDataTableSection_Status:   return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
         case UIEncryptionDataTableSection_Id:       return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
         case UIEncryptionDataTableSection_Password: return Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsEditable;
@@ -286,5 +254,4 @@
     switch (iSection)
     {
-        case UIEncryptionDataTableSection_Status:   return UIAddDiskEncryptionPasswordDialog::tr("Status", "password table field");
         case UIEncryptionDataTableSection_Id:       return UIAddDiskEncryptionPasswordDialog::tr("ID", "password table field");
         case UIEncryptionDataTableSection_Password: return UIAddDiskEncryptionPasswordDialog::tr("Password", "password table field");
@@ -297,5 +264,5 @@
 QVariant UIEncryptionDataModel::data(const QModelIndex &index, int iRole /* = Qt::DisplayRole */) const
 {
-    /* Check index validness: */
+    /* Check argument validness: */
     if (!index.isValid())
         return QVariant();
@@ -303,17 +270,4 @@
     switch (iRole)
     {
-        case Qt::DecorationRole:
-        {
-            /* Depending on column index: */
-            switch (index.column())
-            {
-                case UIEncryptionDataTableSection_Status:
-                    return m_encryptionPasswordStatus.value(m_encryptionPasswordStatus.keys().at(index.row())) ?
-                           UIIconPool::iconSet(":/status_check_16px.png") : UIIconPool::iconSet(":/status_error_16px.png");
-                default:
-                    return QVariant();
-            }
-            break;
-        }
         case Qt::DisplayRole:
         {
@@ -365,9 +319,6 @@
 bool UIEncryptionDataModel::setData(const QModelIndex &index, const QVariant &value, int iRole /* = Qt::EditRole */)
 {
-    /* Check index validness: */
-    if (!index.isValid())
-        return false;
     /* Check argument validness: */
-    if (iRole != Qt::EditRole)
+    if (!index.isValid() || iRole != Qt::EditRole)
         return false;
     /* Depending on column index: */
@@ -381,11 +332,4 @@
             const QString strKey = m_encryptionPasswords.keys().at(iRow);
             m_encryptionPasswords[strKey] = strPassword;
-            /* Update password status: */
-            const QString strMediumId = m_encryptedMediums.values(strKey).first();
-            const bool fPasswordStatus = isPasswordValid(strMediumId, strPassword);
-            m_encryptionPasswordStatus[strKey] = fPasswordStatus;
-            /* Initiate explicit password status update: */
-            const QModelIndex statusIndex = createIndex(iRow, UIEncryptionDataTableSection_Status);
-            emit dataChanged(statusIndex, statusIndex);
             break;
         }
@@ -399,29 +343,7 @@
 void UIEncryptionDataModel::prepare()
 {
-    /* Populate the map of passwords and statuses. */
+    /* Populate the map of passwords and statuses: */
     foreach (const QString &strPasswordId, m_encryptedMediums.keys())
-    {
         m_encryptionPasswords.insert(strPasswordId, QString());
-        m_encryptionPasswordStatus.insert(strPasswordId, false);
-    }
-}
-
-bool UIEncryptionDataModel::isPasswordValid(const QString strMediumId, const QString strPassword)
-{
-    /* Look for the medium with passed ID: */
-    const UIMedium uimedium = vboxGlobal().medium(strMediumId);
-    if (!uimedium.isNull())
-    {
-        /* Check wrapped medium for validity: */
-        const CMedium medium = uimedium.medium();
-        if (!medium.isNull())
-        {
-            /* Check whether the password is suitable for that medium. */
-            medium.CheckEncryptionPassword(strPassword);
-            return medium.isOk();
-        }
-    }
-    /* False by default: */
-    return false;
 }
 
@@ -438,10 +360,4 @@
     AssertPtrReturn(m_pModelEncryptionData, EncryptionPasswordMap());
     return m_pModelEncryptionData->encryptionPasswords();
-}
-
-bool UIEncryptionDataTable::isValid() const
-{
-    AssertPtrReturn(m_pModelEncryptionData, false);
-    return m_pModelEncryptionData->isValid();
 }
 
@@ -467,7 +383,4 @@
         /* Assign configured model to table: */
         setModel(m_pModelEncryptionData);
-        /* Configure encryption-data model: */
-        connect(m_pModelEncryptionData, SIGNAL(dataChanged(const QModelIndex&, const QModelIndex&)),
-                this, SIGNAL(sigDataChanged()));
     }
 
@@ -510,5 +423,4 @@
     verticalHeader()->setDefaultSectionSize((int)(verticalHeader()->minimumSectionSize() * 1.33));
     horizontalHeader()->setStretchLastSection(false);
-    horizontalHeader()->setResizeMode(UIEncryptionDataTableSection_Status, QHeaderView::ResizeToContents);
     horizontalHeader()->setResizeMode(UIEncryptionDataTableSection_Id, QHeaderView::Interactive);
     horizontalHeader()->setResizeMode(UIEncryptionDataTableSection_Password, QHeaderView::Stretch);
@@ -529,6 +441,4 @@
     /* Translate: */
     retranslateUi();
-    /* Validate: */
-    revalidate();
 }
 
@@ -539,8 +449,16 @@
 }
 
-void UIAddDiskEncryptionPasswordDialog::sltEditorEnterKeyTriggered()
-{
-    if (m_pButtonBox->button(QDialogButtonBox::Ok)->isEnabled())
-        accept();
+void UIAddDiskEncryptionPasswordDialog::accept()
+{
+    /* Validate passwords status: */
+    foreach (const QString &strPasswordId, m_encryptedMediums.uniqueKeys())
+    {
+        const QString strMediumId = m_encryptedMediums.values(strPasswordId).first();
+        const QString strPassword = m_pTableEncryptionData->encryptionPasswords().value(strPasswordId);
+        if (!isPasswordValid(strMediumId, strPassword))
+            return msgCenter().warnAboutInvalidEncryptionPassword(strPasswordId, this);
+    }
+    /* Call to base-class: */
+    QIWithRetranslateUI<QDialog>::accept();
 }
 
@@ -570,6 +488,4 @@
             {
                 /* Configure encryption-data table: */
-                connect(m_pTableEncryptionData, SIGNAL(sigDataChanged()),
-                        this, SLOT(sltDataChanged()));
                 connect(m_pTableEncryptionData, SIGNAL(sigEditorEnterKeyTriggered()),
                         this, SLOT(sltEditorEnterKeyTriggered()));
@@ -613,9 +529,22 @@
 }
 
-void UIAddDiskEncryptionPasswordDialog::revalidate()
-{
-    /* Validate: */
-    AssertPtrReturnVoid(m_pButtonBox);
-    m_pButtonBox->button(QDialogButtonBox::Ok)->setEnabled(m_pTableEncryptionData->isValid());
+/* static */
+bool UIAddDiskEncryptionPasswordDialog::isPasswordValid(const QString strMediumId, const QString strPassword)
+{
+    /* Look for the medium with passed ID: */
+    const UIMedium uimedium = vboxGlobal().medium(strMediumId);
+    if (!uimedium.isNull())
+    {
+        /* Check wrapped medium for validity: */
+        const CMedium medium = uimedium.medium();
+        if (!medium.isNull())
+        {
+            /* Check whether the password is suitable for that medium: */
+            medium.CheckEncryptionPassword(strPassword);
+            return medium.isOk();
+        }
+    }
+    /* False by default: */
+    return false;
 }
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIAddDiskEncryptionPasswordDialog.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIAddDiskEncryptionPasswordDialog.h	(revision 56937)
+++ trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIAddDiskEncryptionPasswordDialog.h	(revision 56953)
@@ -57,9 +57,11 @@
 private slots:
 
-    /** Handles the data change. */
-    void sltDataChanged() { revalidate(); }
+    /** Handles editor's Enter/Return key triggering. */
+    void sltEditorEnterKeyTriggered() { accept(); }
 
-    /** Handles editor's Enter/Return key triggering. */
-    void sltEditorEnterKeyTriggered();
+    /** Performs passwords validation.
+      * If all passwords are valid,
+      * this slot calls to base-class. */
+    void accept();
 
 private:
@@ -71,6 +73,6 @@
     void retranslateUi();
 
-    /** Validation routine. */
-    void revalidate();
+    /** Returns whether passed @a strPassword is valid for medium with passed @a strMediumId. */
+    static bool isPasswordValid(const QString strMediumId, const QString strPassword);
 
     /** Holds the name of the machine we show this dialog for. */
