Index: trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItem.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItem.h	(revision 43598)
+++ trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItem.h	(revision 43604)
@@ -27,4 +27,7 @@
 #include "QIWithRetranslateUI.h"
 
+/* Other VBox includes: */
+#include <iprt/cdefs.h>
+
 /* Forward declaration: */
 class UIGChooserModel;
@@ -43,4 +46,12 @@
     UIGChooserItemType_Group   = QGraphicsItem::UserType + 1,
     UIGChooserItemType_Machine = QGraphicsItem::UserType + 2
+};
+
+/* Item search flags: */
+enum UIGChooserItemSearchFlag
+{
+    UIGChooserItemSearchFlag_Machine   = RT_BIT(0),
+    UIGChooserItemSearchFlag_Group     = RT_BIT(1),
+    UIGChooserItemSearchFlag_ExactName = RT_BIT(2)
 };
 
@@ -94,4 +105,5 @@
     virtual bool hasItems(UIGChooserItemType type = UIGChooserItemType_Any) const = 0;
     virtual void clearItems(UIGChooserItemType type = UIGChooserItemType_Any) = 0;
+    virtual UIGChooserItem* searchForItem(const QString &strSearchTag, int iItemSearchFlags) = 0;
     virtual UIGChooserItemMachine* firstMachineItem() = 0;
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.cpp	(revision 43598)
+++ trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.cpp	(revision 43604)
@@ -732,4 +732,37 @@
 }
 
+UIGChooserItem* UIGChooserItemGroup::searchForItem(const QString &strSearchTag, int iItemSearchFlags)
+{
+    /* Are we searching among group-items? */
+    if (iItemSearchFlags & UIGChooserItemSearchFlag_Group)
+    {
+        /* Are we searching by the exact name? */
+        if (iItemSearchFlags & UIGChooserItemSearchFlag_ExactName)
+        {
+            /* Exact name matches? */
+            if (name() == strSearchTag)
+                return this;
+        }
+        /* Are we searching by the few first symbols? */
+        else
+        {
+            /* Name starts with passed symbols? */
+            if (name().startsWith(strSearchTag, Qt::CaseInsensitive))
+                return this;
+        }
+    }
+
+    /* Search among all the children, but machines first: */
+    foreach (UIGChooserItem *pItem, items(UIGChooserItemType_Machine))
+        if (UIGChooserItem *pFoundItem = pItem->searchForItem(strSearchTag, iItemSearchFlags))
+            return pFoundItem;
+    foreach (UIGChooserItem *pItem, items(UIGChooserItemType_Group))
+        if (UIGChooserItem *pFoundItem = pItem->searchForItem(strSearchTag, iItemSearchFlags))
+            return pFoundItem;
+
+    /* Nothing found? */
+    return 0;
+}
+
 UIGChooserItemMachine* UIGChooserItemGroup::firstMachineItem()
 {
Index: trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.h	(revision 43598)
+++ trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemGroup.h	(revision 43604)
@@ -148,4 +148,5 @@
     bool hasItems(UIGChooserItemType type = UIGChooserItemType_Any) const;
     void clearItems(UIGChooserItemType type = UIGChooserItemType_Any);
+    UIGChooserItem* searchForItem(const QString &strSearchTag, int iItemSearchFlags);
     UIGChooserItemMachine* firstMachineItem();
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.cpp	(revision 43598)
+++ trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.cpp	(revision 43604)
@@ -360,4 +360,29 @@
 }
 
+UIGChooserItem* UIGChooserItemMachine::searchForItem(const QString &strSearchTag, int iItemSearchFlags)
+{
+    /* Ignoring if we are not searching for the machine-item? */
+    if (!(iItemSearchFlags & UIGChooserItemSearchFlag_Machine))
+        return 0;
+
+    /* Are we searching by the exact name? */
+    if (iItemSearchFlags & UIGChooserItemSearchFlag_ExactName)
+    {
+        /* Exact name doesn't match? */
+        if (name() != strSearchTag)
+            return 0;
+    }
+    /* Are we searching by the few first symbols? */
+    else
+    {
+        /* Name doesn't start with passed symbols? */
+        if (!name().startsWith(strSearchTag, Qt::CaseInsensitive))
+            return 0;
+    }
+
+    /* Returning this: */
+    return this;
+}
+
 UIGChooserItemMachine* UIGChooserItemMachine::firstMachineItem()
 {
Index: trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.h	(revision 43598)
+++ trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserItemMachine.h	(revision 43604)
@@ -23,7 +23,4 @@
 #include "UIVMItem.h"
 #include "UIGChooserItem.h"
-
-/* Other VBox includes: */
-#include <iprt/cdefs.h>
 
 /* Forward declarations: */
@@ -127,4 +124,5 @@
     bool hasItems(UIGChooserItemType type) const;
     void clearItems(UIGChooserItemType type);
+    UIGChooserItem* searchForItem(const QString &strSearchTag, int iItemSearchFlags);
     UIGChooserItemMachine* firstMachineItem();
 
Index: trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.cpp
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.cpp	(revision 43598)
+++ trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.cpp	(revision 43604)
@@ -296,5 +296,7 @@
     {
         /* Search for group-item with passed descriptor (name): */
-        pItem = findGroupItem(strItemDescriptor, mainRoot());
+        pItem = mainRoot()->searchForItem(strItemDescriptor,
+                                          UIGChooserItemSearchFlag_Group |
+                                          UIGChooserItemSearchFlag_ExactName);
     }
     /* Its a machine-item definition? */
@@ -306,5 +308,7 @@
         {
             /* Search for machine-item with required name: */
-            pItem = findMachineItem(machine.GetName(), mainRoot());
+            pItem = mainRoot()->searchForItem(machine.GetName(),
+                                              UIGChooserItemSearchFlag_Machine |
+                                              UIGChooserItemSearchFlag_ExactName);
         }
     }
@@ -556,5 +560,7 @@
     m_pLookupTimer->start();
     /* Look for item which is starting from the lookup-string: */
-    UIGChooserItem *pItem = lookForItem(mainRoot(), m_strLookupString + strLookupSymbol);
+    UIGChooserItem *pItem = mainRoot()->searchForItem(m_strLookupString + strLookupSymbol,
+                                                      UIGChooserItemSearchFlag_Machine |
+                                                      UIGChooserItemSearchFlag_Group);
     /* If item found: */
     if (pItem)
@@ -611,5 +617,7 @@
             updateNavigation();
             updateLayout();
-            setCurrentItem(findMachineItem(machine.GetName(), mainRoot()));
+            setCurrentItem(mainRoot()->searchForItem(machine.GetName(),
+                                                     UIGChooserItemSearchFlag_Machine |
+                                                     UIGChooserItemSearchFlag_ExactName));
         }
     }
@@ -941,5 +949,7 @@
             /* Select first of reloaded items: */
             if (!pSelectedItem)
-                pSelectedItem = findMachineItem(strMachineName, mainRoot());
+                pSelectedItem = mainRoot()->searchForItem(strMachineName,
+                                                          UIGChooserItemSearchFlag_Machine |
+                                                          UIGChooserItemSearchFlag_ExactName);
         }
     }
@@ -1404,18 +1414,4 @@
 }
 
-UIGChooserItem* UIGChooserModel::findGroupItem(const QString &strName, UIGChooserItem *pParent)
-{
-    /* Search among all the group-items of passed parent: */
-    foreach (UIGChooserItem *pItem, pParent->items(UIGChooserItemType_Group))
-        if (pItem->name() == strName)
-            return pItem;
-    /* Recursively iterate into each the group-item of the passed parent: */
-    foreach (UIGChooserItem *pItem, pParent->items(UIGChooserItemType_Group))
-        if (UIGChooserItem *pGroupItem = findGroupItem(strName, pItem))
-            return pGroupItem;
-    /* Nothing found? */
-    return 0;
-}
-
 void UIGChooserModel::cleanupGroupTree(UIGChooserItem *pParent)
 {
@@ -1433,18 +1429,4 @@
             unindentRoot();
     }
-}
-
-UIGChooserItem* UIGChooserModel::findMachineItem(const QString &strName, UIGChooserItem *pParent)
-{
-    /* Search among all the machine-items of passed parent: */
-    foreach (UIGChooserItem *pItem, pParent->items(UIGChooserItemType_Machine))
-        if (pItem->name() == strName)
-            return pItem;
-    /* Recursively iterate into each the group-item of the passed parent: */
-    foreach (UIGChooserItem *pItem, pParent->items(UIGChooserItemType_Group))
-        if (UIGChooserItem *pMachineItem = findMachineItem(strName, pItem))
-            return pMachineItem;
-    /* Nothing found? */
-    return 0;
 }
 
@@ -1694,22 +1676,4 @@
 }
 
-UIGChooserItem* UIGChooserModel::lookForItem(UIGChooserItem *pParent, const QString &strStartingFrom)
-{
-    /* Search among the machines: */
-    foreach (UIGChooserItem *pItem, pParent->items(UIGChooserItemType_Machine))
-        if (pItem->name().startsWith(strStartingFrom, Qt::CaseInsensitive))
-            return pItem;
-    /* Search among the groups: */
-    foreach (UIGChooserItem *pItem, pParent->items(UIGChooserItemType_Group))
-    {
-        if (pItem->name().startsWith(strStartingFrom, Qt::CaseInsensitive))
-            return pItem;
-        if (UIGChooserItem *pResult = lookForItem(pItem, strStartingFrom))
-            return pResult;
-    }
-    /* Nothing found: */
-    return 0;
-}
-
 void UIGChooserModel::loadGroupTree()
 {
Index: trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.h
===================================================================
--- trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.h	(revision 43598)
+++ trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.h	(revision 43604)
@@ -245,9 +245,7 @@
 
     /* Helper: Group-item stuff: */
-    UIGChooserItem* findGroupItem(const QString &strName, UIGChooserItem *pParent);
     void cleanupGroupTree(UIGChooserItem *pGroupItem);
 
     /* Helpers: Machine-item stuff: */
-    UIGChooserItem* findMachineItem(const QString &strName, UIGChooserItem *pParent);
     void sortItems(UIGChooserItem *pParent);
     void updateMachineItems(const QString &strId, UIGChooserItem *pParent);
@@ -262,7 +260,4 @@
     /* Handler: Drag&drop event: */
     bool processDragMoveEvent(QGraphicsSceneDragDropEvent *pEvent);
-
-    /* Helper: Lookup stuff: */
-    UIGChooserItem* lookForItem(UIGChooserItem *pParent, const QString &strStartingFrom);
 
     /* Helpers: Loading stuff: */
