VirtualBox

Changeset 99092 in vbox for trunk


Ignore:
Timestamp:
Mar 21, 2023 3:36:08 PM (19 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:10322: Runtime UI: Storage status-bar indicators should be updated directly by storage-change and media-change events.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/runtime
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp

    r99083 r99092  
    184184        connect(pMachine, &UIMachine::sigStorageDeviceChange,
    185185                this, &UIIndicatorHardDrive::updateAppearance);
     186        connect(pMachine, &UIMachine::sigMediumChange,
     187                this, &UIIndicatorHardDrive::updateAppearance);
    186188        /* Translate finally: */
    187189        retranslateUi();
     
    232234        connect(pMachine, &UIMachine::sigMachineStateChange,
    233235                this, &UIIndicatorOpticalDisks::updateAppearance);
     236        connect(pMachine, &UIMachine::sigStorageDeviceChange,
     237                this, &UIIndicatorOpticalDisks::updateAppearance);
     238        connect(pMachine, &UIMachine::sigMediumChange,
     239                this, &UIIndicatorOpticalDisks::updateAppearance);
    234240        /* Translate finally: */
    235241        retranslateUi();
     
    279285        /* Configure connection: */
    280286        connect(pMachine, &UIMachine::sigMachineStateChange,
     287                this, &UIIndicatorFloppyDisks::updateAppearance);
     288        connect(pMachine, &UIMachine::sigStorageDeviceChange,
     289                this, &UIIndicatorFloppyDisks::updateAppearance);
     290        connect(pMachine, &UIMachine::sigMediumChange,
    281291                this, &UIIndicatorFloppyDisks::updateAppearance);
    282292        /* Translate finally: */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineDefs.h

    r99091 r99092  
    4949    UIVisualElement_MouseIntegrationStuff = RT_BIT(1),
    5050    UIVisualElement_IndicatorPoolStuff    = RT_BIT(2),
    51     UIVisualElement_HDStuff               = RT_BIT(3),
    52     UIVisualElement_CDStuff               = RT_BIT(4),
    53     UIVisualElement_FDStuff               = RT_BIT(5),
    5451    UIVisualElement_AudioStuff            = RT_BIT(6),
    5552    UIVisualElement_USBStuff              = RT_BIT(8),
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp

    r98968 r99092  
    15691569    /* Remove instance if exist: */
    15701570    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 type
    1574      * 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 were
    1576      * originated from our side. */
    1577     foreach (UIMachineWindow *pMachineWindow, machineWindows())
    1578         pMachineWindow->updateAppearanceOf(UIVisualElement_HDStuff | UIVisualElement_CDStuff | UIVisualElement_FDStuff);
    15791571}
    15801572
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.cpp

    r99091 r99092  
    8383}
    8484
    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 
    9785void UIMachineWindowNormal::sltUSBControllerChange()
    9886{
     
    134122{
    135123    /* Update virtualization stuff: */
    136     updateAppearanceOf(  UIVisualElement_FeaturesStuff
    137                        | UIVisualElement_HDStuff
    138                        | UIVisualElement_CDStuff
    139                        | UIVisualElement_FDStuff);
     124    updateAppearanceOf(UIVisualElement_FeaturesStuff);
    140125}
    141126
     
    249234
    250235    /* Start watching for console events: */
    251     connect(machineLogic()->uimachine(), &UIMachine::sigMediumChange,
    252         this, &UIMachineWindowNormal::sltMediumChange);
    253236    connect(machineLogic()->uimachine(), &UIMachine::sigUSBControllerChange,
    254237            this, &UIMachineWindowNormal::sltUSBControllerChange);
     
    451434{
    452435    /* Stop watching for console events: */
    453     disconnect(machineLogic()->uimachine(), &UIMachine::sigMediumChange,
    454                this, &UIMachineWindowNormal::sltMediumChange);
    455436    disconnect(machineLogic()->uimachine(), &UIMachine::sigUSBControllerChange,
    456437               this, &UIMachineWindowNormal::sltUSBControllerChange);
     
    725706        if (uimachine()->isRunning())
    726707        {
    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);
    733708            if (iElement & UIVisualElement_AudioStuff)
    734709                m_pIndicatorsPool->updateAppearance(IndicatorType_Audio);
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/normal/UIMachineWindowNormal.h

    r99091 r99092  
    5959    /** Handles machine state change event. */
    6060    void sltMachineStateChanged();
    61     /** Handles medium change event. */
    62     void sltMediumChange(const CMediumAttachment &attachment);
    6361    /** Handles USB controller change event. */
    6462    void sltUSBControllerChange();
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette