Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp	(revision 66655)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineWindow.cpp	(revision 66656)
@@ -188,7 +188,7 @@
 
     /* Set redefined machine-window icon if any: */
-    const QIcon *pMachineWindowIcon = uisession()->machineWindowIcon();
-    if (pMachineWindowIcon)
-        setWindowIcon(*pMachineWindowIcon);
+    QIcon *pMachineWidnowIcon = uisession()->machineWindowIcon();
+    if (pMachineWidnowIcon)
+        setWindowIcon(*pMachineWidnowIcon);
     /* Or set default machine-window icon: */
     else
@@ -346,10 +346,4 @@
                                                                   console().GetGuestEnteredACPIMode(),
                                                                   restrictedCloseActions);
-#ifndef VBOX_WS_MAC
-        /* Configure close-dialog: */
-        const QIcon *pMachineWindowIcon = uisession()->machineWindowIcon();
-        if (pMachineWindowIcon)
-            pCloseDlg->setPixmap(pMachineWindowIcon->pixmap(QSize(32, 32)));
-#endif /* !VBOX_WS_MAC */
 
         /* Make sure close-dialog is valid: */
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp	(revision 66655)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp	(revision 66656)
@@ -1290,34 +1290,11 @@
 
 #ifndef VBOX_WS_MAC
-        /* Check whether we have overriding machine-window icon: */
-        {
-            /* Prepare null icon: */
-            QIcon icon;
-
-            /* 1. Load icon from IMachine extra-data: */
-            if (icon.isNull())
-                foreach (const QString &strIconName, gEDataManager->machineWindowIconNames(strMachineID))
-                    if (!strIconName.isEmpty() && QFile::exists(strIconName))
-                        icon.addFile(strIconName);
-
-            /* 2. Load icon from IMachine interface: */
-            if (icon.isNull())
-            {
-                const QVector<BYTE> byteVector = machine().GetIcon();
-                const QByteArray byteArray = QByteArray::fromRawData(reinterpret_cast<const char*>(byteVector.constData()), byteVector.size());
-                const QImage image = QImage::fromData(byteArray);
-                if (!image.isNull())
-                {
-                    QPixmap pixmap = QPixmap::fromImage(image);
-                    const int iMinimumLength = qMin(pixmap.width(), pixmap.height());
-                    pixmap = pixmap.scaled(QSize(iMinimumLength, iMinimumLength), Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
-                    icon.addPixmap(pixmap);
-                }
-            }
-
-            /* Finally, store the icon dynamically if overriden: */
-            if (!icon.isNull())
-                m_pMachineWindowIcon = new QIcon(icon);
-        }
+        /* Load/prepare user's machine-window icon: */
+        QIcon icon;
+        foreach (const QString &strIconName, gEDataManager->machineWindowIconNames(strMachineID))
+            if (!strIconName.isEmpty() && QFile::exists(strIconName))
+                icon.addFile(strIconName);
+        if (!icon.isNull())
+            m_pMachineWindowIcon = new QIcon(icon);
 
         /* Load user's machine-window name postfix: */
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.cpp	(revision 66655)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.cpp	(revision 66656)
@@ -70,14 +70,4 @@
 }
 
-void UIVMCloseDialog::setPixmap(const QPixmap &pixmap)
-{
-    /* Make sure pixmap is valid: */
-    if (pixmap.isNull())
-        return;
-
-    /* Assign new pixmap: */
-    m_pIcon->setPixmap(pixmap);
-}
-
 void UIVMCloseDialog::sltUpdateWidgetAvailability()
 {
@@ -113,4 +103,14 @@
     /* Hide the dialog: */
     hide();
+}
+
+void UIVMCloseDialog::setPixmap(const QPixmap &pixmap)
+{
+    /* Make sure pixmap is valid: */
+    if (pixmap.isNull())
+        return;
+
+    /* Assign new pixmap: */
+    m_pIcon->setPixmap(pixmap);
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.h	(revision 66655)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.h	(revision 66656)
@@ -44,7 +44,4 @@
     bool isValid() const { return m_fValid; }
 
-    /* API: Pixmap stuff: */
-    void setPixmap(const QPixmap &pixmap);
-
 private slots:
 
@@ -56,4 +53,7 @@
 
 private:
+
+    /* API: Pixmap stuff: */
+    void setPixmap(const QPixmap &pixmap);
 
     /* API: Detach-button stuff: */
