VirtualBox

Changeset 14004 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Nov 10, 2008 12:52:37 PM (16 years ago)
Author:
vboxsync
Message:

Fe/Qt4: Systray: Limit number of VMs in one sub menu to 15, then creating another sub menu.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxSelectorWnd.cpp

    r13869 r14004  
    11421142
    11431143    VBoxVMItem* pItem = NULL;
     1144    QMenu* pCurMenu = trayIconMenu;
    11441145    QMenu* pSubMenu = NULL;
    1145     for (int i = 0; i < mVMModel->rowCount(); i++)
    1146     {
     1146    Assert(pCurMenu);
     1147
     1148    int iCurItemCount = 0;
     1149
     1150    for (int i = 0; i < mVMModel->rowCount(); i++, iCurItemCount++)
     1151    {
     1152        if (iCurItemCount > 14)     /* 15 machines per sub menu. */
     1153        {
     1154            pSubMenu = new QMenu (tr("Next 20 machines ..."));
     1155            Assert(pSubMenu);
     1156            pCurMenu->addMenu (pSubMenu);
     1157            pCurMenu = pSubMenu;
     1158            iCurItemCount = 0;
     1159        }
     1160
    11471161        pItem = mVMModel->itemByRow(i);
    11481162        Assert(pItem);
     
    11721186        }
    11731187
    1174         trayIconMenu->addMenu (pSubMenu);
     1188        pCurMenu->addMenu (pSubMenu);
    11751189    }
    11761190
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette