VirtualBox

Changeset 66460 in vbox


Ignore:
Timestamp:
Apr 6, 2017 11:56:30 AM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
114440
Message:

FE/Qt: Settings: Syncing comments and minor pieces of code.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/settings
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsDisplay.cpp

    r66354 r66460  
    7878    m_pCache->clear();
    7979
    80     /* Prepare old data: */
     80    /* Prepare old display data: */
    8181    UIDataSettingsGlobalDisplay oldData;
    8282
    83     /* Gather old data: */
     83    /* Gather old display data: */
    8484    oldData.m_strMaxGuestResolution = m_settings.maxGuestRes();
    8585    oldData.m_fActivateHoveredMachineWindow = gEDataManager->activateHoveredMachineWindow();
    8686
    87     /* Cache old data: */
     87    /* Cache old display data: */
    8888    m_pCache->cacheInitialData(oldData);
    8989
     
    9494void UIGlobalSettingsDisplay::getFromCache()
    9595{
    96     /* Get old data from cache: */
     96    /* Get old display data from the cache: */
    9797    const UIDataSettingsGlobalDisplay &oldData = m_pCache->base();
    9898
    99     /* Load old data from cache: */
     99    /* Load old display data from the cache: */
    100100    if (   (oldData.m_strMaxGuestResolution.isEmpty())
    101101        || (oldData.m_strMaxGuestResolution == "auto"))
     
    125125void UIGlobalSettingsDisplay::putToCache()
    126126{
    127     /* Prepare new data: */
     127    /* Prepare new display data: */
    128128    UIDataSettingsGlobalDisplay newData = m_pCache->base();
    129129
    130     /* Gather new data: */
     130    /* Gather new display data: */
    131131    if (m_pMaxResolutionCombo->itemData(m_pMaxResolutionCombo->currentIndex()).toString() == "auto")
    132132    {
     
    148148    newData.m_fActivateHoveredMachineWindow = m_pCheckBoxActivateOnMouseHover->isChecked();
    149149
    150     /* Cache new data: */
     150    /* Cache new display data: */
    151151    m_pCache->cacheCurrentData(newData);
    152152}
     
    157157    UISettingsPageGlobal::fetchData(data);
    158158
    159     /* Save new data from cache: */
     159    /* Make sure display data was changed: */
    160160    if (m_pCache->wasChanged())
    161161    {
     162        /* Save new display data from the cache: */
    162163        if (m_pCache->data().m_strMaxGuestResolution != m_pCache->base().m_strMaxGuestResolution)
    163164            m_settings.setMaxGuestRes(m_pCache->data().m_strMaxGuestResolution);
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsExtension.cpp

    r66354 r66460  
    277277    m_pCache->clear();
    278278
    279     /* Prepare old data: */
     279    /* Prepare old extension data: */
    280280    UIDataSettingsGlobalExtension oldData;
    281281
    282     /* Gather old data: */
     282    /* Gather old extension data: */
    283283    const CExtPackVector &packages = vboxGlobal().virtualBox().
    284284                                     GetExtensionPackManager().GetInstalledExtPacks();
     
    290290    }
    291291
    292     /* Cache old data: */
     292    /* Cache old extension data: */
    293293    m_pCache->cacheInitialData(oldData);
    294294
     
    299299void UIGlobalSettingsExtension::getFromCache()
    300300{
    301     /* Get old data from cache: */
     301    /* Get old extension data from the cache: */
    302302    const UIDataSettingsGlobalExtension &oldData = m_pCache->base();
    303303
    304     /* Load old data from cache: */
     304    /* Load old extension data from the cache: */
    305305    foreach (const UIDataSettingsGlobalExtensionItem &item, oldData.m_items)
    306306        new UIExtensionPackageItem(m_pPackagesTree, item);
     
    314314void UIGlobalSettingsExtension::putToCache()
    315315{
    316     /* Nothing to upload to cache... */
     316    /* Nothing to cache... */
    317317}
    318318
     
    322322    UISettingsPageGlobal::fetchData(data);
    323323
    324     /* Nothing to save from cache... */
     324    /* Nothing to save from the cache... */
    325325
    326326    /* Upload properties & settings to data: */
     
    468468                if (progress.isOk() && progress.GetResultCode() == 0)
    469469                {
    470                     /* Remove selected package from cache: */
     470                    /* Remove selected package from the cache: */
    471471                    for (int i = 0; i < m_pCache->data().m_items.size(); ++i)
    472472                    {
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsGeneral.cpp

    r66343 r66460  
    8585    m_pCache->clear();
    8686
    87     /* Prepare old data: */
     87    /* Prepare old general data: */
    8888    UIDataSettingsGlobalGeneral oldData;
    8989
    90     /* Gather old data: */
     90    /* Gather old general data: */
    9191    oldData.m_strDefaultMachineFolder = m_properties.GetDefaultMachineFolder();
    9292    oldData.m_strVRDEAuthLibrary = m_properties.GetVRDEAuthLibrary();
    9393    oldData.m_fHostScreenSaverDisabled = m_settings.hostScreenSaverDisabled();
    9494
    95     /* Cache old data: */
     95    /* Cache old general data: */
    9696    m_pCache->cacheInitialData(oldData);
    9797
     
    102102void UIGlobalSettingsGeneral::getFromCache()
    103103{
    104     /* Get old data from cache: */
     104    /* Get old general data from the cache: */
    105105    const UIDataSettingsGlobalGeneral &oldData = m_pCache->base();
    106106
    107     /* Load old data from cache: */
     107    /* Load old general data from the cache: */
    108108    m_pSelectorMachineFolder->setPath(oldData.m_strDefaultMachineFolder);
    109109    m_pSelectorVRDPLibName->setPath(oldData.m_strVRDEAuthLibrary);
     
    113113void UIGlobalSettingsGeneral::putToCache()
    114114{
    115     /* Prepare new data: */
     115    /* Prepare new general data: */
    116116    UIDataSettingsGlobalGeneral newData = m_pCache->base();
    117117
    118     /* Gather new data: */
     118    /* Gather new general data: */
    119119    newData.m_strDefaultMachineFolder = m_pSelectorMachineFolder->path();
    120120    newData.m_strVRDEAuthLibrary = m_pSelectorVRDPLibName->path();
    121121    newData.m_fHostScreenSaverDisabled = m_pCheckBoxHostScreenSaver->isChecked();
    122122
    123     /* Cache new data: */
     123    /* Cache new general data: */
    124124    m_pCache->cacheCurrentData(newData);
    125125}
     
    130130    UISettingsPageGlobal::fetchData(data);
    131131
    132     /* Save new data from cache: */
     132    /* Make sure general data was changed: */
    133133    if (m_pCache->wasChanged())
    134134    {
     135        /* Save new general data from the cache: */
    135136        if (   m_properties.isOk()
    136137            && m_pCache->data().m_strDefaultMachineFolder != m_pCache->base().m_strDefaultMachineFolder)
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.cpp

    r66354 r66460  
    888888    m_pCache->clear();
    889889
    890     /* Prepare old data: */
     890    /* Prepare old input data: */
    891891    UIDataSettingsGlobalInput oldData;
    892892
    893     /* Gather old data: */
     893    /* Gather old input data: */
    894894    oldData.shortcuts() << UIDataShortcutRow(m_pMachineTable, UIHostCombo::hostComboCacheKey(), tr("Host Key Combination"),  m_settings.hostCombo(), QString());
    895895    const QMap<QString, UIShortcut> &shortcuts = gShortcutPool->shortcuts();
     
    907907    oldData.setAutoCapture(m_settings.autoCapture());
    908908
    909     /* Cache old data: */
     909    /* Cache old input data: */
    910910    m_pCache->cacheInitialData(oldData);
    911911
     
    916916void UIGlobalSettingsInput::getFromCache()
    917917{
    918     /* Get old data from cache: */
     918    /* Get old input data from the cache: */
    919919    const UIDataSettingsGlobalInput &oldData = m_pCache->base();
    920920
    921     /* Load old data from cache: */
     921    /* Load old input data from the cache: */
    922922    m_pSelectorModel->load(oldData.shortcuts());
    923923    m_pMachineModel->load(oldData.shortcuts());
     
    930930void UIGlobalSettingsInput::putToCache()
    931931{
    932     /* Prepare new data: */
     932    /* Prepare new input data: */
    933933    UIDataSettingsGlobalInput newData = m_pCache->base();
    934934
    935     /* Gather new data: */
     935    /* Gather new input data: */
    936936    m_pSelectorModel->save(newData.shortcuts());
    937937    m_pMachineModel->save(newData.shortcuts());
    938938    newData.setAutoCapture(m_pEnableAutoGrabCheckbox->isChecked());
    939939
    940     /* Cache new data: */
     940    /* Cache new input data: */
    941941    m_pCache->cacheCurrentData(newData);
    942942}
     
    947947    UISettingsPageGlobal::fetchData(data);
    948948
    949     /* Save new data from cache: */
     949    /* Make sure input data was changed: */
    950950    if (m_pCache->wasChanged())
    951951    {
    952         /* Save host-combo shortcut from cache: */
     952        /* Save new host-combo shortcut from the cache: */
    953953        const UIDataShortcutRow fakeHostComboItem(0, UIHostCombo::hostComboCacheKey(), QString(), QString(), QString());
    954954        const int iHostComboItemBase = UIFunctorFindShortcut(UIFunctorFindShortcut::Base)(m_pCache->base().shortcuts(), fakeHostComboItem);
     
    959959            m_settings.setHostCombo(strHostComboData);
    960960
    961         /* Save other shortcut sequences from cache: */
     961        /* Save other new shortcuts from the cache: */
    962962        QMap<QString, QString> sequencesBase;
    963963        QMap<QString, QString> sequencesData;
     
    969969            gShortcutPool->setOverrides(sequencesData);
    970970
    971         /* Save other things from cache: */
     971        /* Save other new things from the cache: */
    972972        if (m_pCache->data().autoCapture() != m_pCache->base().autoCapture())
    973973            m_settings.setAutoCapture(m_pCache->data().autoCapture());
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsLanguage.cpp

    r66343 r66460  
    227227    m_pCache->clear();
    228228
    229     /* Prepare old data: */
     229    /* Prepare old language data: */
    230230    UIDataSettingsGlobalLanguage oldData;
    231231
    232     /* Gather old data: */
     232    /* Gather old language data: */
    233233    oldData.m_strLanguageId = m_settings.languageId();
    234234
    235     /* Cache old data: */
     235    /* Cache old language data: */
    236236    m_pCache->cacheInitialData(oldData);
    237237
     
    242242void UIGlobalSettingsLanguage::getFromCache()
    243243{
    244     /* Get old data from cache: */
     244    /* Get old language data from the cache: */
    245245    const UIDataSettingsGlobalLanguage &oldData = m_pCache->base();
    246246
    247     /* Load old data from cache: */
     247    /* Load old language data from the cache: */
    248248    reloadLanguageTree(oldData.m_strLanguageId);
    249249}
     
    251251void UIGlobalSettingsLanguage::putToCache()
    252252{
    253     /* Prepare new data: */
     253    /* Prepare new language data: */
    254254    UIDataSettingsGlobalLanguage newData = m_pCache->base();
    255255
    256     /* Gather new data: */
     256    /* Gather new language data: */
    257257    QTreeWidgetItem *pCurrentItem = m_pLanguageTree->currentItem();
    258258    Assert(pCurrentItem);
     
    260260        newData.m_strLanguageId = pCurrentItem->text(1);
    261261
    262     /* Cache new data: */
     262    /* Cache new language data: */
    263263    m_pCache->cacheCurrentData(newData);
    264264}
     
    269269    UISettingsPageGlobal::fetchData(data);
    270270
    271     /* Save new data from cache: */
     271    /* Make sure language data was changed: */
    272272    if (m_pCache->wasChanged())
    273273    {
    274         /* Save from cache: */
     274        /* Save new language data from the cache: */
    275275        if (m_pCache->data().m_strLanguageId != m_pCache->base().m_strLanguageId)
    276276            m_settings.setLanguageId(m_pCache->data().m_strLanguageId);
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetwork.cpp

    r66369 r66460  
    143143void UIItemNetworkNAT::fetchNetworkData(const UIDataSettingsGlobalNetworkNAT &data)
    144144{
    145     /* Get from cache: */
     145    /* Get from the cache: */
    146146    m_data = data;
    147147
     
    152152void UIItemNetworkNAT::uploadNetworkData(UIDataSettingsGlobalNetworkNAT &data)
    153153{
    154     /* Put to cache: */
     154    /* Put to the cache: */
    155155    data = m_data;
    156156}
     
    265265void UIItemNetworkHost::fetchNetworkData(const UIDataSettingsGlobalNetworkHost &data)
    266266{
    267     /* Get from cache: */
     267    /* Get from the cache: */
    268268    m_data = data;
    269269
     
    274274void UIItemNetworkHost::uploadNetworkData(UIDataSettingsGlobalNetworkHost &data)
    275275{
    276     /* Put to cache: */
     276    /* Put to the cache: */
    277277    data = m_data;
    278278}
     
    443443    m_pCache->clear();
    444444
    445     /* Prepare old data: */
     445    /* Prepare old network data: */
    446446    UIDataSettingsGlobalNetwork oldData;
    447447
    448     /* Gather old data: */
     448    /* Gather old network data: */
    449449    foreach (const CNATNetwork &network, vboxGlobal().virtualBox().GetNATNetworks())
    450450    {
     
    461461        }
    462462
    463     /* Cache old data: */
     463    /* Cache old network data: */
    464464    m_pCache->cacheInitialData(oldData);
    465465
     
    470470void UIGlobalSettingsNetwork::getFromCache()
    471471{
    472     /* Get old data from cache: */
     472    /* Get old network data from the cache: */
    473473    const UIDataSettingsGlobalNetwork &oldData = m_pCache->base();
    474474
    475     /* Load old data from cache: */
     475    /* Load old network data from the cache: */
    476476    foreach (const UIDataSettingsGlobalNetworkNAT &network, oldData.m_networksNAT)
    477477        createTreeItemNetworkNAT(network);
     
    491491void UIGlobalSettingsNetwork::putToCache()
    492492{
    493     /* Prepare new data: */
     493    /* Prepare new network data: */
    494494    UIDataSettingsGlobalNetwork newData = m_pCache->base();
    495495
    496     /* Gather new data: */
     496    /* Gather new network data: */
    497497    newData.m_networksNAT.clear();
    498498    for (int iNetworkIndex = 0; iNetworkIndex < m_pTreeNetworkNAT->topLevelItemCount(); ++iNetworkIndex)
     
    512512    }
    513513
    514     /* Cache new data: */
     514    /* Cache new network data: */
    515515    m_pCache->cacheCurrentData(newData);
    516516}
     
    521521    UISettingsPageGlobal::fetchData(data);
    522522
    523     /* Save new data from cache: */
     523    /* Make sure network data was changed: */
    524524    if (m_pCache->wasChanged())
    525525    {
     526        /* Save new network data from the cache: */
    526527        if (m_pCache->data().m_networksNAT != m_pCache->base().m_networksNAT)
    527528            foreach (const UIDataSettingsGlobalNetworkNAT &data, m_pCache->data().m_networksNAT)
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.cpp

    r66343 r66460  
    8686    m_pCache->clear();
    8787
    88     /* Prepare old data: */
     88    /* Prepare old proxy data: */
    8989    UIDataSettingsGlobalProxy oldData;
    9090
    91     /* Gather old data: */
     91    /* Gather old proxy data: */
    9292    UIProxyManager proxyManager(m_settings.proxySettings());
    9393    oldData.m_enmProxyState = proxyManager.proxyState();
     
    9595    oldData.m_strProxyPort = proxyManager.proxyPort();
    9696
    97     /* Cache old data: */
     97    /* Cache old proxy data: */
    9898    m_pCache->cacheInitialData(oldData);
    9999
     
    104104void UIGlobalSettingsProxy::getFromCache()
    105105{
    106     /* Get old data from cache: */
     106    /* Get old proxy data from the cache: */
    107107    const UIDataSettingsGlobalProxy &oldData = m_pCache->base();
    108108
    109     /* Load old data from cache: */
     109    /* Load old proxy data from the cache: */
    110110    switch (oldData.m_enmProxyState)
    111111    {
     
    124124void UIGlobalSettingsProxy::putToCache()
    125125{
    126     /* Prepare new data: */
     126    /* Prepare new proxy data: */
    127127    UIDataSettingsGlobalProxy newData = m_pCache->base();
    128128
    129     /* Gather new data: */
     129    /* Gather new proxy data: */
    130130    newData.m_enmProxyState = m_pRadioProxyEnabled->isChecked()  ? UIProxyManager::ProxyState_Enabled :
    131131                              m_pRadioProxyDisabled->isChecked() ? UIProxyManager::ProxyState_Disabled :
     
    134134    newData.m_strProxyPort = m_pPortEditor->text();
    135135
    136     /* Cache new data: */
     136    /* Cache new proxy data: */
    137137    m_pCache->cacheCurrentData(newData);
    138138}
     
    143143    UISettingsPageGlobal::fetchData(data);
    144144
    145     /* Save new data from cache: */
     145    /* Make sure proxy data was changed: */
    146146    if (m_pCache->wasChanged())
    147147    {
     148        /* Save new proxy data from the cache: */
    148149        UIProxyManager proxyManager;
    149150        proxyManager.setProxyState(m_pCache->data().m_enmProxyState);
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsUpdate.cpp

    r66354 r66460  
    8888    m_pCache->clear();
    8989
    90     /* Prepare old data: */
     90    /* Prepare old update data: */
    9191    UIDataSettingsGlobalUpdate oldData;
    9292
    93     /* Gather old data: */
     93    /* Gather old update data: */
    9494    const VBoxUpdateData updateData(gEDataManager->applicationUpdateData());
    9595    oldData.m_fCheckEnabled = !updateData.isNoNeedToCheck();
     
    9898    oldData.m_strDate = updateData.date();
    9999
    100     /* Cache old data: */
     100    /* Cache old update data: */
    101101    m_pCache->cacheInitialData(oldData);
    102102
     
    107107void UIGlobalSettingsUpdate::getFromCache()
    108108{
    109     /* Get old data from cache: */
     109    /* Get old update data from the cache: */
    110110    const UIDataSettingsGlobalUpdate &oldData = m_pCache->base();
    111111
    112     /* Load old data from cache: */
     112    /* Load old update data from the cache: */
    113113    m_pCheckBoxUpdate->setChecked(oldData.m_fCheckEnabled);
    114114    if (m_pCheckBoxUpdate->isChecked())
     
    128128void UIGlobalSettingsUpdate::putToCache()
    129129{
    130     /* Prepare new data: */
     130    /* Prepare new update data: */
    131131    UIDataSettingsGlobalUpdate newData = m_pCache->base();
    132132
    133     /* Gather new data: */
     133    /* Gather new update data: */
    134134    newData.m_periodIndex = periodType();
    135135    newData.m_branchIndex = branchType();
    136136
    137     /* Cache new data: */
     137    /* Cache new update data: */
    138138    m_pCache->cacheCurrentData(newData);
    139139}
     
    144144    UISettingsPageGlobal::fetchData(data);
    145145
    146     /* Save new data from cache: */
     146    /* Make sure update data was changed: */
    147147    if (m_pCache->wasChanged())
    148148    {
    149         /* Gather corresponding values from internal variables: */
     149        /* Save new update data from the cache: */
    150150        const VBoxUpdateData newData(m_pCache->data().m_periodIndex, m_pCache->data().m_branchIndex);
    151151        gEDataManager->setApplicationUpdateData(newData.data());
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsAudio.cpp

    r66432 r66460  
    115115    const UIDataSettingsMachineAudio &oldAudioData = m_pCache->base();
    116116
    117     /* Load old audio data to the page: */
     117    /* Load old audio data from the cache: */
    118118    m_pCheckBoxAudio->setChecked(oldAudioData.m_fAudioEnabled);
    119119    m_pComboAudioDriver->setCurrentIndex(m_pComboAudioDriver->findData((int)oldAudioData.m_audioDriverType));
     
    209209void UIMachineSettingsAudio::polishPage()
    210210{
    211     /* Polish audio-page availability: */
     211    /* Polish audio page availability: */
    212212    m_pContainerAudioOptions->setEnabled(isMachineOffline());
    213213    m_pContainerAudioSubOptions->setEnabled(m_pCheckBoxAudio->isChecked());
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp

    r66435 r66460  
    273273    const UIDataSettingsMachineDisplay &oldDisplayData = m_pCache->base();
    274274
    275     /* Load old 'Screen' data to the page: */
     275    /* Load old 'Screen' data from the cache: */
    276276    m_pEditorVideoScreenCount->setValue(oldDisplayData.m_cGuestScreenCount);
    277277    m_pEditorGuestScreenScale->setValue((int)(oldDisplayData.m_dScaleFactor * 100));
     
    289289    if (oldDisplayData.m_fRemoteDisplayServerSupported)
    290290    {
    291         /* Load old 'Remote Display' data to the page: */
     291        /* Load old 'Remote Display' data from the cache: */
    292292        m_pCheckboxRemoteDisplay->setChecked(oldDisplayData.m_fRemoteDisplayServerEnabled);
    293293        m_pEditorRemoteDisplayPort->setText(oldDisplayData.m_strRemoteDisplayPort);
     
    297297    }
    298298
    299     /* Load old 'Video Capture' data to the page: */
     299    /* Load old 'Video Capture' data from the cache: */
    300300    m_pCheckboxVideoCapture->setChecked(oldDisplayData.m_fVideoCaptureEnabled);
    301301    m_pEditorVideoCapturePath->setHomeDir(oldDisplayData.m_strVideoCaptureFolder);
     
    319319    UIDataSettingsMachineDisplay newDisplayData;
    320320
    321     /* Gather new 'Screen' data from page: */
     321    /* Gather new 'Screen' data: */
    322322    newDisplayData.m_iCurrentVRAM = m_pEditorVideoMemorySize->value();
    323323    newDisplayData.m_cGuestScreenCount = m_pEditorVideoScreenCount->value();
     
    335335    if (newDisplayData.m_fRemoteDisplayServerSupported)
    336336    {
    337         /* Gather new 'Remote Display' data from page: */
     337        /* Gather new 'Remote Display' data: */
    338338        newDisplayData.m_fRemoteDisplayServerEnabled = m_pCheckboxRemoteDisplay->isChecked();
    339339        newDisplayData.m_strRemoteDisplayPort = m_pEditorRemoteDisplayPort->text();
     
    343343    }
    344344
    345     /* Gather new 'Video Capture' data from page: */
     345    /* Gather new 'Video Capture' data: */
    346346    newDisplayData.m_fVideoCaptureEnabled = m_pCheckboxVideoCapture->isChecked();
    347347    newDisplayData.m_strVideoCaptureFolder = m_pCache->base().m_strVideoCaptureFolder;
     
    681681void UIMachineSettingsDisplay::polishPage()
    682682{
    683     /* Get system data from the cache: */
    684     const UIDataSettingsMachineDisplay &displayData = m_pCache->base();
    685 
    686     /* Screen tab: */
     683    /* Get old display data from the cache: */
     684    const UIDataSettingsMachineDisplay &oldDisplayData = m_pCache->base();
     685
     686    /* Polish 'Screen' availability: */
    687687    m_pLabelVideoMemorySize->setEnabled(isMachineOffline());
    688688    m_pSliderVideoMemorySize->setEnabled(isMachineOffline());
     
    715715#endif /* !VBOX_WITH_VIDEOHWACCEL */
    716716
    717     /* Remote Display tab: */
    718     m_pTabWidget->setTabEnabled(1, displayData.m_fRemoteDisplayServerSupported);
     717    /* Polish 'Remote Display' availability: */
     718    m_pTabWidget->setTabEnabled(1, oldDisplayData.m_fRemoteDisplayServerSupported);
    719719    m_pContainerRemoteDisplay->setEnabled(isMachineInValidMode());
    720720    m_pContainerRemoteDisplayOptions->setEnabled(m_pCheckboxRemoteDisplay->isChecked());
     
    722722    m_pCheckboxMultipleConn->setEnabled(isMachineOffline() || isMachineSaved());
    723723
    724     /* Video Capture tab: */
     724    /* Polish 'Video Capture' availability: */
    725725    m_pContainerVideoCapture->setEnabled(isMachineInValidMode());
    726726    sltHandleVideoCaptureCheckboxToggle();
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.cpp

    r66436 r66460  
    243243    const UIDataSettingsMachineGeneral &oldGeneralData = m_pCache->base();
    244244
    245     /* Load old 'Basic' data to the page: */
     245    /* Load old 'Basic' data from the cache: */
    246246    AssertPtrReturnVoid(m_pNameAndSystemEditor);
    247247    m_pNameAndSystemEditor->setName(oldGeneralData.m_strName);
    248248    m_pNameAndSystemEditor->setType(vboxGlobal().vmGuestOSType(oldGeneralData.m_strGuestOsTypeId));
    249249
    250     /* Load old 'Advanced' data to the page: */
     250    /* Load old 'Advanced' data from the cache: */
    251251    AssertPtrReturnVoid(mPsSnapshot);
    252252    AssertPtrReturnVoid(mCbClipboard);
     
    257257    mCbDragAndDrop->setCurrentIndex(oldGeneralData.m_dndMode);
    258258
    259     /* Load old 'Description' data to the page: */
     259    /* Load old 'Description' data from the cache: */
    260260    AssertPtrReturnVoid(mTeDescription);
    261261    mTeDescription->setPlainText(oldGeneralData.m_strDescription);
    262262
    263     /* Load old 'Encryption' data to the page: */
     263    /* Load old 'Encryption' data from the cache: */
    264264    AssertPtrReturnVoid(m_pCheckBoxEncryption);
    265265    AssertPtrReturnVoid(m_pComboCipher);
     
    281281    UIDataSettingsMachineGeneral newGeneralData;
    282282
    283     /* Gather new 'Basic' data from page: */
     283    /* Gather new 'Basic' data: */
    284284    AssertPtrReturnVoid(m_pNameAndSystemEditor);
    285285    newGeneralData.m_strName = m_pNameAndSystemEditor->name();
    286286    newGeneralData.m_strGuestOsTypeId = m_pNameAndSystemEditor->type().GetId();
    287287
    288     /* Gather new 'Advanced' data from page: */
     288    /* Gather new 'Advanced' data: */
    289289    AssertPtrReturnVoid(mPsSnapshot);
    290290    AssertPtrReturnVoid(mCbClipboard);
     
    294294    newGeneralData.m_dndMode = (KDnDMode)mCbDragAndDrop->currentIndex();
    295295
    296     /* Gather new 'Description' data from page: */
     296    /* Gather new 'Description' data: */
    297297    AssertPtrReturnVoid(mTeDescription);
    298298    newGeneralData.m_strDescription = mTeDescription->toPlainText().isEmpty() ?
    299299                                      QString::null : mTeDescription->toPlainText();
    300300
    301     /* Gather new 'Encryption' data from page: */
     301    /* Gather new 'Encryption' data: */
    302302    AssertPtrReturnVoid(m_pCheckBoxEncryption);
    303303    AssertPtrReturnVoid(m_pComboCipher);
     
    590590void UIMachineSettingsGeneral::polishPage()
    591591{
    592     /* 'Basic' tab: */
     592    /* Polish 'Basic' availability: */
    593593    AssertPtrReturnVoid(m_pNameAndSystemEditor);
    594594    m_pNameAndSystemEditor->setEnabled(isMachineOffline());
    595595
    596     /* 'Advanced' tab: */
     596    /* Polish 'Advanced' availability: */
    597597    AssertPtrReturnVoid(mLbSnapshot);
    598598    AssertPtrReturnVoid(mPsSnapshot);
     
    608608    mCbDragAndDrop->setEnabled(isMachineInValidMode());
    609609
    610     /* 'Description' tab: */
     610    /* Polish 'Description' availability: */
    611611    AssertPtrReturnVoid(mTeDescription);
    612612    mTeDescription->setEnabled(isMachineInValidMode());
    613613
    614     /* 'Encryption' tab: */
     614    /* Polish 'Encryption' availability: */
    615615    AssertPtrReturnVoid(m_pCheckBoxEncryption);
    616616    AssertPtrReturnVoid(m_pWidgetEncryption);
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsInterface.cpp

    r66437 r66460  
    202202    const UIDataSettingsMachineInterface &oldInterfaceData = m_pCache->base();
    203203
    204     /* Load old interface data to the page: */
     204    /* Load old interface data from the cache: */
    205205    m_pStatusBarEditor->setStatusBarEnabled(oldInterfaceData.m_fStatusBarEnabled);
    206206    m_pStatusBarEditor->setStatusBarConfiguration(oldInterfaceData.m_statusBarRestrictions,
     
    237237{
    238238    /* Prepare new interface data: */
    239     UIDataSettingsMachineInterface newInterfaceData = m_pCache->base();
    240 
    241     /* Gather new interface data from page: */
     239    UIDataSettingsMachineInterface newInterfaceData;
     240
     241    /* Gather new interface data: */
    242242    newInterfaceData.m_fStatusBarEnabled = m_pStatusBarEditor->isStatusBarEnabled();
    243243    newInterfaceData.m_statusBarRestrictions = m_pStatusBarEditor->statusBarIndicatorRestrictions();
     
    348348void UIMachineSettingsInterface::polishPage()
    349349{
    350     /* Polish interface availability: */
     350    /* Polish interface page availability: */
    351351    m_pMenuBarEditor->setEnabled(isMachineInValidMode());
    352352#ifdef VBOX_WS_MAC
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.cpp

    r66440 r66460  
    11021102        UIMachineSettingsNetwork *pTab = qobject_cast<UIMachineSettingsNetwork*>(m_pTabWidget->widget(iSlot));
    11031103
    1104         /* Load old adapter data to the page: */
     1104        /* Load old adapter data from the cache: */
    11051105        pTab->loadAdapterData(m_pCache->base().m_adapters.at(iSlot));
    11061106
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsParallel.cpp

    r66441 r66460  
    362362        UIMachineSettingsParallel *pPage = qobject_cast<UIMachineSettingsParallel*>(m_pTabWidget->widget(iPort));
    363363
    364         /* Load old port data to the page: */
     364        /* Load old port data from the cache: */
    365365        pPage->loadPortData(m_pCache->base().m_ports.at(iPort));
    366366
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSF.cpp

    r66453 r66460  
    354354    updateRootItemsVisibility();
    355355
    356     /* For each folder => load it to the page: */
     356    /* For each folder => load it from the cache: */
    357357    for (int iFolderIndex = 0; iFolderIndex < m_pCache->childCount(); ++iFolderIndex)
    358358        addSharedFolderItem(m_pCache->child(iFolderIndex).base(), false /* its new? */);
     
    381381        for (int iFolderIndex = 0; iFolderIndex < pFolderTypeRoot->childCount(); ++iFolderIndex)
    382382        {
    383             /* Get and cache new folder item: */
     383            /* Gather and cache new folder data: */
    384384            const SFTreeViewItem *pItem = static_cast<SFTreeViewItem*>(pFolderTypeRoot->child(iFolderIndex));
    385385            m_pCache->child(pItem->m_strName).cacheCurrentData(*pItem);
     
    396396    UISettingsPageMachine::fetchData(data);
    397397
    398     /* Check if folders data was changed: */
    399     if (m_pCache->wasChanged())
     398    /* Make sure machine is in valid mode & folders data was changed: */
     399    if (isMachineInValidMode() && m_pCache->wasChanged())
    400400    {
    401401        /* For each folder record: */
     
    454454void UIMachineSettingsSF::polishPage()
    455455{
    456     /* Update widgets availability: */
     456    /* Polish shared folders page availability: */
    457457    mNameSeparator->setEnabled(isMachineInValidMode());
    458458    m_pFoldersToolBar->setEnabled(isMachineInValidMode());
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSerial.cpp

    r66442 r66460  
    412412        UIMachineSettingsSerial *pPage = qobject_cast<UIMachineSettingsSerial*>(m_pTabWidget->widget(iPort));
    413413
    414         /* Load old port data to the page: */
     414        /* Load old port data from the cache: */
    415415        pPage->loadPortData(m_pCache->base().m_ports.at(iPort));
    416416
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp

    r66444 r66460  
    22502250    m_pModelStorage->clear();
    22512251
    2252     /* Load old common data to the page: */
     2252    /* Load old common data from the cache: */
    22532253    m_pModelStorage->setMachineId(m_strMachineId);
    22542254
     
    22612261        const UIDataSettingsMachineStorageController &oldControllerData = controllerCache.base();
    22622262
    2263         /* Load old controller data to the page: */
     2263        /* Load old controller data from the cache: */
    22642264        const QModelIndex controllerIndex = m_pModelStorage->addController(oldControllerData.m_strControllerName,
    22652265                                                                           oldControllerData.m_controllerBus,
     
    22772277            const UIDataSettingsMachineStorageAttachment &oldAttachmentData = attachmentCache.base();
    22782278
    2279             /* Load old attachment data to the page: */
     2279            /* Load old attachment data from the cache: */
    22802280            const QModelIndex attachmentIndex = m_pModelStorage->addAttachment(controllerId,
    22812281                                                                               oldAttachmentData.m_attachmentType,
     
    25182518    const KDeviceType enmDevice = m_pModelStorage->data(index, StorageModel::R_AttDevice).value<KDeviceType>();
    25192519
    2520     /* Left pane: */
     2520    /* Polish left pane availability: */
    25212521    mLsLeftPane->setEnabled(isMachineInValidMode());
    25222522    m_pTreeStorage->setEnabled(isMachineInValidMode());
    2523     /* Empty information pane: */
     2523
     2524    /* Polish empty information pane availability: */
    25242525    mLsEmpty->setEnabled(isMachineInValidMode());
    25252526    mLbInfo->setEnabled(isMachineInValidMode());
    2526     /* Controllers pane: */
     2527
     2528    /* Polish controllers pane availability: */
    25272529    mLsParameters->setEnabled(isMachineInValidMode());
    25282530    mLbName->setEnabled(isMachineOffline());
     
    25332535    mSbPortCount->setEnabled(isMachineOffline());
    25342536    mCbIoCache->setEnabled(isMachineOffline());
    2535     /* Attachments pane: */
     2537
     2538    /* Polish attachments pane availability: */
    25362539    mLsAttributes->setEnabled(isMachineInValidMode());
    25372540    mLbMedium->setEnabled(isMachineOffline() || (isMachineOnline() && enmDevice != KDeviceType_HardDisk));
     
    39433946    if (fSuccess)
    39443947    {
    3945         /* Check if storage data was changed: */
    3946         if (m_pCache->wasChanged())
     3948        /* Make sure machine is in valid mode & storage data was changed: */
     3949        if (isMachineInValidMode() && m_pCache->wasChanged())
    39473950        {
    39483951            /* For each controller (removing step): */
     
    41424145    if (fSuccess)
    41434146    {
    4144         /* Get storage controller data from the cache: */
     4147        /* Get old storage controller data from the cache: */
    41454148        const UIDataSettingsMachineStorageController &controllerData = controllerCache.base();
    4146         /* Get storage attachment data from the cache: */
     4149        /* Get old storage attachment data from the cache: */
    41474150        const UIDataSettingsMachineStorageAttachment &attachmentData = attachmentCache.base();
    41484151
     
    41774180    if (fSuccess)
    41784181    {
    4179         /* Get storage controller data from the cache: */
     4182        /* Get new storage controller data from the cache: */
    41804183        const UIDataSettingsMachineStorageController &controllerData = controllerCache.data();
    4181         /* Get storage attachment data from the cache: */
     4184        /* Get new storage attachment data from the cache: */
    41824185        const UIDataSettingsMachineStorageAttachment &attachmentData = attachmentCache.data();
    41834186
     
    42664269    if (fSuccess)
    42674270    {
    4268         /* Get storage controller data from the cache: */
     4271        /* Get new storage controller data from the cache: */
    42694272        const UIDataSettingsMachineStorageController &controllerData = controllerCache.data();
    4270         /* Get current storage attachment data from the cache: */
     4273        /* Get new storage attachment data from the cache: */
    42714274        const UIDataSettingsMachineStorageAttachment &attachmentData = attachmentCache.data();
    42724275
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.cpp

    r66443 r66460  
    282282    repopulateComboPointingHIDType();
    283283
    284     /* Load old 'Motherboard' data to the page: */
     284    /* Load old 'Motherboard' data from the cache: */
    285285    m_pSliderMemorySize->setValue(oldSystemData.m_iMemorySize);
    286286    const int iChipsetTypePosition = m_pComboChipsetType->findData(oldSystemData.m_chipsetType);
     
    303303    }
    304304
    305     /* Load old 'Processor' data to the page: */
     305    /* Load old 'Processor' data from the cache: */
    306306    m_pSliderCPUCount->setValue(oldSystemData.m_cCPUCount);
    307307    m_pSliderCPUExecCap->setValue(oldSystemData.m_iCPUExecCap);
    308308    m_pCheckBoxPAE->setChecked(oldSystemData.m_fEnabledPAE);
    309309
    310     /* Load old 'Acceleration' data to the page: */
     310    /* Load old 'Acceleration' data from the cache: */
    311311    const int iParavirtProviderPosition = m_pComboParavirtProvider->findData(oldSystemData.m_paravirtProvider);
    312312    m_pComboParavirtProvider->setCurrentIndex(iParavirtProviderPosition == -1 ? 0 : iParavirtProviderPosition);
     
    594594void UIMachineSettingsSystem::polishPage()
    595595{
    596     /* Get system data from the cache: */
     596    /* Get old system data from the cache: */
    597597    const UIDataSettingsMachineSystem &systemData = m_pCache->base();
    598598
    599     /* Motherboard tab: */
     599    /* Polish 'Motherboard' availability: */
    600600    m_pLabelMemorySize->setEnabled(isMachineOffline());
    601601    m_pLabelMemoryMin->setEnabled(isMachineOffline());
     
    616616    m_pCheckBoxUseUTC->setEnabled(isMachineOffline());
    617617
    618     /* Processor tab: */
     618    /* Polish 'Processor' availability: */
    619619    m_pLabelCPUCount->setEnabled(isMachineOffline());
    620620    m_pLabelCPUMin->setEnabled(isMachineOffline());
     
    630630    m_pCheckBoxPAE->setEnabled(isMachineOffline() && systemData.m_fSupportedPAE);
    631631
    632     /* Acceleration tab: */
     632    /* Polish 'Acceleration' availability: */
    633633    m_pTabWidgetSystem->setTabEnabled(2, systemData.m_fSupportedHwVirtEx);
    634634    m_pLabelParavirtProvider->setEnabled(isMachineOffline());
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSB.cpp

    r66458 r66460  
    423423    const UIDataSettingsMachineUSB &oldUsbData = m_pCache->base();
    424424
    425     /* Load old USB data to the page: */
     425    /* Load old USB data from the cache: */
    426426    mGbUSB->setChecked(oldUsbData.m_fUSBEnabled);
    427427    switch (oldUsbData.m_USBControllerType)
     
    433433    }
    434434
    435     /* For each filter => load it to the page: */
     435    /* For each filter => load it from the cache: */
    436436    for (int iFilterIndex = 0; iFilterIndex < m_pCache->childCount(); ++iFilterIndex)
    437437        addUSBFilterItem(m_pCache->child(iFilterIndex).base(), false /* its new? */);
     
    471471    for (int iFilterIndex = 0; iFilterIndex < pMainRootItem->childCount(); ++iFilterIndex)
    472472    {
    473         /* Get and cache new filter item: */
     473        /* Gather and cache new filter data: */
    474474        const UIUSBFilterItem *pItem = static_cast<UIUSBFilterItem*>(pMainRootItem->child(iFilterIndex));
    475475        m_pCache->child(iFilterIndex).cacheCurrentData(*pItem);
     
    744744void UIMachineSettingsUSB::polishPage()
    745745{
     746    /* Polish USB page availability: */
    746747    mGbUSB->setEnabled(isMachineOffline());
    747748    mUSBChild->setEnabled(isMachineInValidMode() && mGbUSB->isChecked());
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