VirtualBox

Changeset 100635 in vbox


Ignore:
Timestamp:
Jul 18, 2023 3:17:36 PM (17 months ago)
Author:
vboxsync
Message:

FE/Qt: VM Settings: Make sure VRDE tab of Display page isn't available if no ExtPack exist and usable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp

    r98103 r100635  
    399399
    400400    /* Check whether remote display server is valid: */
    401     const CVRDEServer &vrdeServer = m_machine.GetVRDEServer();
    402     oldDisplayData.m_fRemoteDisplayServerSupported = !vrdeServer.isNull();
    403     if (!vrdeServer.isNull())
     401    CExtPackManager comExtPackManager = uiCommon().virtualBox().GetExtensionPackManager();
     402    const bool fExtPackPresent = comExtPackManager.isNotNull() && comExtPackManager.IsExtPackUsable(GUI_ExtPackName);
     403    CVRDEServer comVrdeServer = m_machine.GetVRDEServer();
     404    const bool fServerExists = m_machine.isOk() && comVrdeServer.isNotNull();
     405    oldDisplayData.m_fRemoteDisplayServerSupported = fExtPackPresent && fServerExists;
     406    if (oldDisplayData.m_fRemoteDisplayServerSupported)
    404407    {
    405408        /* Gather old 'Remote Display' data: */
    406         oldDisplayData.m_fRemoteDisplayServerEnabled = vrdeServer.GetEnabled();
    407         oldDisplayData.m_strRemoteDisplayPort = vrdeServer.GetVRDEProperty("TCP/Ports");
    408         oldDisplayData.m_remoteDisplayAuthType = vrdeServer.GetAuthType();
    409         oldDisplayData.m_uRemoteDisplayTimeout = vrdeServer.GetAuthTimeout();
    410         oldDisplayData.m_fRemoteDisplayMultiConnAllowed = vrdeServer.GetAllowMultiConnection();
     409        oldDisplayData.m_fRemoteDisplayServerEnabled = comVrdeServer.GetEnabled();
     410        oldDisplayData.m_strRemoteDisplayPort = comVrdeServer.GetVRDEProperty("TCP/Ports");
     411        oldDisplayData.m_remoteDisplayAuthType = comVrdeServer.GetAuthType();
     412        oldDisplayData.m_uRemoteDisplayTimeout = comVrdeServer.GetAuthTimeout();
     413        oldDisplayData.m_fRemoteDisplayMultiConnAllowed = comVrdeServer.GetAllowMultiConnection();
    411414    }
    412415
     
    687690
    688691    /* Remote Display tab: */
     692    if (m_pTabWidget->isTabEnabled(1))
    689693    {
    690694        /* Prepare message: */
     
    11271131        /* Get new data from cache: */
    11281132        const UIDataSettingsMachineDisplay &newDisplayData = m_pCache->data();
     1133
     1134        /* Do not save anything if server isn't supported: */
     1135        if (   !oldDisplayData.m_fRemoteDisplayServerSupported
     1136            || !newDisplayData.m_fRemoteDisplayServerSupported)
     1137            return fSuccess;
    11291138
    11301139        /* Get remote display server for further activities: */
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