VirtualBox

Changeset 3490 in vbox


Ignore:
Timestamp:
Jul 6, 2007 11:26:06 AM (18 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
22705
Message:

2048: Make runtime DVD changes permanent:

"Remember Media Mounted at Runtime" settings-feature implemented. It is located in "Other" tab on "General" VM Settings page.
If this feature is activated, the Console Window will save VM settings immediately after every DVD/Floppy change.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleWnd.h

    r3277 r3490  
    286286
    287287    bool mIsFirstTimeStarted : 1;
     288    bool mIsAutoSaveMedia : 1;
    288289
    289290#ifdef VBOX_WITH_DEBUGGER_GUI
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp

    r3277 r3490  
    229229    , console_style (0)
    230230    , mIsFirstTimeStarted (false)
     231    , mIsAutoSaveMedia (true)
    231232#ifdef VBOX_WITH_DEBUGGER_GUI
    232233    , dbg_gui (NULL)
     
    680681static const char *GUI_AutoresizeGuest = "GUI/AutoresizeGuest";
    681682extern const char *GUI_FirstRun = "GUI/FirstRun";
     683extern const char *GUI_SaveMountedAtRuntime = "GUI/SaveMountedAtRuntime";
    682684
    683685/**
     
    737739        else if (!str.isEmpty())
    738740            cmachine.SetExtraData (GUI_FirstRun, QString::null);
     741
     742        str = cmachine.GetExtraData (GUI_SaveMountedAtRuntime);
     743        if (str == "no")
     744            mIsAutoSaveMedia = false;
    739745
    740746        str = cmachine.GetExtraData (GUI_LastWindowPosition);
     
    20262032        if (drv.isOk())
    20272033        {
    2028 // @todo: save the settings only on power off if the appropriate flag is set
    2029 //            console->console().SaveSettings();
     2034            if (mIsAutoSaveMedia)
     2035                console->console().GetMachine().SaveSettings();
    20302036            updateAppearanceOf (FloppyStuff);
    20312037        }
     
    20412047    if (drv.isOk())
    20422048    {
    2043 // @todo: save the settings only on power off if the appropriate flag is set
    2044 //        console->machine().SaveSettings();
     2049        if (mIsAutoSaveMedia)
     2050            console->console().GetMachine().SaveSettings();
    20452051        updateAppearanceOf (FloppyStuff);
    20462052    }
     
    20622068        if (drv.isOk())
    20632069        {
    2064 // @todo: save the settings only on power off if the appropriate flag is set
    2065 //            console->console().SaveSettings();
     2070            if (mIsAutoSaveMedia)
     2071                console->console().GetMachine().SaveSettings();
    20662072            updateAppearanceOf (DVDStuff);
    20672073        }
     
    21512157    if (drv.isOk())
    21522158    {
    2153 // @todo: save the settings only on power off if the appropriate flag is set
    2154 //        console->machine().SaveSettings();
     2159        if (mIsAutoSaveMedia)
     2160            console->console().GetMachine().SaveSettings();
    21552161        updateAppearanceOf (DVDStuff);
    21562162    }
     
    23252331    if (drv.isOk())
    23262332    {
    2327 // @todo: save the settings only on power off if the appropriate flag is set
    2328 //        console->machine().SaveSettings();
     2333        if (mIsAutoSaveMedia)
     2334            console->console().GetMachine().SaveSettings();
    23292335        updateAppearanceOf (FloppyStuff);
    23302336    }
     
    23482354    if (drv.isOk())
    23492355    {
    2350 // @todo: save the settings only on power off if the appropriate flag is set
    2351 //        console->machine().SaveSettings();
     2356        if (mIsAutoSaveMedia)
     2357            console->console().GetMachine().SaveSettings();
    23522358        updateAppearanceOf (DVDStuff);
    23532359    }
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsDlg.ui

    r3448 r3490  
    12451245                                    </property>
    12461246                                </widget>
     1247                            </vbox>
     1248                        </widget>
     1249                        <widget class="QWidget">
     1250                            <property name="name">
     1251                                <cstring>other</cstring>
     1252                            </property>
     1253                            <attribute name="title">
     1254                                <string>&amp;Other</string>
     1255                            </attribute>
     1256                            <vbox>
     1257                                <property name="name">
     1258                                    <cstring>unnamed</cstring>
     1259                                </property>
     1260                                <widget class="QCheckBox">
     1261                                    <property name="name">
     1262                                        <cstring>chbRememberMedia</cstring>
     1263                                    </property>
     1264                                    <property name="text">
     1265                                        <string>&amp;Remember Media Mounted at Runtime</string>
     1266                                    </property>
     1267                                    <property name="accel">
     1268                                        <string>Alt+R</string>
     1269                                    </property>
     1270                                    <property name="checked">
     1271                                        <bool>true</bool>
     1272                                    </property>
     1273                                </widget>
     1274                                <spacer>
     1275                                    <property name="name">
     1276                                        <cstring>spacer30</cstring>
     1277                                    </property>
     1278                                    <property name="orientation">
     1279                                        <enum>Vertical</enum>
     1280                                    </property>
     1281                                    <property name="sizeType">
     1282                                        <enum>Expanding</enum>
     1283                                    </property>
     1284                                    <property name="sizeHint">
     1285                                        <size>
     1286                                            <width>20</width>
     1287                                            <height>151</height>
     1288                                        </size>
     1289                                    </property>
     1290                                </spacer>
    12471291                            </vbox>
    12481292                        </widget>
  • trunk/src/VBox/Frontends/VirtualBox/ui/VBoxVMSettingsDlg.ui.h

    r3349 r3490  
    3131
    3232
     33extern const char *GUI_SaveMountedAtRuntime;
    3334extern const char *GUI_FirstRun;
    3435
     
    15211522    /* Shared clipboard mode */
    15221523    cbSharedClipboard->setCurrentItem (machine.GetClipboardMode());
     1524
     1525    /* other features */
     1526    QString saveRtimeImages = cmachine.GetExtraData (GUI_SaveMountedAtRuntime);
     1527    chbRememberMedia->setChecked (saveRtimeImages != "no");
    15231528
    15241529    /* hard disk images */
     
    18611866    cmachine.SetClipboardMode ((CEnums::ClipboardMode)cbSharedClipboard->currentItem());
    18621867
     1868    /* other features */
     1869    cmachine.SetExtraData (GUI_SaveMountedAtRuntime,
     1870                           chbRememberMedia->isChecked() ? "yes" : "no");
     1871
    18631872    /* hard disk images */
    18641873    {
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