VirtualBox

Changeset 8909 for trunk

Show
Ignore:
Timestamp:
05/19/08 11:57:22 (8 months ago)
Author:
vboxsync
Message:

FE/Qt4: Backported:
- r30204 (Get rid of compilation warning of unused variables.)
- r30929 (2854: "Warn if not enough guest VRAM when entering fullscreen with Additions (and AutoResize??) enabled" implemented.)
- r30947 (FE/Qt: NLS: Spelling.)

Files:

Legend:

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

    r8902 r8909  
    100100 
    101101    QRect desktopGeometry(); 
     102 
     103    bool isAutoresizeGuestActive(); 
    102104 
    103105    /* todo: This are some support functions for the qt4 port. Maybe we get rid 
  • trunk/src/VBox/Frontends/VirtualBox4/include/VBoxProblemReporter.h

    r8337 r8909  
    182182    void cannotFindMachineByName (const CVirtualBox &vbox, const QString &name); 
    183183 
    184     void cannotEnterSeamlessMode (ULONG aWidth, ULONG aHeight, ULONG aBpp, ULONG64 aMinVRAM); 
     184    void cannotEnterFSMode (bool aIsSeamless, ULONG aWidth, ULONG aHeight, 
     185                            ULONG aBpp, ULONG64 aMinVRAM); 
    185186 
    186187    bool confirmMachineDeletion (const CMachine &machine); 
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleView.cpp

    r8902 r8909  
    23352335} 
    23362336 
     2337bool VBoxConsoleView::isAutoresizeGuestActive() 
     2338{ 
     2339    return mIsAdditionsActive && mAutoresizeGuest; 
     2340} 
     2341 
    23372342/** 
    23382343 *  Called on every key press and release (while in focus). 
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleWnd.cpp

    r8845 r8909  
    19801980{ 
    19811981    disconnect (console, SIGNAL (resizeHintDone()), 0, 0); 
    1982     if (aSeamless) 
    1983     { 
    1984         /* Check if the Guest Video RAM enough for the seamless mode. */ 
    1985         QRect screen = QApplication::desktop()->availableGeometry (this); 
     1982    /* Check if the Guest Video RAM enough for the fullscreen/seamless mode. */ 
     1983    if (aSeamless || console->isAutoresizeGuestActive()) 
     1984    { 
     1985        QRect screen = aSeamless ? 
     1986            QApplication::desktop()->availableGeometry (this) : 
     1987            QApplication::desktop()->screenGeometry (this); 
    19861988        ULONG64 availBits = csession.GetMachine().GetVRAMSize() /* vram */ 
    19871989                          * _1M /* mb to bytes */ 
     
    19961998        if (aOn && (availBits < usedBits)) 
    19971999        { 
    1998             vboxProblem().cannotEnterSeamlessMode (screen.width(), 
     2000            vboxProblem().cannotEnterFSMode (aSeamless, screen.width(), 
    19992001                screen.height(), guestBpp, (((usedBits + 7) / 8 + _1M - 1) / _1M) * _1M); 
    20002002            return false; 
  • trunk/src/VBox/Frontends/VirtualBox4/src/VBoxProblemReporter.cpp

    r8337 r8909  
    941941} 
    942942 
    943 void VBoxProblemReporter::cannotEnterSeamlessMode (ULONG aWidth, 
    944                                                    ULONG aHeight, 
    945                                                    ULONG aBpp, 
    946                                                    ULONG64 aMinVRAM) 
     943void VBoxProblemReporter::cannotEnterFSMode (bool aIsSeamless, 
     944                                             ULONG /* aWidth */, 
     945                                             ULONG /* aHeight */, 
     946                                             ULONG /* aBpp */, 
     947                                             ULONG64 aMinVRAM) 
    947948{ 
    948949    message (&vboxGlobal().consoleWnd(), Error, 
    949              tr ("<p>Could not enter seamless mode due to insufficient guest " 
    950                  "video memory.</p>" 
    951                  "<p>You should configure the VM to have at least <b>%1</b> " 
    952                  "of video memory.</p>") 
     950             (aIsSeamless ? 
     951                tr ("<p>Could not enter seamless mode due to insufficient guest " 
     952                    "video memory.</p>" 
     953                    "<p>You should configure the virtual machine to have at " 
     954                    "least <b>%1</b> of video memory.</p>") : 
     955                tr ("<p>Could not switch the guest display to fullscreen mode due " 
     956                    "to insufficient guest video memory.</p>" 
     957                    "<p>You should configure the virtual machine to have at " 
     958                    "least <b>%1</b> of video memory.</p>" 
     959                    "<p>Press <b>Ignore</b> to switch to fullscreen mode anyway " 
     960                    "or press <b>Cancel</b> to cancel the operation.</p>")) 
    953961             .arg (VBoxGlobal::formatSize (aMinVRAM))); 
    954962} 

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy