VirtualBox

Changeset 29133 in vbox for trunk/src


Ignore:
Timestamp:
May 6, 2010 11:20:42 AM (15 years ago)
Author:
vboxsync
Message:

FE/Qt4: show view menu in fs/seamless toolbar if more than one monitor is connected

Location:
trunk/src/VBox/Frontends/VirtualBox/src/runtime
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineWindowFullscreen.cpp

    r28800 r29133  
    200200        m_pMiniToolBar->updateDisplay(true, true);
    201201        QList<QMenu*> menus;
    202         menus << uisession()->actionsPool()->action(UIActionIndex_Menu_Machine)->menu();
    203         menus << uisession()->actionsPool()->action(UIActionIndex_Menu_Devices)->menu();
     202        UIMainMenuType fMenu = UIMainMenuType(UIMainMenuType_Machine | UIMainMenuType_Devices);
     203        if (QApplication::desktop()->numScreens() > 1)
     204            fMenu = UIMainMenuType(fMenu | UIMainMenuType_View);
     205        QList<QAction*> actions = uisession()->newMenu(fMenu)->actions();
     206        for (int i=0; i < actions.size(); ++i)
     207            menus << actions.at(i)->menu();
    204208        *m_pMiniToolBar << menus;
    205209        connect(m_pMiniToolBar, SIGNAL(exitAction()),
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/seamless/UIMachineWindowSeamless.cpp

    r29092 r29133  
    249249        m_pMiniToolBar->updateDisplay(true, true);
    250250        QList<QMenu*> menus;
    251         menus << uisession()->actionsPool()->action(UIActionIndex_Menu_Machine)->menu();
    252         menus << uisession()->actionsPool()->action(UIActionIndex_Menu_Devices)->menu();
     251        UIMainMenuType fMenu = UIMainMenuType(UIMainMenuType_Machine | UIMainMenuType_Devices);
     252        if (QApplication::desktop()->numScreens() > 1)
     253            fMenu = UIMainMenuType(fMenu | UIMainMenuType_View);
     254        QList<QAction*> actions = uisession()->newMenu(fMenu)->actions();
     255        for (int i=0; i < actions.size(); ++i)
     256            menus << actions.at(i)->menu();
    253257        *m_pMiniToolBar << menus;
    254258        connect(m_pMiniToolBar, SIGNAL(exitAction()),
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