VirtualBox

Changeset 51209 in vbox


Ignore:
Timestamp:
May 7, 2014 4:32:00 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
93600
Message:

FE/Qt: 6660: Advanced extra-data management framework: Integrate GUI_FirstRun.

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.cpp

    r51208 r51209  
    241241#endif /* VBOX_GUI_WITH_NETWORK_MANAGER */
    242242
     243bool UIExtraDataManager::isFirstRun(const QString &strId) const
     244{
     245    return isFeatureAllowed(GUI_FirstRun, strId);
     246}
     247
     248void UIExtraDataManager::setFirstRun(bool fIsFirstRun, const QString &strId)
     249{
     250    setExtraDataString(GUI_FirstRun, toFeatureAllowed(fIsFirstRun), strId);
     251}
     252
    243253bool UIExtraDataManager::shouldWeShowMachine(const QString &strID) const
    244254{
  • trunk/src/VBox/Frontends/VirtualBox/src/extradata/UIExtraDataManager.h

    r51208 r51209  
    114114    bool shouldWeAllowApplicationUpdate() const;
    115115#endif /* VBOX_GUI_WITH_NETWORK_MANAGER */
     116
     117    /** Returns whether this machine started for the first time. */
     118    bool isFirstRun(const QString &strId) const;
     119    /** Defines whether this machine started for the first time. */
     120    void setFirstRun(bool fIsFirstRun, const QString &strId);
    116121
    117122    /** Returns whether we should show machine. */
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp

    r51158 r51209  
    11401140
    11411141        /* Is there should be First RUN Wizard? */
    1142         strSettings = machine.GetExtraData(GUI_FirstRun);
    1143         if (strSettings == "yes")
    1144             m_fIsFirstTimeStarted = true;
     1142        m_fIsFirstTimeStarted = gEDataManager->isFirstRun(vboxGlobal().managedVMUuid());
    11451143
    11461144        /* Ignore mediums mounted at runtime? */
     
    11881186    /* Save extra-data settings: */
    11891187    {
    1190         /* Disable First RUN Wizard for the since now: */
    1191         machine.SetExtraData(GUI_FirstRun, QString());
     1188        /* Disable First RUN Wizard: */
     1189        gEDataManager->setFirstRun(false, vboxGlobal().managedVMUuid());
    11921190
    11931191        /* Remember if guest should autoresize: */
  • trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialogSpecific.cpp

    r51054 r51209  
    829829        }
    830830
    831         /* Clear the "GUI_FirstRun" extra data key in case if
    832          * the boot order or disk configuration were changed: */
     831        /* Disable First RUN Wizard: */
    833832        if (m_fResetFirstRunFlag)
    834             m_machine.SetExtraData(GUI_FirstRun, QString::null);
     833            gEDataManager->setFirstRun(false, m_strMachineId);
    835834
    836835        /* Save settings finally: */
  • trunk/src/VBox/Frontends/VirtualBox/src/wizards/newvm/UIWizardNewVM.cpp

    r49091 r51209  
    7575        }
    7676
    77         /* The FirstRun wizard is to be shown only when we don't attach any virtual hard drive or attach a new (empty) one.
    78          * Selecting an existing virtual hard drive will cancel the FirstRun wizard. */
     77        /* The First RUN Wizard is to be shown:
     78         * 1. if we don't attach any virtual hard-drive
     79         * 2. or attach a new (empty) one.
     80         * Usually we are assigning extra-data values through UIExtraDataManager,
     81         * but in that special case VM was not registered yet, so UIExtraDataManager is unaware of it. */
    7982        if (field("virtualDiskId").toString().isNull() || !field("virtualDisk").value<CMedium>().isNull())
    8083            m_machine.SetExtraData(GUI_FirstRun, "yes");
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette