VirtualBox

Changeset 8894

Show
Ignore:
Timestamp:
05/16/08 15:05:23 (5 months ago)
Author:
vboxsync
Message:

2854: "Warn if not enough guest VRAM when entering fullscreen with Additions (and AutoResize?) enabled" implemented.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxConsoleView.h

    r8888 r8894  
    104104    QRect getDesktopGeometry(); 
    105105 
     106    bool isAutoresizeGuestActive(); 
     107 
    106108signals: 
    107109 
  • trunk/src/VBox/Frontends/VirtualBox/include/VBoxProblemReporter.h

    r8428 r8894  
    183183    void cannotFindMachineByName (const CVirtualBox &vbox, const QString &name); 
    184184 
    185     void cannotEnterSeamlessMode (ULONG aWidth, ULONG aHeight, ULONG aBpp, ULONG64 aMinVRAM); 
     185    void cannotEnterFSMode (bool aIsSeamless, ULONG aWidth, ULONG aHeight, 
     186                            ULONG aBpp, ULONG64 aMinVRAM); 
    186187 
    187188    bool confirmMachineDeletion (const CMachine &machine); 
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp

    r8888 r8894  
    23042304} 
    23052305 
     2306bool VBoxConsoleView::isAutoresizeGuestActive() 
     2307{ 
     2308    return mIsAdditionsActive && mAutoresizeGuest; 
     2309} 
     2310 
    23062311/** 
    23072312 *  Called on every key press and release (while in focus). 
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp

    r8846 r8894  
    19761976{ 
    19771977    disconnect (console, SIGNAL (resizeHintDone()), 0, 0); 
    1978     if (aSeamless) 
    1979     { 
    1980         /* Check if the Guest Video RAM enough for the seamless mode. */ 
    1981         QRect screen = QApplication::desktop()->availableGeometry (this); 
     1978    /* Check if the Guest Video RAM enough for the fullscreen/seamless mode. */ 
     1979    if (aSeamless || console->isAutoresizeGuestActive()) 
     1980    { 
     1981        QRect screen = aSeamless ? 
     1982            QApplication::desktop()->availableGeometry (this) : 
     1983            QApplication::desktop()->screenGeometry (this); 
    19821984        ULONG64 availBits = csession.GetMachine().GetVRAMSize() /* vram */ 
    19831985                          * _1M /* mb to bytes */ 
     
    19931995        if (aOn && (availBits < usedBits)) 
    19941996        { 
    1995             vboxProblem().cannotEnterSeamlessMode (screen.width(), 
     1997            vboxProblem().cannotEnterFSMode (aSeamless, screen.width(), 
    19961998                screen.height(), guestBpp, (((usedBits + 7) / 8 + _1M - 1) / _1M) * _1M); 
    19971999            return false; 
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxProblemReporter.cpp

    r8428 r8894  
    933933} 
    934934 
    935 void VBoxProblemReporter::cannotEnterSeamlessMode (ULONG /* aWidth */, 
    936                                                    ULONG /* aHeight */, 
    937                                                    ULONG /* aBpp */, 
    938                                                    ULONG64 aMinVRAM) 
     935void VBoxProblemReporter::cannotEnterFSMode (bool aIsSeamless, 
     936                                             ULONG /* aWidth */, 
     937                                             ULONG /* aHeight */, 
     938                                             ULONG /* aBpp */, 
     939                                             ULONG64 aMinVRAM) 
    939940{ 
    940941    message (&vboxGlobal().consoleWnd(), Error, 
    941              tr ("<p>Could not enter seamless mode due to insufficient guest " 
     942             tr ("<p>Could not enter %1 due to insufficient guest " 
    942943                 "video memory.</p>" 
    943                  "<p>You should configure the VM to have at least <b>%1</b> " 
     944                 "<p>You should configure the VM to have at least <b>%2</b> " 
    944945                 "of video memory.</p>") 
     946             .arg (aIsSeamless ? tr ("seamless mode") : tr ("fullscreen mode")) 
    945947             .arg (VBoxGlobal::formatSize (aMinVRAM))); 
    946948} 

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy