VirtualBox

Ignore:
Timestamp:
Jul 31, 2007 6:03:55 PM (17 years ago)
Author:
vboxsync
Message:

2049: The first run wizard should not be run if an existing VDI is attached to a new VM:

Dealing with "no-hd attached to newly created vm" situation. Two different messages in wizard solutions for:

  1. Newly created HD attached to newly created VM (installation case).
  2. No HD attached to newly created VM (boot from LiveCD case).

Note: If the attached HD was exist before the VM is created, First Run Wizard is not run at all.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMFirstRunWzd.ui.h

    r3138 r3947  
    6565    teSummary->setReadOnly (TRUE);
    6666    teSummary->setPaper (pageSummary->backgroundBrush());
    67     ltSummary->insertWidget (1, teSummary);
     67    ltSummary->insertWidget (2, teSummary);
    6868
    6969    /* setup connections and set validation for pages
     
    8888
    8989    /* setup minimum width for the sizeHint to be calculated correctly */
    90     int wid = widthSpacer->minimumSize().width();
     90    int wid = widthSpacer->minimumSize().width() + 50;
    9191    txWelcome->setMinimumWidth (wid);
    9292    txType->setMinimumWidth (wid);
     
    9494    txSummaryHdr->setMinimumWidth (wid);
    9595    txSummaryFtr->setMinimumWidth (wid);
     96    txWelcomeHD->setMinimumWidth (wid);
     97    txTypeHD->setMinimumWidth (wid);
     98    txSourceHD->setMinimumWidth (wid);
     99    txSummaryHdrHD->setMinimumWidth (wid);
     100    txSummaryFtrHD->setMinimumWidth (wid);
    96101
    97102    /* media page */
     
    101106
    102107
    103 void VBoxVMFirstRunWzd::setup (CMachine &aMachine)
     108void VBoxVMFirstRunWzd::setup (const CMachine &aMachine)
    104109{
    105110    machine = aMachine;
     111
     112    CHardDiskAttachmentEnumerator en = machine.GetHardDiskAttachments().Enumerate();
     113    if (en.HasMore())
     114    {
     115        txWelcomeHD->setHidden (true);
     116        txTypeHD->setHidden (true);
     117        txSourceHD->setHidden (true);
     118        txSummaryHdrHD->setHidden (true);
     119        txSummaryFtrHD->setHidden (true);
     120    }
     121    else
     122    {
     123        txWelcome->setHidden (true);
     124        txType->setHidden (true);
     125        txSource->setHidden (true);
     126        txSummaryHdr->setHidden (true);
     127        txSummaryFtr->setHidden (true);
     128    }
    106129}
    107130
Note: See TracChangeset for help on using the changeset viewer.

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