- Timestamp:
- Mar 21, 2023 3:36:08 PM (19 months ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/runtime
- Files:
-
- 5 edited
-
UIIndicatorsPool.cpp (modified) (3 diffs)
-
UIMachineDefs.h (modified) (1 diff)
-
UIMachineLogic.cpp (modified) (1 diff)
-
normal/UIMachineWindowNormal.cpp (modified) (5 diffs)
-
normal/UIMachineWindowNormal.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp
r99083 r99092 184 184 connect(pMachine, &UIMachine::sigStorageDeviceChange, 185 185 this, &UIIndicatorHardDrive::updateAppearance); 186 connect(pMachine, &UIMachine::sigMediumChange, 187 this, &UIIndicatorHardDrive::updateAppearance); 186 188 /* Translate finally: */ 187 189 retranslateUi(); … … 232 234 connect(pMachine, &UIMachine::sigMachineStateChange, 233 235 this, &UIIndicatorOpticalDisks::updateAppearance); 236 connect(pMachine, &UIMachine::sigStorageDeviceChange, 237 this, &UIIndicatorOpticalDisks::updateAppearance); 238 connect(pMachine, &UIMachine::sigMediumChange, 239 this, &UIIndicatorOpticalDisks::updateAppearance); 234 240 /* Translate finally: */ 235 241 retranslateUi(); … … 279 285 /* Configure connection: */ 280 286 connect(pMachine, &UIMachine::sigMachineStateChange, 287 this, &UIIndicatorFloppyDisks::updateAppearance); 288 connect(pMachine, &UIMachine::sigStorageDeviceChange, 289 this, &UIIndicatorFloppyDisks::updateAppearance); 290 connect(pMachine, &UIMachine::sigMediumChange, 281 291 this, &UIIndicatorFloppyDisks::updateAppearance); 282 292 /* Translate finally: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineDefs.h
r99091 r99092 49 49 UIVisualElement_MouseIntegrationStuff = RT_BIT(1), 50 50 UIVisualElement_IndicatorPoolStuff = RT_BIT(2), 51 UIVisualElement_HDStuff = RT_BIT(3),52 UIVisualElement_CDStuff = RT_BIT(4),53 UIVisualElement_FDStuff = RT_BIT(5),54 51 UIVisualElement_AudioStuff = RT_BIT(6), 55 52 UIVisualElement_USBStuff = RT_BIT(8), -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r98968 r99092 1569 1569 /* Remove instance if exist: */ 1570 1570 delete m_settings.take(UISettingsDialog::DialogType_Machine); 1571 1572 /* We can't rely on MediumChange events as they are not yet properly implemented within Main.1573 * We can't watch for MachineData change events as well as they are of broadcast type1574 * and console event-handler do not processing broadcast events.1575 * But we still want to be updated after possible medium changes at least if they were1576 * originated from our side. */1577 foreach (UIMachineWindow *pMachineWindow, machineWindows())1578 pMachineWindow->updateAppearanceOf(UIVisualElement_HDStuff | UIVisualElement_CDStuff | UIVisualElement_FDStuff);1579 1571 } 1580 1572 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp
r99091 r99092 83 83 } 84 84 85 void UIMachineWindowNormal::sltMediumChange(const CMediumAttachment &attachment)86 {87 /* Update corresponding medium stuff: */88 KDeviceType type = attachment.GetType();89 if (type == KDeviceType_HardDisk)90 updateAppearanceOf(UIVisualElement_HDStuff);91 if (type == KDeviceType_DVD)92 updateAppearanceOf(UIVisualElement_CDStuff);93 if (type == KDeviceType_Floppy)94 updateAppearanceOf(UIVisualElement_FDStuff);95 }96 97 85 void UIMachineWindowNormal::sltUSBControllerChange() 98 86 { … … 134 122 { 135 123 /* Update virtualization stuff: */ 136 updateAppearanceOf( UIVisualElement_FeaturesStuff 137 | UIVisualElement_HDStuff 138 | UIVisualElement_CDStuff 139 | UIVisualElement_FDStuff); 124 updateAppearanceOf(UIVisualElement_FeaturesStuff); 140 125 } 141 126 … … 249 234 250 235 /* Start watching for console events: */ 251 connect(machineLogic()->uimachine(), &UIMachine::sigMediumChange,252 this, &UIMachineWindowNormal::sltMediumChange);253 236 connect(machineLogic()->uimachine(), &UIMachine::sigUSBControllerChange, 254 237 this, &UIMachineWindowNormal::sltUSBControllerChange); … … 451 434 { 452 435 /* Stop watching for console events: */ 453 disconnect(machineLogic()->uimachine(), &UIMachine::sigMediumChange,454 this, &UIMachineWindowNormal::sltMediumChange);455 436 disconnect(machineLogic()->uimachine(), &UIMachine::sigUSBControllerChange, 456 437 this, &UIMachineWindowNormal::sltUSBControllerChange); … … 725 706 if (uimachine()->isRunning()) 726 707 { 727 if (iElement & UIVisualElement_HDStuff)728 m_pIndicatorsPool->updateAppearance(IndicatorType_HardDisks);729 if (iElement & UIVisualElement_CDStuff)730 m_pIndicatorsPool->updateAppearance(IndicatorType_OpticalDisks);731 if (iElement & UIVisualElement_FDStuff)732 m_pIndicatorsPool->updateAppearance(IndicatorType_FloppyDisks);733 708 if (iElement & UIVisualElement_AudioStuff) 734 709 m_pIndicatorsPool->updateAppearance(IndicatorType_Audio); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.h
r99091 r99092 59 59 /** Handles machine state change event. */ 60 60 void sltMachineStateChanged(); 61 /** Handles medium change event. */62 void sltMediumChange(const CMediumAttachment &attachment);63 61 /** Handles USB controller change event. */ 64 62 void sltUSBControllerChange();
Note:
See TracChangeset
for help on using the changeset viewer.

