Changeset 89323 in vbox for trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsDisplay.cpp
- Timestamp:
- May 27, 2021 2:23:11 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsDisplay.cpp
r86978 r89323 5 5 6 6 /* 7 * Copyright (C) 2012-202 0Oracle Corporation7 * Copyright (C) 2012-2021 Oracle Corporation 8 8 * 9 9 * This file is part of VirtualBox Open Source Edition (OSE), as … … 41 41 bool equal(const UIDataSettingsGlobalDisplay &other) const 42 42 { 43 return true43 return true 44 44 && (m_guiMaximumGuestScreenSizeValue == other.m_guiMaximumGuestScreenSizeValue) 45 45 && (m_fActivateHoveredMachineWindow == other.m_fActivateHoveredMachineWindow) 46 46 && (m_scaleFactors == other.m_scaleFactors) 47 ;47 ; 48 48 } 49 49 … … 61 61 }; 62 62 63 64 /********************************************************************************************************************************* 65 * Class UIGlobalSettingsDisplay implementation. * 66 *********************************************************************************************************************************/ 63 67 64 68 UIGlobalSettingsDisplay::UIGlobalSettingsDisplay() … … 129 133 130 134 /* Update data and failing state: */ 131 setFailed(!saveD isplayData());135 setFailed(!saveData()); 132 136 133 137 /* Upload properties to data: */ … … 240 244 } 241 245 242 bool UIGlobalSettingsDisplay::saveD isplayData()246 bool UIGlobalSettingsDisplay::saveData() 243 247 { 244 248 /* Prepare result: */ 245 249 bool fSuccess = true; 246 250 /* Save display settings from cache: */ 247 if (fSuccess && m_pCache->wasChanged()) 251 if ( fSuccess 252 && m_pCache->wasChanged()) 248 253 { 249 254 /* Get old data from cache: */ … … 253 258 254 259 /* Save maximum guest screen size and policy: */ 255 if (fSuccess && newData.m_guiMaximumGuestScreenSizeValue != oldData.m_guiMaximumGuestScreenSizeValue) 256 gEDataManager->setMaxGuestScreenResolution(newData.m_guiMaximumGuestScreenSizeValue.m_enmPolicy, 257 newData.m_guiMaximumGuestScreenSizeValue.m_size); 260 if ( fSuccess 261 && newData.m_guiMaximumGuestScreenSizeValue != oldData.m_guiMaximumGuestScreenSizeValue) 262 /* fSuccess = */ gEDataManager->setMaxGuestScreenResolution(newData.m_guiMaximumGuestScreenSizeValue.m_enmPolicy, 263 newData.m_guiMaximumGuestScreenSizeValue.m_size); 258 264 /* Save whether hovered machine-window should be activated automatically: */ 259 if (fSuccess && newData.m_fActivateHoveredMachineWindow != oldData.m_fActivateHoveredMachineWindow) 260 gEDataManager->setActivateHoveredMachineWindow(newData.m_fActivateHoveredMachineWindow); 265 if ( fSuccess 266 && newData.m_fActivateHoveredMachineWindow != oldData.m_fActivateHoveredMachineWindow) 267 /* fSuccess = */ gEDataManager->setActivateHoveredMachineWindow(newData.m_fActivateHoveredMachineWindow); 261 268 /* Save guest-screen scale-factor: */ 262 if (fSuccess && newData.m_scaleFactors != oldData.m_scaleFactors) 263 gEDataManager->setScaleFactors(newData.m_scaleFactors, UIExtraDataManager::GlobalID); 269 if ( fSuccess 270 && newData.m_scaleFactors != oldData.m_scaleFactors) 271 /* fSuccess = */ gEDataManager->setScaleFactors(newData.m_scaleFactors, UIExtraDataManager::GlobalID); 264 272 } 265 273 /* Return result: */
Note:
See TracChangeset
for help on using the changeset viewer.