Changeset 1265 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Mar 6, 2007 12:37:24 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/VBoxSelectorWnd.cpp
r1255 r1265 219 219 void goToSettings(); 220 220 void sessionStateChanged (const VBoxSessionStateChangeEvent &aE); 221 void machineStateChanged (const VBoxMachineStateChangeEvent &aE); 221 222 222 223 private: … … 268 269 269 270 /* connect VirtualBox callback events */ 271 connect (&vboxGlobal(), SIGNAL (machineStateChanged (const VBoxMachineStateChangeEvent &)), 272 this, SLOT (machineStateChanged (const VBoxSessionStateChangeEvent &))); 270 273 connect (&vboxGlobal(), SIGNAL (sessionStateChanged (const VBoxSessionStateChangeEvent &)), 271 274 this, SLOT (sessionStateChanged (const VBoxSessionStateChangeEvent &))); … … 298 301 mBrowser->setPaper (backgroundBrush()); 299 302 } 303 304 /* check initial machine and session states */ 305 bool saved = aMachine.GetState() == CEnums::Saved; 306 bool busy = aMachine.GetState() != CEnums::SessionClosed; 307 mBtnEdit->setEnabled (!saved && !busy); 300 308 } 301 309 … … 312 320 } 313 321 314 void VBoxVMDescriptionPage::sessionStateChanged (const VBoxSessionStateChangeEvent &aE) 315 { 322 void VBoxVMDescriptionPage::machineStateChanged (const VBoxMachineStateChangeEvent &aE) 323 { 324 /// @todo this slot will not be necessary when we implement the selective 325 /// VM Settings dialog, where only fields that can be changed in the 326 /// saved state, can be changed. 327 316 328 if (aE.id != mMachineId) 317 329 return; /* not interested in other machines */ 318 330 331 /* disable the edit button for a saved machine */ 332 bool saved = aE.state == CEnums::Saved; 333 mBtnEdit->setEnabled (!saved); 334 } 335 336 void VBoxVMDescriptionPage::sessionStateChanged (const VBoxSessionStateChangeEvent &aE) 337 { 338 if (aE.id != mMachineId) 339 return; /* not interested in other machines */ 340 319 341 /* whether another direct session is open or not */ 320 342 bool busy = aE.state != CEnums::SessionClosed; 321 322 343 mBtnEdit->setEnabled (!busy); 323 344 } … … 1062 1083 vmDetailsView->setDetailsText ( 1063 1084 vboxGlobal().detailsReport (m, false /* isNewVM */, 1064 !running/* withLinks */));1085 modifyEnabled /* withLinks */)); 1065 1086 } 1066 1087 if (aRefreshSnapshots)
Note:
See TracChangeset
for help on using the changeset viewer.