VirtualBox

Changeset 29700 in vbox for trunk


Ignore:
Timestamp:
May 20, 2010 2:48:14 PM (15 years ago)
Author:
vboxsync
Message:

FE/Qt: 4758: New running VM core: Fullscreen, Seamless, Guest Display Auto-resize, Logging actions are named according current state.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/runtime
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIActionsPool.cpp

    r29697 r29700  
    161161    void retranslateUi()
    162162    {
    163         setText(VBoxGlobal::insertKeyToActionText(QApplication::translate("VBoxConsoleWnd", "&Fullscreen Mode"), "F"));
    164         setStatusTip(QApplication::translate("VBoxConsoleWnd", "Switch to fullscreen mode"));
     163        if (!isChecked())
     164        {
     165            setText(VBoxGlobal::insertKeyToActionText(QApplication::translate("VBoxConsoleWnd", "Enter &Fullscreen Mode"), "F"));
     166            setStatusTip(QApplication::translate("VBoxConsoleWnd", "Switch to fullscreen mode"));
     167        }
     168        else
     169        {
     170            setText(VBoxGlobal::insertKeyToActionText(QApplication::translate("VBoxConsoleWnd", "Exit &Fullscreen Mode"), "F"));
     171            setStatusTip(QApplication::translate("VBoxConsoleWnd", "Switch to normal mode"));
     172        }
    165173    }
    166174};
     
    184192    void retranslateUi()
    185193    {
    186         setText(VBoxGlobal::insertKeyToActionText(QApplication::translate("VBoxConsoleWnd", "Seam&less Mode"), "L"));
    187         setStatusTip(QApplication::translate("VBoxConsoleWnd", "Switch to seamless desktop integration mode"));
     194        if (!isChecked())
     195        {
     196            setText(VBoxGlobal::insertKeyToActionText(QApplication::translate("VBoxConsoleWnd", "Enter Seam&less Mode"), "L"));
     197            setStatusTip(QApplication::translate("VBoxConsoleWnd", "Switch to seamless desktop integration mode"));
     198        }
     199        else
     200        {
     201            setText(VBoxGlobal::insertKeyToActionText(QApplication::translate("VBoxConsoleWnd", "Exit Seam&less Mode"), "L"));
     202            setStatusTip(QApplication::translate("VBoxConsoleWnd", "Switch to normal mode"));
     203        }
    188204    }
    189205};
     
    207223    void retranslateUi()
    208224    {
    209         setText(VBoxGlobal::insertKeyToActionText(QApplication::translate("VBoxConsoleWnd", "Auto-resize &Guest Display"), "G"));
    210         setStatusTip(QApplication::translate("VBoxConsoleWnd", "Automatically resize the guest display when the window is resized (requires Guest Additions)"));
     225        if (!isChecked())
     226        {
     227            setText(VBoxGlobal::insertKeyToActionText(QApplication::translate("VBoxConsoleWnd", "Enable &Guest Display Auto-resize"), "G"));
     228            setStatusTip(QApplication::translate("VBoxConsoleWnd", "Automatically resize the guest display when the window is resized (requires Guest Additions)"));
     229        }
     230        else
     231        {
     232            setText(VBoxGlobal::insertKeyToActionText(QApplication::translate("VBoxConsoleWnd", "Disable &Guest Display Auto-resize"), "G"));
     233            setStatusTip(QApplication::translate("VBoxConsoleWnd", "Disable automatic resize of the guest display when the window is resized"));
     234        }
    211235    }
    212236};
     
    791815    void retranslateUi()
    792816    {
    793         setText(QApplication::translate("VBoxConsoleWnd", "&Logging...", "debug action"));
     817        if (!isChecked())
     818        {
     819            setText(QApplication::translate("VBoxConsoleWnd", "Enable &Logging...", "debug action"));
     820        }
     821        else
     822        {
     823            setText(QApplication::translate("VBoxConsoleWnd", "Disable &Logging...", "debug action"));
     824        }
    794825    }
    795826};
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachine.cpp

    r28844 r29700  
    1818 */
    1919
     20/* Global includes */
     21#include <QTimer>
     22
    2023/* Local includes */
    2124#include "VBoxGlobal.h"
     
    165168            pActionFullscreen->blockSignals(true);
    166169            pActionFullscreen->setChecked(true);
     170            QTimer::singleShot(0, pActionFullscreen, SLOT(sltUpdateAppearance()));
    167171            pActionFullscreen->blockSignals(false);
    168172        }
     
    178182            pActionFullscreen->blockSignals(true);
    179183            pActionFullscreen->setChecked(false);
     184            QTimer::singleShot(0, pActionFullscreen, SLOT(sltUpdateAppearance()));
    180185            pActionFullscreen->blockSignals(false);
    181186        }
     
    227232            pActionSeamless->blockSignals(true);
    228233            pActionSeamless->setChecked(true);
     234            QTimer::singleShot(0, pActionSeamless, SLOT(sltUpdateAppearance()));
    229235            pActionSeamless->blockSignals(false);
    230236        }
     
    240246            pActionSeamless->blockSignals(true);
    241247            pActionSeamless->setChecked(false);
     248            QTimer::singleShot(0, pActionSeamless, SLOT(sltUpdateAppearance()));
    242249            pActionSeamless->blockSignals(false);
    243250        }
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp

    r29694 r29700  
    12001200        strSettings = machine.GetExtraData(VBoxDefs::GUI_AutoresizeGuest);
    12011201        QAction *pGuestAutoresizeSwitch = uimachine()->actionsPool()->action(UIActionIndex_Toggle_GuestAutoresize);
    1202         pGuestAutoresizeSwitch->blockSignals(true);
    12031202        pGuestAutoresizeSwitch->setChecked(strSettings != "off");
    1204         pGuestAutoresizeSwitch->blockSignals(false);
    12051203    }
    12061204}
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