- Timestamp:
- Jan 28, 2022 2:16:22 PM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIActionPool.cpp
r93474 r93476 3560 3560 addAction(pMenu, action(UIActionIndex_M_FileManager_T_Operations)); 3561 3561 addAction(pMenu, action(UIActionIndex_M_FileManager_T_Log)); 3562 addAction(pMenu, action(UIActionIndex_M_FileManager_T_GuestSession));3563 3562 3564 3563 addAction(pMenu, action(UIActionIndex_M_FileManager_M_HostSubmenu)); -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManager.cpp
r93180 r93476 488 488 pTable->setIsCurrent(pTable == pCurrentGuestTable); 489 489 } 490 /* Disable host file table if guest session is not running: */ 490 491 if (m_pHostFileTable) 491 492 m_pHostFileTable->setEnabled(pCurrentGuestTable->isGuestSessionRunning()); 493 /* Disable/enable file table submenus of the menu: */ 494 UIMenu *pGuestSubmenu = m_pActionPool->action(UIActionIndex_M_FileManager_M_GuestSubmenu)->menu(); 495 if (pGuestSubmenu) 496 pGuestSubmenu->setEnabled(pCurrentGuestTable->isGuestSessionRunning()); 497 UIMenu *pHostSubmenu = m_pActionPool->action(UIActionIndex_M_FileManager_M_HostSubmenu)->menu(); 498 if (pHostSubmenu) 499 pHostSubmenu->setEnabled(pCurrentGuestTable->isGuestSessionRunning()); 492 500 } 493 501 -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerGuestTable.cpp
r93473 r93476 1391 1391 void UIFileManagerGuestTable::setSessionDependentWidgetsEnabled() 1392 1392 { 1393 switch (m_enmState) 1394 { 1395 case State_InvalidMachineReference: 1396 case State_MachineNotRunning: 1397 case State_NoGuestAdditions: 1398 setSessionWidgetsEnabled(false); 1399 m_pWarningLabelContainer->setVisible(true); 1400 if (m_pGuestSessionPanel) 1401 { 1402 m_pGuestSessionPanel->setEnabled(false); 1403 m_pGuestSessionPanel->switchSessionCreateMode(); 1404 } 1405 break; 1406 case State_SessionPossible: 1407 setSessionWidgetsEnabled(false); 1408 m_pWarningLabelContainer->setVisible(true); 1409 if (m_pGuestSessionPanel) 1410 { 1411 m_pGuestSessionPanel->setEnabled(true); 1412 m_pGuestSessionPanel->switchSessionCreateMode(); 1413 } 1414 break; 1415 case State_SessionRunning: 1416 setSessionWidgetsEnabled(true); 1417 m_pWarningLabelContainer->setVisible(false); 1418 if (m_pGuestSessionPanel) 1419 { 1420 m_pGuestSessionPanel->switchSessionCloseMode(); 1421 m_pGuestSessionPanel->setEnabled(true); 1422 } 1423 break; 1424 default: 1425 break; 1426 } 1393 /* Disable menu actions if guest session is not running: */ 1394 UIMenu *pGuestSubmenu = m_pActionPool->action(UIActionIndex_M_FileManager_M_GuestSubmenu)->menu(); 1395 if (pGuestSubmenu) 1396 pGuestSubmenu->setEnabled(m_enmState == State_SessionRunning); 1397 UIMenu *pHostSubmenu = m_pActionPool->action(UIActionIndex_M_FileManager_M_HostSubmenu)->menu(); 1398 if (pHostSubmenu) 1399 pHostSubmenu->setEnabled(m_enmState == State_SessionRunning); 1400 1401 /*Manage the guest session (login) widget: */ 1402 if (m_pGuestSessionPanel) 1403 { 1404 m_pGuestSessionPanel->setEnabled(m_enmState == State_SessionPossible || m_enmState == State_SessionRunning); 1405 if (m_enmState == State_SessionRunning) 1406 m_pGuestSessionPanel->switchSessionCreateMode(); 1407 else 1408 m_pGuestSessionPanel->switchSessionCloseMode(); 1409 } 1410 /* Call to parent: */ 1411 setSessionWidgetsEnabled(m_enmState == State_SessionRunning); 1412 1413 if (m_pWarningLabelContainer) 1414 m_pWarningLabelContainer->setVisible(m_enmState != State_SessionRunning); 1415 1427 1416 emit sigStateChanged(m_enmState == State_SessionRunning); 1428 1417 }
Note:
See TracChangeset
for help on using the changeset viewer.