Changeset 66460 in vbox
- Timestamp:
- Apr 6, 2017 11:56:30 AM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 114440
- 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 78 78 m_pCache->clear(); 79 79 80 /* Prepare old d ata: */80 /* Prepare old display data: */ 81 81 UIDataSettingsGlobalDisplay oldData; 82 82 83 /* Gather old d ata: */83 /* Gather old display data: */ 84 84 oldData.m_strMaxGuestResolution = m_settings.maxGuestRes(); 85 85 oldData.m_fActivateHoveredMachineWindow = gEDataManager->activateHoveredMachineWindow(); 86 86 87 /* Cache old d ata: */87 /* Cache old display data: */ 88 88 m_pCache->cacheInitialData(oldData); 89 89 … … 94 94 void UIGlobalSettingsDisplay::getFromCache() 95 95 { 96 /* Get old d ata fromcache: */96 /* Get old display data from the cache: */ 97 97 const UIDataSettingsGlobalDisplay &oldData = m_pCache->base(); 98 98 99 /* Load old d ata fromcache: */99 /* Load old display data from the cache: */ 100 100 if ( (oldData.m_strMaxGuestResolution.isEmpty()) 101 101 || (oldData.m_strMaxGuestResolution == "auto")) … … 125 125 void UIGlobalSettingsDisplay::putToCache() 126 126 { 127 /* Prepare new d ata: */127 /* Prepare new display data: */ 128 128 UIDataSettingsGlobalDisplay newData = m_pCache->base(); 129 129 130 /* Gather new d ata: */130 /* Gather new display data: */ 131 131 if (m_pMaxResolutionCombo->itemData(m_pMaxResolutionCombo->currentIndex()).toString() == "auto") 132 132 { … … 148 148 newData.m_fActivateHoveredMachineWindow = m_pCheckBoxActivateOnMouseHover->isChecked(); 149 149 150 /* Cache new d ata: */150 /* Cache new display data: */ 151 151 m_pCache->cacheCurrentData(newData); 152 152 } … … 157 157 UISettingsPageGlobal::fetchData(data); 158 158 159 /* Save new data from cache: */159 /* Make sure display data was changed: */ 160 160 if (m_pCache->wasChanged()) 161 161 { 162 /* Save new display data from the cache: */ 162 163 if (m_pCache->data().m_strMaxGuestResolution != m_pCache->base().m_strMaxGuestResolution) 163 164 m_settings.setMaxGuestRes(m_pCache->data().m_strMaxGuestResolution); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsExtension.cpp
r66354 r66460 277 277 m_pCache->clear(); 278 278 279 /* Prepare old data: */279 /* Prepare old extension data: */ 280 280 UIDataSettingsGlobalExtension oldData; 281 281 282 /* Gather old data: */282 /* Gather old extension data: */ 283 283 const CExtPackVector &packages = vboxGlobal().virtualBox(). 284 284 GetExtensionPackManager().GetInstalledExtPacks(); … … 290 290 } 291 291 292 /* Cache old data: */292 /* Cache old extension data: */ 293 293 m_pCache->cacheInitialData(oldData); 294 294 … … 299 299 void UIGlobalSettingsExtension::getFromCache() 300 300 { 301 /* Get old data fromcache: */301 /* Get old extension data from the cache: */ 302 302 const UIDataSettingsGlobalExtension &oldData = m_pCache->base(); 303 303 304 /* Load old data fromcache: */304 /* Load old extension data from the cache: */ 305 305 foreach (const UIDataSettingsGlobalExtensionItem &item, oldData.m_items) 306 306 new UIExtensionPackageItem(m_pPackagesTree, item); … … 314 314 void UIGlobalSettingsExtension::putToCache() 315 315 { 316 /* Nothing to upload tocache... */316 /* Nothing to cache... */ 317 317 } 318 318 … … 322 322 UISettingsPageGlobal::fetchData(data); 323 323 324 /* Nothing to save from cache... */324 /* Nothing to save from the cache... */ 325 325 326 326 /* Upload properties & settings to data: */ … … 468 468 if (progress.isOk() && progress.GetResultCode() == 0) 469 469 { 470 /* Remove selected package from cache: */470 /* Remove selected package from the cache: */ 471 471 for (int i = 0; i < m_pCache->data().m_items.size(); ++i) 472 472 { -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsGeneral.cpp
r66343 r66460 85 85 m_pCache->clear(); 86 86 87 /* Prepare old data: */87 /* Prepare old general data: */ 88 88 UIDataSettingsGlobalGeneral oldData; 89 89 90 /* Gather old data: */90 /* Gather old general data: */ 91 91 oldData.m_strDefaultMachineFolder = m_properties.GetDefaultMachineFolder(); 92 92 oldData.m_strVRDEAuthLibrary = m_properties.GetVRDEAuthLibrary(); 93 93 oldData.m_fHostScreenSaverDisabled = m_settings.hostScreenSaverDisabled(); 94 94 95 /* Cache old data: */95 /* Cache old general data: */ 96 96 m_pCache->cacheInitialData(oldData); 97 97 … … 102 102 void UIGlobalSettingsGeneral::getFromCache() 103 103 { 104 /* Get old data fromcache: */104 /* Get old general data from the cache: */ 105 105 const UIDataSettingsGlobalGeneral &oldData = m_pCache->base(); 106 106 107 /* Load old data fromcache: */107 /* Load old general data from the cache: */ 108 108 m_pSelectorMachineFolder->setPath(oldData.m_strDefaultMachineFolder); 109 109 m_pSelectorVRDPLibName->setPath(oldData.m_strVRDEAuthLibrary); … … 113 113 void UIGlobalSettingsGeneral::putToCache() 114 114 { 115 /* Prepare new data: */115 /* Prepare new general data: */ 116 116 UIDataSettingsGlobalGeneral newData = m_pCache->base(); 117 117 118 /* Gather new data: */118 /* Gather new general data: */ 119 119 newData.m_strDefaultMachineFolder = m_pSelectorMachineFolder->path(); 120 120 newData.m_strVRDEAuthLibrary = m_pSelectorVRDPLibName->path(); 121 121 newData.m_fHostScreenSaverDisabled = m_pCheckBoxHostScreenSaver->isChecked(); 122 122 123 /* Cache new data: */123 /* Cache new general data: */ 124 124 m_pCache->cacheCurrentData(newData); 125 125 } … … 130 130 UISettingsPageGlobal::fetchData(data); 131 131 132 /* Save new data from cache: */132 /* Make sure general data was changed: */ 133 133 if (m_pCache->wasChanged()) 134 134 { 135 /* Save new general data from the cache: */ 135 136 if ( m_properties.isOk() 136 137 && m_pCache->data().m_strDefaultMachineFolder != m_pCache->base().m_strDefaultMachineFolder) -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsInput.cpp
r66354 r66460 888 888 m_pCache->clear(); 889 889 890 /* Prepare old data: */890 /* Prepare old input data: */ 891 891 UIDataSettingsGlobalInput oldData; 892 892 893 /* Gather old data: */893 /* Gather old input data: */ 894 894 oldData.shortcuts() << UIDataShortcutRow(m_pMachineTable, UIHostCombo::hostComboCacheKey(), tr("Host Key Combination"), m_settings.hostCombo(), QString()); 895 895 const QMap<QString, UIShortcut> &shortcuts = gShortcutPool->shortcuts(); … … 907 907 oldData.setAutoCapture(m_settings.autoCapture()); 908 908 909 /* Cache old data: */909 /* Cache old input data: */ 910 910 m_pCache->cacheInitialData(oldData); 911 911 … … 916 916 void UIGlobalSettingsInput::getFromCache() 917 917 { 918 /* Get old data fromcache: */918 /* Get old input data from the cache: */ 919 919 const UIDataSettingsGlobalInput &oldData = m_pCache->base(); 920 920 921 /* Load old data fromcache: */921 /* Load old input data from the cache: */ 922 922 m_pSelectorModel->load(oldData.shortcuts()); 923 923 m_pMachineModel->load(oldData.shortcuts()); … … 930 930 void UIGlobalSettingsInput::putToCache() 931 931 { 932 /* Prepare new data: */932 /* Prepare new input data: */ 933 933 UIDataSettingsGlobalInput newData = m_pCache->base(); 934 934 935 /* Gather new data: */935 /* Gather new input data: */ 936 936 m_pSelectorModel->save(newData.shortcuts()); 937 937 m_pMachineModel->save(newData.shortcuts()); 938 938 newData.setAutoCapture(m_pEnableAutoGrabCheckbox->isChecked()); 939 939 940 /* Cache new data: */940 /* Cache new input data: */ 941 941 m_pCache->cacheCurrentData(newData); 942 942 } … … 947 947 UISettingsPageGlobal::fetchData(data); 948 948 949 /* Save new data from cache: */949 /* Make sure input data was changed: */ 950 950 if (m_pCache->wasChanged()) 951 951 { 952 /* Save host-combo shortcut fromcache: */952 /* Save new host-combo shortcut from the cache: */ 953 953 const UIDataShortcutRow fakeHostComboItem(0, UIHostCombo::hostComboCacheKey(), QString(), QString(), QString()); 954 954 const int iHostComboItemBase = UIFunctorFindShortcut(UIFunctorFindShortcut::Base)(m_pCache->base().shortcuts(), fakeHostComboItem); … … 959 959 m_settings.setHostCombo(strHostComboData); 960 960 961 /* Save other shortcut sequences fromcache: */961 /* Save other new shortcuts from the cache: */ 962 962 QMap<QString, QString> sequencesBase; 963 963 QMap<QString, QString> sequencesData; … … 969 969 gShortcutPool->setOverrides(sequencesData); 970 970 971 /* Save other things fromcache: */971 /* Save other new things from the cache: */ 972 972 if (m_pCache->data().autoCapture() != m_pCache->base().autoCapture()) 973 973 m_settings.setAutoCapture(m_pCache->data().autoCapture()); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsLanguage.cpp
r66343 r66460 227 227 m_pCache->clear(); 228 228 229 /* Prepare old data: */229 /* Prepare old language data: */ 230 230 UIDataSettingsGlobalLanguage oldData; 231 231 232 /* Gather old data: */232 /* Gather old language data: */ 233 233 oldData.m_strLanguageId = m_settings.languageId(); 234 234 235 /* Cache old data: */235 /* Cache old language data: */ 236 236 m_pCache->cacheInitialData(oldData); 237 237 … … 242 242 void UIGlobalSettingsLanguage::getFromCache() 243 243 { 244 /* Get old data fromcache: */244 /* Get old language data from the cache: */ 245 245 const UIDataSettingsGlobalLanguage &oldData = m_pCache->base(); 246 246 247 /* Load old data fromcache: */247 /* Load old language data from the cache: */ 248 248 reloadLanguageTree(oldData.m_strLanguageId); 249 249 } … … 251 251 void UIGlobalSettingsLanguage::putToCache() 252 252 { 253 /* Prepare new data: */253 /* Prepare new language data: */ 254 254 UIDataSettingsGlobalLanguage newData = m_pCache->base(); 255 255 256 /* Gather new data: */256 /* Gather new language data: */ 257 257 QTreeWidgetItem *pCurrentItem = m_pLanguageTree->currentItem(); 258 258 Assert(pCurrentItem); … … 260 260 newData.m_strLanguageId = pCurrentItem->text(1); 261 261 262 /* Cache new data: */262 /* Cache new language data: */ 263 263 m_pCache->cacheCurrentData(newData); 264 264 } … … 269 269 UISettingsPageGlobal::fetchData(data); 270 270 271 /* Save new data from cache: */271 /* Make sure language data was changed: */ 272 272 if (m_pCache->wasChanged()) 273 273 { 274 /* Save fromcache: */274 /* Save new language data from the cache: */ 275 275 if (m_pCache->data().m_strLanguageId != m_pCache->base().m_strLanguageId) 276 276 m_settings.setLanguageId(m_pCache->data().m_strLanguageId); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsNetwork.cpp
r66369 r66460 143 143 void UIItemNetworkNAT::fetchNetworkData(const UIDataSettingsGlobalNetworkNAT &data) 144 144 { 145 /* Get from cache: */145 /* Get from the cache: */ 146 146 m_data = data; 147 147 … … 152 152 void UIItemNetworkNAT::uploadNetworkData(UIDataSettingsGlobalNetworkNAT &data) 153 153 { 154 /* Put to cache: */154 /* Put to the cache: */ 155 155 data = m_data; 156 156 } … … 265 265 void UIItemNetworkHost::fetchNetworkData(const UIDataSettingsGlobalNetworkHost &data) 266 266 { 267 /* Get from cache: */267 /* Get from the cache: */ 268 268 m_data = data; 269 269 … … 274 274 void UIItemNetworkHost::uploadNetworkData(UIDataSettingsGlobalNetworkHost &data) 275 275 { 276 /* Put to cache: */276 /* Put to the cache: */ 277 277 data = m_data; 278 278 } … … 443 443 m_pCache->clear(); 444 444 445 /* Prepare old data: */445 /* Prepare old network data: */ 446 446 UIDataSettingsGlobalNetwork oldData; 447 447 448 /* Gather old data: */448 /* Gather old network data: */ 449 449 foreach (const CNATNetwork &network, vboxGlobal().virtualBox().GetNATNetworks()) 450 450 { … … 461 461 } 462 462 463 /* Cache old data: */463 /* Cache old network data: */ 464 464 m_pCache->cacheInitialData(oldData); 465 465 … … 470 470 void UIGlobalSettingsNetwork::getFromCache() 471 471 { 472 /* Get old data fromcache: */472 /* Get old network data from the cache: */ 473 473 const UIDataSettingsGlobalNetwork &oldData = m_pCache->base(); 474 474 475 /* Load old data fromcache: */475 /* Load old network data from the cache: */ 476 476 foreach (const UIDataSettingsGlobalNetworkNAT &network, oldData.m_networksNAT) 477 477 createTreeItemNetworkNAT(network); … … 491 491 void UIGlobalSettingsNetwork::putToCache() 492 492 { 493 /* Prepare new data: */493 /* Prepare new network data: */ 494 494 UIDataSettingsGlobalNetwork newData = m_pCache->base(); 495 495 496 /* Gather new data: */496 /* Gather new network data: */ 497 497 newData.m_networksNAT.clear(); 498 498 for (int iNetworkIndex = 0; iNetworkIndex < m_pTreeNetworkNAT->topLevelItemCount(); ++iNetworkIndex) … … 512 512 } 513 513 514 /* Cache new data: */514 /* Cache new network data: */ 515 515 m_pCache->cacheCurrentData(newData); 516 516 } … … 521 521 UISettingsPageGlobal::fetchData(data); 522 522 523 /* Save new data from cache: */523 /* Make sure network data was changed: */ 524 524 if (m_pCache->wasChanged()) 525 525 { 526 /* Save new network data from the cache: */ 526 527 if (m_pCache->data().m_networksNAT != m_pCache->base().m_networksNAT) 527 528 foreach (const UIDataSettingsGlobalNetworkNAT &data, m_pCache->data().m_networksNAT) -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsProxy.cpp
r66343 r66460 86 86 m_pCache->clear(); 87 87 88 /* Prepare old data: */88 /* Prepare old proxy data: */ 89 89 UIDataSettingsGlobalProxy oldData; 90 90 91 /* Gather old data: */91 /* Gather old proxy data: */ 92 92 UIProxyManager proxyManager(m_settings.proxySettings()); 93 93 oldData.m_enmProxyState = proxyManager.proxyState(); … … 95 95 oldData.m_strProxyPort = proxyManager.proxyPort(); 96 96 97 /* Cache old data: */97 /* Cache old proxy data: */ 98 98 m_pCache->cacheInitialData(oldData); 99 99 … … 104 104 void UIGlobalSettingsProxy::getFromCache() 105 105 { 106 /* Get old data fromcache: */106 /* Get old proxy data from the cache: */ 107 107 const UIDataSettingsGlobalProxy &oldData = m_pCache->base(); 108 108 109 /* Load old data fromcache: */109 /* Load old proxy data from the cache: */ 110 110 switch (oldData.m_enmProxyState) 111 111 { … … 124 124 void UIGlobalSettingsProxy::putToCache() 125 125 { 126 /* Prepare new data: */126 /* Prepare new proxy data: */ 127 127 UIDataSettingsGlobalProxy newData = m_pCache->base(); 128 128 129 /* Gather new data: */129 /* Gather new proxy data: */ 130 130 newData.m_enmProxyState = m_pRadioProxyEnabled->isChecked() ? UIProxyManager::ProxyState_Enabled : 131 131 m_pRadioProxyDisabled->isChecked() ? UIProxyManager::ProxyState_Disabled : … … 134 134 newData.m_strProxyPort = m_pPortEditor->text(); 135 135 136 /* Cache new data: */136 /* Cache new proxy data: */ 137 137 m_pCache->cacheCurrentData(newData); 138 138 } … … 143 143 UISettingsPageGlobal::fetchData(data); 144 144 145 /* Save new data from cache: */145 /* Make sure proxy data was changed: */ 146 146 if (m_pCache->wasChanged()) 147 147 { 148 /* Save new proxy data from the cache: */ 148 149 UIProxyManager proxyManager; 149 150 proxyManager.setProxyState(m_pCache->data().m_enmProxyState); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsUpdate.cpp
r66354 r66460 88 88 m_pCache->clear(); 89 89 90 /* Prepare old data: */90 /* Prepare old update data: */ 91 91 UIDataSettingsGlobalUpdate oldData; 92 92 93 /* Gather old data: */93 /* Gather old update data: */ 94 94 const VBoxUpdateData updateData(gEDataManager->applicationUpdateData()); 95 95 oldData.m_fCheckEnabled = !updateData.isNoNeedToCheck(); … … 98 98 oldData.m_strDate = updateData.date(); 99 99 100 /* Cache old data: */100 /* Cache old update data: */ 101 101 m_pCache->cacheInitialData(oldData); 102 102 … … 107 107 void UIGlobalSettingsUpdate::getFromCache() 108 108 { 109 /* Get old data fromcache: */109 /* Get old update data from the cache: */ 110 110 const UIDataSettingsGlobalUpdate &oldData = m_pCache->base(); 111 111 112 /* Load old data fromcache: */112 /* Load old update data from the cache: */ 113 113 m_pCheckBoxUpdate->setChecked(oldData.m_fCheckEnabled); 114 114 if (m_pCheckBoxUpdate->isChecked()) … … 128 128 void UIGlobalSettingsUpdate::putToCache() 129 129 { 130 /* Prepare new data: */130 /* Prepare new update data: */ 131 131 UIDataSettingsGlobalUpdate newData = m_pCache->base(); 132 132 133 /* Gather new data: */133 /* Gather new update data: */ 134 134 newData.m_periodIndex = periodType(); 135 135 newData.m_branchIndex = branchType(); 136 136 137 /* Cache new data: */137 /* Cache new update data: */ 138 138 m_pCache->cacheCurrentData(newData); 139 139 } … … 144 144 UISettingsPageGlobal::fetchData(data); 145 145 146 /* Save new data from cache: */146 /* Make sure update data was changed: */ 147 147 if (m_pCache->wasChanged()) 148 148 { 149 /* Gather corresponding values from internal variables: */149 /* Save new update data from the cache: */ 150 150 const VBoxUpdateData newData(m_pCache->data().m_periodIndex, m_pCache->data().m_branchIndex); 151 151 gEDataManager->setApplicationUpdateData(newData.data()); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsAudio.cpp
r66432 r66460 115 115 const UIDataSettingsMachineAudio &oldAudioData = m_pCache->base(); 116 116 117 /* Load old audio data to the page: */117 /* Load old audio data from the cache: */ 118 118 m_pCheckBoxAudio->setChecked(oldAudioData.m_fAudioEnabled); 119 119 m_pComboAudioDriver->setCurrentIndex(m_pComboAudioDriver->findData((int)oldAudioData.m_audioDriverType)); … … 209 209 void UIMachineSettingsAudio::polishPage() 210 210 { 211 /* Polish audio -page availability: */211 /* Polish audio page availability: */ 212 212 m_pContainerAudioOptions->setEnabled(isMachineOffline()); 213 213 m_pContainerAudioSubOptions->setEnabled(m_pCheckBoxAudio->isChecked()); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsDisplay.cpp
r66435 r66460 273 273 const UIDataSettingsMachineDisplay &oldDisplayData = m_pCache->base(); 274 274 275 /* Load old 'Screen' data to the page: */275 /* Load old 'Screen' data from the cache: */ 276 276 m_pEditorVideoScreenCount->setValue(oldDisplayData.m_cGuestScreenCount); 277 277 m_pEditorGuestScreenScale->setValue((int)(oldDisplayData.m_dScaleFactor * 100)); … … 289 289 if (oldDisplayData.m_fRemoteDisplayServerSupported) 290 290 { 291 /* Load old 'Remote Display' data to the page: */291 /* Load old 'Remote Display' data from the cache: */ 292 292 m_pCheckboxRemoteDisplay->setChecked(oldDisplayData.m_fRemoteDisplayServerEnabled); 293 293 m_pEditorRemoteDisplayPort->setText(oldDisplayData.m_strRemoteDisplayPort); … … 297 297 } 298 298 299 /* Load old 'Video Capture' data to the page: */299 /* Load old 'Video Capture' data from the cache: */ 300 300 m_pCheckboxVideoCapture->setChecked(oldDisplayData.m_fVideoCaptureEnabled); 301 301 m_pEditorVideoCapturePath->setHomeDir(oldDisplayData.m_strVideoCaptureFolder); … … 319 319 UIDataSettingsMachineDisplay newDisplayData; 320 320 321 /* Gather new 'Screen' data from page: */321 /* Gather new 'Screen' data: */ 322 322 newDisplayData.m_iCurrentVRAM = m_pEditorVideoMemorySize->value(); 323 323 newDisplayData.m_cGuestScreenCount = m_pEditorVideoScreenCount->value(); … … 335 335 if (newDisplayData.m_fRemoteDisplayServerSupported) 336 336 { 337 /* Gather new 'Remote Display' data from page: */337 /* Gather new 'Remote Display' data: */ 338 338 newDisplayData.m_fRemoteDisplayServerEnabled = m_pCheckboxRemoteDisplay->isChecked(); 339 339 newDisplayData.m_strRemoteDisplayPort = m_pEditorRemoteDisplayPort->text(); … … 343 343 } 344 344 345 /* Gather new 'Video Capture' data from page: */345 /* Gather new 'Video Capture' data: */ 346 346 newDisplayData.m_fVideoCaptureEnabled = m_pCheckboxVideoCapture->isChecked(); 347 347 newDisplayData.m_strVideoCaptureFolder = m_pCache->base().m_strVideoCaptureFolder; … … 681 681 void UIMachineSettingsDisplay::polishPage() 682 682 { 683 /* Get systemdata 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: */ 687 687 m_pLabelVideoMemorySize->setEnabled(isMachineOffline()); 688 688 m_pSliderVideoMemorySize->setEnabled(isMachineOffline()); … … 715 715 #endif /* !VBOX_WITH_VIDEOHWACCEL */ 716 716 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); 719 719 m_pContainerRemoteDisplay->setEnabled(isMachineInValidMode()); 720 720 m_pContainerRemoteDisplayOptions->setEnabled(m_pCheckboxRemoteDisplay->isChecked()); … … 722 722 m_pCheckboxMultipleConn->setEnabled(isMachineOffline() || isMachineSaved()); 723 723 724 /* Video Capture tab: */724 /* Polish 'Video Capture' availability: */ 725 725 m_pContainerVideoCapture->setEnabled(isMachineInValidMode()); 726 726 sltHandleVideoCaptureCheckboxToggle(); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsGeneral.cpp
r66436 r66460 243 243 const UIDataSettingsMachineGeneral &oldGeneralData = m_pCache->base(); 244 244 245 /* Load old 'Basic' data to the page: */245 /* Load old 'Basic' data from the cache: */ 246 246 AssertPtrReturnVoid(m_pNameAndSystemEditor); 247 247 m_pNameAndSystemEditor->setName(oldGeneralData.m_strName); 248 248 m_pNameAndSystemEditor->setType(vboxGlobal().vmGuestOSType(oldGeneralData.m_strGuestOsTypeId)); 249 249 250 /* Load old 'Advanced' data to the page: */250 /* Load old 'Advanced' data from the cache: */ 251 251 AssertPtrReturnVoid(mPsSnapshot); 252 252 AssertPtrReturnVoid(mCbClipboard); … … 257 257 mCbDragAndDrop->setCurrentIndex(oldGeneralData.m_dndMode); 258 258 259 /* Load old 'Description' data to the page: */259 /* Load old 'Description' data from the cache: */ 260 260 AssertPtrReturnVoid(mTeDescription); 261 261 mTeDescription->setPlainText(oldGeneralData.m_strDescription); 262 262 263 /* Load old 'Encryption' data to the page: */263 /* Load old 'Encryption' data from the cache: */ 264 264 AssertPtrReturnVoid(m_pCheckBoxEncryption); 265 265 AssertPtrReturnVoid(m_pComboCipher); … … 281 281 UIDataSettingsMachineGeneral newGeneralData; 282 282 283 /* Gather new 'Basic' data from page: */283 /* Gather new 'Basic' data: */ 284 284 AssertPtrReturnVoid(m_pNameAndSystemEditor); 285 285 newGeneralData.m_strName = m_pNameAndSystemEditor->name(); 286 286 newGeneralData.m_strGuestOsTypeId = m_pNameAndSystemEditor->type().GetId(); 287 287 288 /* Gather new 'Advanced' data from page: */288 /* Gather new 'Advanced' data: */ 289 289 AssertPtrReturnVoid(mPsSnapshot); 290 290 AssertPtrReturnVoid(mCbClipboard); … … 294 294 newGeneralData.m_dndMode = (KDnDMode)mCbDragAndDrop->currentIndex(); 295 295 296 /* Gather new 'Description' data from page: */296 /* Gather new 'Description' data: */ 297 297 AssertPtrReturnVoid(mTeDescription); 298 298 newGeneralData.m_strDescription = mTeDescription->toPlainText().isEmpty() ? 299 299 QString::null : mTeDescription->toPlainText(); 300 300 301 /* Gather new 'Encryption' data from page: */301 /* Gather new 'Encryption' data: */ 302 302 AssertPtrReturnVoid(m_pCheckBoxEncryption); 303 303 AssertPtrReturnVoid(m_pComboCipher); … … 590 590 void UIMachineSettingsGeneral::polishPage() 591 591 { 592 /* 'Basic' tab: */592 /* Polish 'Basic' availability: */ 593 593 AssertPtrReturnVoid(m_pNameAndSystemEditor); 594 594 m_pNameAndSystemEditor->setEnabled(isMachineOffline()); 595 595 596 /* 'Advanced' tab: */596 /* Polish 'Advanced' availability: */ 597 597 AssertPtrReturnVoid(mLbSnapshot); 598 598 AssertPtrReturnVoid(mPsSnapshot); … … 608 608 mCbDragAndDrop->setEnabled(isMachineInValidMode()); 609 609 610 /* 'Description' tab: */610 /* Polish 'Description' availability: */ 611 611 AssertPtrReturnVoid(mTeDescription); 612 612 mTeDescription->setEnabled(isMachineInValidMode()); 613 613 614 /* 'Encryption' tab: */614 /* Polish 'Encryption' availability: */ 615 615 AssertPtrReturnVoid(m_pCheckBoxEncryption); 616 616 AssertPtrReturnVoid(m_pWidgetEncryption); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsInterface.cpp
r66437 r66460 202 202 const UIDataSettingsMachineInterface &oldInterfaceData = m_pCache->base(); 203 203 204 /* Load old interface data to the page: */204 /* Load old interface data from the cache: */ 205 205 m_pStatusBarEditor->setStatusBarEnabled(oldInterfaceData.m_fStatusBarEnabled); 206 206 m_pStatusBarEditor->setStatusBarConfiguration(oldInterfaceData.m_statusBarRestrictions, … … 237 237 { 238 238 /* 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: */ 242 242 newInterfaceData.m_fStatusBarEnabled = m_pStatusBarEditor->isStatusBarEnabled(); 243 243 newInterfaceData.m_statusBarRestrictions = m_pStatusBarEditor->statusBarIndicatorRestrictions(); … … 348 348 void UIMachineSettingsInterface::polishPage() 349 349 { 350 /* Polish interface availability: */350 /* Polish interface page availability: */ 351 351 m_pMenuBarEditor->setEnabled(isMachineInValidMode()); 352 352 #ifdef VBOX_WS_MAC -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsNetwork.cpp
r66440 r66460 1102 1102 UIMachineSettingsNetwork *pTab = qobject_cast<UIMachineSettingsNetwork*>(m_pTabWidget->widget(iSlot)); 1103 1103 1104 /* Load old adapter data to the page: */1104 /* Load old adapter data from the cache: */ 1105 1105 pTab->loadAdapterData(m_pCache->base().m_adapters.at(iSlot)); 1106 1106 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsParallel.cpp
r66441 r66460 362 362 UIMachineSettingsParallel *pPage = qobject_cast<UIMachineSettingsParallel*>(m_pTabWidget->widget(iPort)); 363 363 364 /* Load old port data to the page: */364 /* Load old port data from the cache: */ 365 365 pPage->loadPortData(m_pCache->base().m_ports.at(iPort)); 366 366 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSF.cpp
r66453 r66460 354 354 updateRootItemsVisibility(); 355 355 356 /* For each folder => load it to the page: */356 /* For each folder => load it from the cache: */ 357 357 for (int iFolderIndex = 0; iFolderIndex < m_pCache->childCount(); ++iFolderIndex) 358 358 addSharedFolderItem(m_pCache->child(iFolderIndex).base(), false /* its new? */); … … 381 381 for (int iFolderIndex = 0; iFolderIndex < pFolderTypeRoot->childCount(); ++iFolderIndex) 382 382 { 383 /* G et and cache new folder item: */383 /* Gather and cache new folder data: */ 384 384 const SFTreeViewItem *pItem = static_cast<SFTreeViewItem*>(pFolderTypeRoot->child(iFolderIndex)); 385 385 m_pCache->child(pItem->m_strName).cacheCurrentData(*pItem); … … 396 396 UISettingsPageMachine::fetchData(data); 397 397 398 /* Check iffolders 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()) 400 400 { 401 401 /* For each folder record: */ … … 454 454 void UIMachineSettingsSF::polishPage() 455 455 { 456 /* Update widgetsavailability: */456 /* Polish shared folders page availability: */ 457 457 mNameSeparator->setEnabled(isMachineInValidMode()); 458 458 m_pFoldersToolBar->setEnabled(isMachineInValidMode()); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSerial.cpp
r66442 r66460 412 412 UIMachineSettingsSerial *pPage = qobject_cast<UIMachineSettingsSerial*>(m_pTabWidget->widget(iPort)); 413 413 414 /* Load old port data to the page: */414 /* Load old port data from the cache: */ 415 415 pPage->loadPortData(m_pCache->base().m_ports.at(iPort)); 416 416 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp
r66444 r66460 2250 2250 m_pModelStorage->clear(); 2251 2251 2252 /* Load old common data to the page: */2252 /* Load old common data from the cache: */ 2253 2253 m_pModelStorage->setMachineId(m_strMachineId); 2254 2254 … … 2261 2261 const UIDataSettingsMachineStorageController &oldControllerData = controllerCache.base(); 2262 2262 2263 /* Load old controller data to the page: */2263 /* Load old controller data from the cache: */ 2264 2264 const QModelIndex controllerIndex = m_pModelStorage->addController(oldControllerData.m_strControllerName, 2265 2265 oldControllerData.m_controllerBus, … … 2277 2277 const UIDataSettingsMachineStorageAttachment &oldAttachmentData = attachmentCache.base(); 2278 2278 2279 /* Load old attachment data to the page: */2279 /* Load old attachment data from the cache: */ 2280 2280 const QModelIndex attachmentIndex = m_pModelStorage->addAttachment(controllerId, 2281 2281 oldAttachmentData.m_attachmentType, … … 2518 2518 const KDeviceType enmDevice = m_pModelStorage->data(index, StorageModel::R_AttDevice).value<KDeviceType>(); 2519 2519 2520 /* Left pane: */2520 /* Polish left pane availability: */ 2521 2521 mLsLeftPane->setEnabled(isMachineInValidMode()); 2522 2522 m_pTreeStorage->setEnabled(isMachineInValidMode()); 2523 /* Empty information pane: */ 2523 2524 /* Polish empty information pane availability: */ 2524 2525 mLsEmpty->setEnabled(isMachineInValidMode()); 2525 2526 mLbInfo->setEnabled(isMachineInValidMode()); 2526 /* Controllers pane: */ 2527 2528 /* Polish controllers pane availability: */ 2527 2529 mLsParameters->setEnabled(isMachineInValidMode()); 2528 2530 mLbName->setEnabled(isMachineOffline()); … … 2533 2535 mSbPortCount->setEnabled(isMachineOffline()); 2534 2536 mCbIoCache->setEnabled(isMachineOffline()); 2535 /* Attachments pane: */ 2537 2538 /* Polish attachments pane availability: */ 2536 2539 mLsAttributes->setEnabled(isMachineInValidMode()); 2537 2540 mLbMedium->setEnabled(isMachineOffline() || (isMachineOnline() && enmDevice != KDeviceType_HardDisk)); … … 3943 3946 if (fSuccess) 3944 3947 { 3945 /* Check ifstorage 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()) 3947 3950 { 3948 3951 /* For each controller (removing step): */ … … 4142 4145 if (fSuccess) 4143 4146 { 4144 /* Get storage controller data from the cache: */4147 /* Get old storage controller data from the cache: */ 4145 4148 const UIDataSettingsMachineStorageController &controllerData = controllerCache.base(); 4146 /* Get storage attachment data from the cache: */4149 /* Get old storage attachment data from the cache: */ 4147 4150 const UIDataSettingsMachineStorageAttachment &attachmentData = attachmentCache.base(); 4148 4151 … … 4177 4180 if (fSuccess) 4178 4181 { 4179 /* Get storage controller data from the cache: */4182 /* Get new storage controller data from the cache: */ 4180 4183 const UIDataSettingsMachineStorageController &controllerData = controllerCache.data(); 4181 /* Get storage attachment data from the cache: */4184 /* Get new storage attachment data from the cache: */ 4182 4185 const UIDataSettingsMachineStorageAttachment &attachmentData = attachmentCache.data(); 4183 4186 … … 4266 4269 if (fSuccess) 4267 4270 { 4268 /* Get storage controller data from the cache: */4271 /* Get new storage controller data from the cache: */ 4269 4272 const UIDataSettingsMachineStorageController &controllerData = controllerCache.data(); 4270 /* Get currentstorage attachment data from the cache: */4273 /* Get new storage attachment data from the cache: */ 4271 4274 const UIDataSettingsMachineStorageAttachment &attachmentData = attachmentCache.data(); 4272 4275 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.cpp
r66443 r66460 282 282 repopulateComboPointingHIDType(); 283 283 284 /* Load old 'Motherboard' data to the page: */284 /* Load old 'Motherboard' data from the cache: */ 285 285 m_pSliderMemorySize->setValue(oldSystemData.m_iMemorySize); 286 286 const int iChipsetTypePosition = m_pComboChipsetType->findData(oldSystemData.m_chipsetType); … … 303 303 } 304 304 305 /* Load old 'Processor' data to the page: */305 /* Load old 'Processor' data from the cache: */ 306 306 m_pSliderCPUCount->setValue(oldSystemData.m_cCPUCount); 307 307 m_pSliderCPUExecCap->setValue(oldSystemData.m_iCPUExecCap); 308 308 m_pCheckBoxPAE->setChecked(oldSystemData.m_fEnabledPAE); 309 309 310 /* Load old 'Acceleration' data to the page: */310 /* Load old 'Acceleration' data from the cache: */ 311 311 const int iParavirtProviderPosition = m_pComboParavirtProvider->findData(oldSystemData.m_paravirtProvider); 312 312 m_pComboParavirtProvider->setCurrentIndex(iParavirtProviderPosition == -1 ? 0 : iParavirtProviderPosition); … … 594 594 void UIMachineSettingsSystem::polishPage() 595 595 { 596 /* Get system data from the cache: */596 /* Get old system data from the cache: */ 597 597 const UIDataSettingsMachineSystem &systemData = m_pCache->base(); 598 598 599 /* Motherboard tab: */599 /* Polish 'Motherboard' availability: */ 600 600 m_pLabelMemorySize->setEnabled(isMachineOffline()); 601 601 m_pLabelMemoryMin->setEnabled(isMachineOffline()); … … 616 616 m_pCheckBoxUseUTC->setEnabled(isMachineOffline()); 617 617 618 /* P rocessor tab: */618 /* Polish 'Processor' availability: */ 619 619 m_pLabelCPUCount->setEnabled(isMachineOffline()); 620 620 m_pLabelCPUMin->setEnabled(isMachineOffline()); … … 630 630 m_pCheckBoxPAE->setEnabled(isMachineOffline() && systemData.m_fSupportedPAE); 631 631 632 /* Acceleration tab: */632 /* Polish 'Acceleration' availability: */ 633 633 m_pTabWidgetSystem->setTabEnabled(2, systemData.m_fSupportedHwVirtEx); 634 634 m_pLabelParavirtProvider->setEnabled(isMachineOffline()); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsUSB.cpp
r66458 r66460 423 423 const UIDataSettingsMachineUSB &oldUsbData = m_pCache->base(); 424 424 425 /* Load old USB data to the page: */425 /* Load old USB data from the cache: */ 426 426 mGbUSB->setChecked(oldUsbData.m_fUSBEnabled); 427 427 switch (oldUsbData.m_USBControllerType) … … 433 433 } 434 434 435 /* For each filter => load it to the page: */435 /* For each filter => load it from the cache: */ 436 436 for (int iFilterIndex = 0; iFilterIndex < m_pCache->childCount(); ++iFilterIndex) 437 437 addUSBFilterItem(m_pCache->child(iFilterIndex).base(), false /* its new? */); … … 471 471 for (int iFilterIndex = 0; iFilterIndex < pMainRootItem->childCount(); ++iFilterIndex) 472 472 { 473 /* G et and cache new filter item: */473 /* Gather and cache new filter data: */ 474 474 const UIUSBFilterItem *pItem = static_cast<UIUSBFilterItem*>(pMainRootItem->child(iFilterIndex)); 475 475 m_pCache->child(iFilterIndex).cacheCurrentData(*pItem); … … 744 744 void UIMachineSettingsUSB::polishPage() 745 745 { 746 /* Polish USB page availability: */ 746 747 mGbUSB->setEnabled(isMachineOffline()); 747 748 mUSBChild->setEnabled(isMachineInValidMode() && mGbUSB->isChecked());
Note:
See TracChangeset
for help on using the changeset viewer.