Changeset 92753 in vbox for trunk/src/VBox
- Timestamp:
- Dec 6, 2021 8:51:01 AM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/guestctrl
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManager.cpp
r92741 r92753 129 129 , m_pLogPanel(0) 130 130 , m_pOperationsPanel(0) 131 , m_fDialogBeingClosed(false)132 131 { 133 132 loadOptions(); … … 146 145 { 147 146 UIFileManagerOptions::destroy(); 148 }149 150 void UIFileManager::setDialogBeingClosed(bool fFlag)151 {152 m_fDialogBeingClosed = fFlag;153 147 } 154 148 … … 610 604 void UIFileManager::savePanelVisibility() 611 605 { 612 if (m_fDialogBeingClosed)613 return;614 606 /* Save a list of currently visible panels: */ 615 607 QStringList strNameList; -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManager.h
r92733 r92753 92 92 QMenu *menu() const; 93 93 94 void setDialogBeingClosed(bool fFlag);95 96 94 #ifdef VBOX_WS_MAC 97 95 /** Returns the toolbar. */ -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerDialog.cpp
r92638 r92753 70 70 UIFileManagerDialog::~UIFileManagerDialog() 71 71 { 72 UIFileManager *pWidget = qobject_cast<UIFileManager*>(widget());73 if (pWidget)74 pWidget->setDialogBeingClosed(true);75 72 } 76 73 -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerGuestTable.cpp
r92741 r92753 151 151 } 152 152 153 #include <QPushButton>154 153 UIFileManagerGuestTable::UIFileManagerGuestTable(UIActionPool *pActionPool, const CMachine &comMachine, QWidget *pParent /*= 0*/) 155 154 :UIFileManagerTable(pActionPool, pParent) … … 757 756 connect(m_pGuestSessionPanel, &UIFileManagerGuestSessionPanel::sigCreateSession, 758 757 this, &UIFileManagerGuestTable::sltCreateGuestSession); 759 //connect(m_pGuestSessionPanel, &UIFileManagerGuestSessionPanel::sigCloseSession,760 // this, &UIFileManagerGuestTable::sltCloseGuestSession);758 connect(m_pGuestSessionPanel, &UIFileManagerGuestSessionPanel::sigCloseSession, 759 this, &UIFileManagerGuestTable::sltHandleCloseSessionRequest); 761 760 connect(m_pGuestSessionPanel, &UIFileManagerGuestSessionPanel::sigHidePanel, 762 761 this, &UIFileManagerGuestTable::sltHandleGuestSessionPanelHidden); … … 906 905 } 907 906 907 void UIFileManagerGuestTable::cleanupSessionListener() 908 { 909 disconnect(m_pQtSessionListener->getWrapped(), &UIMainEventListener::sigGuestSessionStatedChanged, 910 this, &UIFileManagerGuestTable::sltGuestSessionStateChanged); 911 cleanupListener(m_pQtSessionListener, m_comSessionListener, m_comGuest.GetEventSource()); 912 } 908 913 909 914 void UIFileManagerGuestTable::postGuestSessionCreated() … … 1015 1020 } 1016 1021 1022 bool UIFileManagerGuestTable::isGuestSessionPossible() 1023 { 1024 if (m_comMachine.isNull()) 1025 return false; 1026 if (m_comMachine.GetState() != KMachineState_Running) 1027 return false; 1028 if (!checkGuestSession()) 1029 return false; 1030 return true; 1031 } 1032 1033 void UIFileManagerGuestTable::sltHandleCloseSessionRequest() 1034 { 1035 } 1036 1037 1017 1038 /*////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/ 1018 1039 /*////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////*/ -
trunk/src/VBox/Frontends/VirtualBox/src/guestctrl/UIFileManagerGuestTable.h
r92741 r92753 90 90 void sltHandleGuestSessionPanelHidden(); 91 91 void sltHandleGuestSessionPanelShown(); 92 93 92 void sltGuestSessionUnregistered(CGuestSession guestSession); 94 93 void sltGuestSessionRegistered(CGuestSession guestSession); 95 94 void sltGuestSessionStateChanged(const CGuestSessionStateChangedEvent &cEvent); 96 95 void sltCreateGuestSession(QString strUserName, QString strPassword); 96 void sltHandleCloseSessionRequest(); 97 97 98 98 private: … … 114 114 CEventSource comEventSource); 115 115 void cleanupGuestListener(); 116 void cleanupSessionListener(); 116 117 117 118 void prepareGuestSessionPanel(); … … 127 128 128 129 void initFileTable(); 130 /** Returns false if it is not possible to open a guest session on the machine. 131 * That is if machine is not running, or does not have guest additions etc. */ 132 bool isGuestSessionPossible(); 129 133 130 134 CGuest m_comGuest;
Note:
See TracChangeset
for help on using the changeset viewer.