Changeset 91713 in vbox
- Timestamp:
- Oct 13, 2021 12:13:47 PM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 1 deleted
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/Makefile.kmk
r91709 r91713 299 299 ./src/wizards/exportappliance \ 300 300 ./src/wizards/importappliance \ 301 ./src/wizards/firstrun \302 301 ./src/wizards/editors 303 302 … … 742 741 src/runtime/seamless/UIMachineWindowSeamless.h \ 743 742 src/softkeyboard/UISoftKeyboard.h \ 744 src/widgets/UIMiniToolBar.h \ 745 src/wizards/firstrun/UIWizardFirstRun.h \ 746 src/wizards/firstrun/UIWizardFirstRunPageBasic.h 743 src/widgets/UIMiniToolBar.h 747 744 748 745 ifdef VBOX_WITH_DRAG_AND_DROP … … 1267 1264 src/runtime/seamless/UIMachineWindowSeamless.cpp \ 1268 1265 src/softkeyboard/UISoftKeyboard.cpp \ 1269 src/widgets/UIMiniToolBar.cpp \ 1270 src/wizards/firstrun/UIWizardFirstRun.cpp \ 1271 src/wizards/firstrun/UIWizardFirstRunPageBasic.cpp 1266 src/widgets/UIMiniToolBar.cpp 1272 1267 1273 1268 ifdef VBOX_WITH_DRAG_AND_DROP … … 1984 1979 wizards/clonevm \ 1985 1980 wizards/exportappliance \ 1986 wizards/firstrun \1987 1981 wizards/importappliance \ 1988 1982 wizards/newcloudvm \ -
trunk/src/VBox/Frontends/VirtualBox/src/converter/UIConverterBackendGlobal.cpp
r91437 r91713 2073 2073 case WizardType_NewCloudVM: strResult = "NewCloudVM"; break; 2074 2074 case WizardType_AddCloudVM: strResult = "AddCloudVM"; break; 2075 case WizardType_FirstRun: strResult = "FirstRun"; break;2076 2075 case WizardType_NewVD: strResult = "NewVD"; break; 2077 2076 case WizardType_CloneVD: strResult = "CloneVD"; break; … … 2097 2096 keys << "NewCloudVM"; values << WizardType_NewCloudVM; 2098 2097 keys << "AddCloudVM"; values << WizardType_AddCloudVM; 2099 keys << "FirstRun"; values << WizardType_FirstRun;2100 2098 keys << "NewVD"; values << WizardType_NewVD; 2101 2099 keys << "CloneVD"; values << WizardType_CloneVD; -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.cpp
r91227 r91713 136 136 const char *UIExtraDataDefs::GUI_PreventReconfiguration = "GUI/PreventReconfiguration"; 137 137 const char *UIExtraDataDefs::GUI_PreventSnapshotOperations = "GUI/PreventSnapshotOperations"; 138 const char *UIExtraDataDefs::GUI_FirstRun = "GUI/FirstRun";139 138 const char *UIExtraDataDefs::GUI_MachineWindowIcons = "GUI/MachineWindowIcons"; 140 139 #ifndef VBOX_WS_MAC -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataDefs.h
r91416 r91713 262 262 /** Holds whether machine snapshot operations disabled. */ 263 263 SHARED_LIBRARY_STUFF extern const char *GUI_PreventSnapshotOperations; 264 /** Holds whether this machine is first time started. */265 SHARED_LIBRARY_STUFF extern const char *GUI_FirstRun;266 264 /** Except Mac OS X: Holds redefined machine-window icon names. */ 267 265 SHARED_LIBRARY_STUFF extern const char *GUI_MachineWindowIcons; … … 877 875 WizardType_NewCloudVM, 878 876 WizardType_AddCloudVM, 879 WizardType_FirstRun,880 877 WizardType_NewVD, 881 878 WizardType_CloneVD -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp
r91236 r91713 1929 1929 << GUI_HideFromManager << GUI_HideDetails 1930 1930 << GUI_PreventReconfiguration << GUI_PreventSnapshotOperations 1931 << GUI_FirstRun1932 1931 #ifndef VBOX_WS_MAC 1933 1932 << GUI_MachineWindowIcons << GUI_MachineWindowNamePostfix … … 3097 3096 WizardMode UIExtraDataManager::modeForWizardType(WizardType type) 3098 3097 { 3099 /* Some wizard use only 'basic' mode: */3100 if (type == WizardType_FirstRun)3101 return WizardMode_Basic;3102 3098 /* Otherwise get mode from cached extra-data: */ 3103 3099 return extraDataStringList(GUI_HideDescriptionForWizards).contains(gpConverter->toInternalString(type)) … … 3145 3141 /* 'True' unless 'restriction' feature allowed: */ 3146 3142 return !isFeatureAllowed(GUI_PreventSnapshotOperations, uID); 3147 }3148 3149 bool UIExtraDataManager::machineFirstTimeStarted(const QUuid &uID)3150 {3151 /* 'True' only if feature is allowed: */3152 return isFeatureAllowed(GUI_FirstRun, uID);3153 }3154 3155 void UIExtraDataManager::setMachineFirstTimeStarted(bool fFirstTimeStarted, const QUuid &uID)3156 {3157 /* 'True' if feature allowed, null-string otherwise: */3158 setExtraDataString(GUI_FirstRun, toFeatureAllowed(fFirstTimeStarted), uID);3159 3143 } 3160 3144 -
trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h
r91236 r91713 487 487 /** Returns whether machine snapshot operations enabled. */ 488 488 bool machineSnapshotOperationsEnabled(const QUuid &uID); 489 490 /** Returns whether this machine is first time started. */491 bool machineFirstTimeStarted(const QUuid &uID);492 /** Returns whether this machine is fFirstTimeStarted. */493 void setMachineFirstTimeStarted(bool fFirstTimeStarted, const QUuid &uID);494 489 495 490 /** Except Mac OS X: Returns redefined machine-window icon names. */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.cpp
r91445 r91713 2235 2235 } 2236 2236 } 2237 /* If mounting was successful: */2238 if (fWasMounted)2239 {2240 /* Disable First RUN Wizard: */2241 if (gEDataManager->machineFirstTimeStarted(comMachine.GetId()))2242 gEDataManager->setMachineFirstTimeStarted(false, comMachine.GetId());2243 }2244 2237 } 2245 2238 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r91363 r91713 47 47 #include "UIMousePointerShapeData.h" 48 48 #include "UINotificationCenter.h" 49 #include "UIWizardFirstRun.h"50 49 #include "UIConsoleEventHandler.h" 51 50 #include "UIFrameBuffer.h" … … 169 168 UINotificationMessage::remindAboutAutoCapture(); 170 169 171 /* Check if we are in teleportation waiting mode.172 * In that case no first run wizard is necessary. */173 170 m_machineState = machine().GetState(); 174 if ( isFirstTimeStarted()175 && !(( m_machineState == KMachineState_PoweredOff176 || m_machineState == KMachineState_Aborted177 || m_machineState == KMachineState_AbortedSaved178 || m_machineState == KMachineState_Teleported)179 && machine().GetTeleporterEnabled()))180 {181 UISafePointerWizard pWizard = new UIWizardFirstRun(mainMachineWindow(), machine());182 pWizard->prepare();183 pWizard->exec();184 if (pWizard)185 delete pWizard;186 }187 171 188 172 /* Apply debug settings from the command line. */ … … 899 883 /* Common flags: */ 900 884 , m_fInitialized(false) 901 , m_fIsFirstTimeStarted(false)902 885 , m_fIsGuestResizeIgnored(false) 903 886 , m_fIsAutoCaptureDisabled(false) … … 1235 1218 #endif 1236 1219 1237 /* Should the First RUN wizard be here? */1238 m_fIsFirstTimeStarted = gEDataManager->machineFirstTimeStarted(uMachineID);1239 /* Disable First RUN wizard for subsequent start anyway: */1240 if (m_fIsFirstTimeStarted)1241 gEDataManager->setMachineFirstTimeStarted(false, uMachineID);1242 1243 1220 /* Should guest autoresize? */ 1244 1221 QAction *pGuestAutoresizeSwitch = actionPool()->action(UIActionIndexRT_M_View_T_GuestAutoresize); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.h
r91363 r91713 178 178 machineStatePrevious() == KMachineState_TeleportingPausedVM; } 179 179 bool isInitialized() const { return m_fInitialized; } 180 bool isFirstTimeStarted() const { return m_fIsFirstTimeStarted; }181 180 bool isGuestResizeIgnored() const { return m_fIsGuestResizeIgnored; } 182 181 bool isAutoCaptureDisabled() const { return m_fIsAutoCaptureDisabled; } … … 562 561 /* Common flags: */ 563 562 bool m_fInitialized : 1; 564 bool m_fIsFirstTimeStarted : 1;565 563 bool m_fIsGuestResizeIgnored : 1; 566 564 bool m_fIsAutoCaptureDisabled : 1; -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp
r89324 r91713 325 325 , m_strCategory(strCategory) 326 326 , m_strControl(strControl) 327 , m_fResetFirstRunFlag(false)328 327 { 329 328 /* Prepare: */ … … 469 468 if (pSystemPage && pSystemPage->isHIDEnabled() && m_machine.GetUSBControllers().isEmpty()) 470 469 m_machine.AddUSBController("OHCI", KUSBControllerType_OHCI); 471 472 /* Disable First RUN Wizard: */473 if (m_fResetFirstRunFlag)474 gEDataManager->setMachineFirstTimeStarted(false, m_uMachineId);475 470 476 471 /* Save settings finally: */ … … 565 560 UISettingsDialog::sltMarkLoaded(); 566 561 567 /* No need to reset 'first run' flag: */568 m_fResetFirstRunFlag = false;569 570 562 /* Unlock the session if exists: */ 571 563 if (!m_session.isNull()) … … 646 638 /* Reload data: */ 647 639 loadOwnData(); 648 }649 650 void UISettingsDialogMachine::sltResetFirstRunFlag()651 {652 m_fResetFirstRunFlag = true;653 640 } 654 641 … … 719 706 { 720 707 pSettingsPage = new UIMachineSettingsStorage; 721 connect(static_cast<UIMachineSettingsStorage*>(pSettingsPage), &UIMachineSettingsStorage::sigStorageChanged,722 this, &UISettingsDialogMachine::sltResetFirstRunFlag);723 708 addItem(":/hd_32px.png", ":/hd_24px.png", ":/hd_16px.png", 724 709 iPageIndex, "#storage", pSettingsPage); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.h
r83960 r91713 133 133 void sltMachineDataChanged(const QUuid &uMachineId); 134 134 135 /** Handles request to reset first run flag. */136 void sltResetFirstRunFlag();137 138 135 private: 139 136 … … 169 166 CConsole m_console; 170 167 171 /** Holds whether we have request to reset first run flag. */172 bool m_fResetFirstRunFlag;173 168 }; 174 169 -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/UINativeWizard.cpp
r91456 r91713 262 262 if (iIndex == 0) 263 263 fIsExpertButtonAvailable = true; 264 /* But first-run wizard has no such button anyway: */265 if (m_enmType == WizardType_FirstRun)266 fIsExpertButtonAvailable = false;267 264 /* Hide/show Expert button finally: */ 268 265 QPushButton *pButtonExpert = wizardButton(WizardButtonType_Expert); -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/UIWizard.cpp
r90258 r91713 293 293 if (iId == 0) 294 294 fIsHideShowDescriptionButtonAvailable = true; 295 /* But first-run wizard has no such button anyway: */296 if (m_enmType == WizardType_FirstRun)297 fIsHideShowDescriptionButtonAvailable = false;298 295 /* Set a flag for hide/show description button finally: */ 299 296 setOption(QWizard::HaveCustomButton1, fIsHideShowDescriptionButtonAvailable); … … 433 430 case WizardType_CloneVD: 434 431 dRatio += 0.1; 435 break;436 case WizardType_FirstRun:437 dRatio += 0.3;438 432 break; 439 433 default: -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp
r91618 r91713 137 137 return false; 138 138 } 139 140 /* Disable first run wizard for now. We will soon remove it: */141 if (ISOFilePath().isEmpty() &&142 !isUnattendedEnabled() &&143 !m_virtualDisk.isNull())144 m_machine.SetExtraData(GUI_FirstRun, "no");145 139 } 146 140
Note:
See TracChangeset
for help on using the changeset viewer.