- Timestamp:
- Mar 23, 2011 11:35:44 AM (14 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.cpp
r35722 r36364 171 171 /* Not used * 172 172 case KVBoxEventType_OnCPUChange: 173 case KVBoxEventType_OnVRDEServerChange: 174 case KVBoxEventType_OnVRDEServerInfoChange: 175 */ 173 */ 174 case KVBoxEventType_OnVRDEServerChanged: 175 case KVBoxEventType_OnVRDEServerInfoChanged: 176 { 177 emit sigVRDEChange(); 178 break; 179 } 176 180 case KVBoxEventType_OnUSBControllerChanged: 177 181 { -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMainEventListener.h
r35722 r36364 68 68 void sigNetworkAdapterChange(CNetworkAdapter adapter); 69 69 void sigMediumChange(CMediumAttachment attachment); 70 void sigVRDEChange(); 70 71 void sigUSBControllerChange(); 71 72 void sigUSBDeviceStateChange(CUSBDevice device, bool fAttached, CVirtualBoxErrorInfo error); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIConsoleEventHandler.cpp
r35722 r36364 72 72 << KVBoxEventType_OnNetworkAdapterChanged 73 73 << KVBoxEventType_OnMediumChanged 74 << KVBoxEventType_OnVRDEServerChanged 75 << KVBoxEventType_OnVRDEServerInfoChanged 74 76 << KVBoxEventType_OnUSBControllerChanged 75 77 << KVBoxEventType_OnUSBDeviceStateChanged … … 109 111 connect(pListener->getWrapped(), SIGNAL(sigMediumChange(CMediumAttachment)), 110 112 this, SIGNAL(sigMediumChange(CMediumAttachment)), 113 Qt::QueuedConnection); 114 115 connect(pListener->getWrapped(), SIGNAL(sigVRDEChange()), 116 this, SIGNAL(sigVRDEChange()), 111 117 Qt::QueuedConnection); 112 118 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIConsoleEventHandler.h
r31816 r36364 42 42 void sigNetworkAdapterChange(CNetworkAdapter adapter); 43 43 void sigMediumChange(CMediumAttachment attachment); 44 void sigVRDEChange(); 44 45 void sigUSBControllerChange(); 45 46 void sigUSBDeviceStateChange(CUSBDevice device, bool fAttached, CVirtualBoxErrorInfo error); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineMenuBar.cpp
r36357 r36364 237 237 pMenu->addAction(pActionsPool->action(UIActionIndex_Simple_NetworkAdaptersDialog)); 238 238 pMenu->addAction(pActionsPool->action(UIActionIndex_Simple_SharedFoldersDialog)); 239 pMenu->addSeparator();240 239 pMenu->addAction(pActionsPool->action(UIActionIndex_Toggle_VRDEServer)); 241 240 pMenu->addSeparator(); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r35926 r36364 110 110 this, SLOT(sltAdditionsChange())); 111 111 112 connect(gConsoleEvents, SIGNAL(sigVRDEChange()), 113 this, SLOT(sltVRDEChange())); 114 112 115 connect(gConsoleEvents, SIGNAL(sigNetworkAdapterChange(CNetworkAdapter)), 113 116 this, SIGNAL(sigNetworkAdapterChange(CNetworkAdapter))); … … 603 606 } 604 607 608 void UISession::sltVRDEChange() 609 { 610 /* Get machine: */ 611 const CMachine &machine = session().GetMachine(); 612 /* Get VRDE server: */ 613 const CVRDEServer &server = machine.GetVRDEServer(); 614 bool fIsVRDEServerAvailable = !server.isNull(); 615 /* Show/Hide VRDE action depending on VRDE server availability status: */ 616 uimachine()->actionsPool()->action(UIActionIndex_Toggle_VRDEServer)->setVisible(fIsVRDEServerAvailable); 617 /* Check/Uncheck VRDE action depending on VRDE server activity status: */ 618 if (fIsVRDEServerAvailable) 619 uimachine()->actionsPool()->action(UIActionIndex_Toggle_VRDEServer)->setChecked(server.GetEnabled()); 620 /* Notify listeners about VRDE change: */ 621 emit sigVRDEChange(); 622 } 623 605 624 void UISession::sltAdditionsChange() 606 625 { … … 967 986 } 968 987 969 /* VRDE stuff: */970 {971 /* Get VRDE server: */972 CVRDEServer server = machine.GetVRDEServer();973 bool fIsVRDEServerAvailable = !server.isNull();974 /* Show/Hide VRDE action depending on VRDE server availability status: */975 uimachine()->actionsPool()->action(UIActionIndex_Toggle_VRDEServer)->setVisible(fIsVRDEServerAvailable);976 /* Check/Uncheck VRDE action depending on VRDE server activity status: */977 if (fIsVRDEServerAvailable)978 uimachine()->actionsPool()->action(UIActionIndex_Toggle_VRDEServer)->setChecked(server.GetEnabled());979 }980 981 988 /* Network stuff: */ 982 989 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r35695 r36364 168 168 void sigNetworkAdapterChange(const CNetworkAdapter &networkAdapter); 169 169 void sigMediumChange(const CMediumAttachment &mediumAttachment); 170 void sigVRDEChange(); 170 171 void sigUSBControllerChange(); 171 172 void sigUSBDeviceStateChange(const CUSBDevice &device, bool bIsAttached, const CVirtualBoxErrorInfo &error); … … 194 195 void sltStateChange(KMachineState state); 195 196 void sltAdditionsChange(); 197 void sltVRDEChange(); 196 198 197 199 private:
Note:
See TracChangeset
for help on using the changeset viewer.