Index: trunk/src/VBox/Frontends/VirtualBox/ui/VBoxHardDiskSettings.ui.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/ui/VBoxHardDiskSettings.ui.h	(revision 8300)
+++ trunk/src/VBox/Frontends/VirtualBox/ui/VBoxHardDiskSettings.ui.h	(revision 8301)
@@ -165,8 +165,9 @@
             setListBox (new QListBox (this));
 
+        setFocusPolicy (QWidget::NoFocus);
         refresh();
         mUniq->subscribe (this);
-        qApp->installEventFilter (this);
         connect (mUniq, SIGNAL (listChanged()), this, SLOT (refresh()));
+        connect (mUniq, SIGNAL (listChanged()), this, SLOT (updateToolTip()));
         connect (this, SIGNAL (activated (int)), mUniq, SIGNAL (listChanged()));
         connect (this, SIGNAL (textChanged()), mUniq, SIGNAL (listChanged()));
@@ -227,4 +228,16 @@
     }
 
+    void updateToolTip()
+    {
+        QString oldTip = QToolTip::textFor (this);
+        QString newTip = currentText();
+
+        if (newTip != oldTip)
+        {
+            QToolTip::remove (this);
+            QToolTip::add (this, newTip);
+        }
+    }
+
 signals:
 
@@ -232,15 +245,4 @@
 
 private:
-
-    bool eventFilter (QObject *aObject, QEvent *aEvent)
-    {
-        if (aObject != listBox())
-            return false;
-
-        if (aEvent->type() == QEvent::Hide)
-            hide();
-
-        return QComboBox::eventFilter (aObject, aEvent);
-    }
 
     HDSlotUniquizer *mUniq;
@@ -263,5 +265,5 @@
         , mItem (aItem)
     {
-        qApp->installEventFilter (this);
+        setFocusPolicy (QWidget::NoFocus);
         connect (&vboxGlobal(),
                  SIGNAL (mediaRemoved (VBoxDefs::DiskType, const QUuid &)),
@@ -277,15 +279,4 @@
 
 private:
-
-    bool eventFilter (QObject *aObject, QEvent *aEvent)
-    {
-        if (aObject != listBox())
-            return false;
-
-        if (aEvent->type() == QEvent::Hide)
-            hide();
-
-        return VBoxMediaComboBox::eventFilter (aObject, aEvent);
-    }
 
     QListViewItem *mItem;
@@ -415,8 +406,5 @@
     {
         if (mVector [mFocusColumn]->count())
-        {
-            mVector [mFocusColumn]->show();
             mVector [mFocusColumn]->popup();
-        }
     }
 
@@ -482,28 +470,15 @@
         cb->resize (wc, hc);
 
-        QColorGroup cg (aColorGroup);
-        if (aColumn == mFocusColumn)
-        {
-            cg.setColor (QColorGroup::Base, aColorGroup.highlight());
-            cg.setColor (QColorGroup::Text, aColorGroup.highlightedText());
-        }
-        QListViewItem::paintCell (aPainter, cg, aColumn, aWidth, aAlign);
-    }
-
-    void paintFocus (QPainter *aPainter, const QColorGroup &aColorGroup,
-                     const QRect &aRect)
-    {
-        if (mFocusColumn != -1)
-        {
-            int indent = 0;
-            for (int i = 0; i < mFocusColumn; ++ i)
-                indent = listView()->columnWidth (i);
-
-            QRect newFocus (QPoint (aRect.x() + indent, aRect.y()),
-                            QSize (listView()->columnWidth (mFocusColumn),
-                                   aRect.height()));
-
-            QListViewItem::paintFocus (aPainter, aColorGroup, newFocus);
-        }
+        if (aColumn == mFocusColumn && cb->isHidden())
+            cb->show();
+        else if (aColumn != mFocusColumn && !cb->isHidden())
+            cb->hide();
+
+        QListViewItem::paintCell (aPainter, aColorGroup, aColumn, aWidth, aAlign);
+    }
+
+    void paintFocus (QPainter *, const QColorGroup &, const QRect &)
+    {
+        /* Do not paint focus, because it presented by combo-box */
     }
 
@@ -920,7 +895,5 @@
                 static_cast<HDListItem*> (clickedItem) : 0;
 
-            if (item)
-                item->showEditor();
-            else if (mAddAttachmentAct->isEnabled())
+            if (!item && mAddAttachmentAct->isEnabled())
                 addHDItem();
             break;
@@ -930,5 +903,9 @@
         {
             if (aObject != mLvHD->viewport())
+            {
+                if (!QToolTip::textFor (mLvHD->viewport()).isNull())
+                    QToolTip::remove (mLvHD->viewport());
                 break;
+            }
 
             QMouseEvent *e = static_cast<QMouseEvent*> (aEvent);
