Changeset 51588 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Jun 10, 2014 11:54:07 AM (11 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
r51569 r51588 821 821 } 822 822 823 bool UIExtraDataManager::guestScreenAutoResize(const QString &strID) const 824 { 825 /* 'True' unless feature restricted: */ 826 return !isFeatureRestricted(GUI_AutoresizeGuest, strID); 827 } 828 829 void UIExtraDataManager::setGuestScreenAutoResize(bool fEnabled, const QString &strID) 830 { 831 /* 'False' if feature restricted, null-string otherwise: */ 832 setExtraDataString(GUI_AutoresizeGuest, toFeatureRestricted(!fEnabled), strID); 833 } 834 823 835 MachineCloseAction UIExtraDataManager::defaultMachineCloseAction(const QString &strID) const 824 836 { -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h
r51569 r51588 240 240 void setHostScreenForPassedGuestScreen(int iGuestScreenIndex, int iHostScreenIndex, const QString &strID); 241 241 242 /** Returns whether guest-screen should auto-resize according machine-window size. */ 243 bool guestScreenAutoResize(const QString &strID) const; 244 /** Defines whether guest-screen auto-resize according machine-window size is @a fEnabled. */ 245 void setGuestScreenAutoResize(bool fEnabled, const QString &strID); 246 242 247 /** Returns default machine close action. */ 243 248 MachineCloseAction defaultMachineCloseAction(const QString &strID) const; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r51565 r51588 1141 1141 1142 1142 /* Should guest autoresize? */ 1143 strSettings = machine.GetExtraData(GUI_AutoresizeGuest);1144 1143 QAction *pGuestAutoresizeSwitch = gActionPool->action(UIActionIndexRuntime_Toggle_GuestAutoresize); 1145 pGuestAutoresizeSwitch->setChecked( strSettings != "off");1144 pGuestAutoresizeSwitch->setChecked(gEDataManager->guestScreenAutoResize(vboxGlobal().managedVMUuid())); 1146 1145 1147 1146 /* Should we allow reconfiguration? */ … … 1174 1173 void UISession::saveSessionSettings() 1175 1174 { 1176 /* Get uisession machine: */1177 CMachine machine = session().GetConsole().GetMachine();1178 1179 1175 /* Save extra-data settings: */ 1180 1176 { … … 1183 1179 1184 1180 /* Remember if guest should autoresize: */ 1185 machine.SetExtraData(GUI_AutoresizeGuest, 1186 gActionPool->action(UIActionIndexRuntime_Toggle_GuestAutoresize)->isChecked() ? 1187 QString() : "off"); 1181 gEDataManager->setGuestScreenAutoResize(gActionPool->action(UIActionIndexRuntime_Toggle_GuestAutoresize)->isChecked(), vboxGlobal().managedVMUuid()); 1188 1182 1189 1183 #if 0 /* Disabled for now! */
Note:
See TracChangeset
for help on using the changeset viewer.