VirtualBox

Ignore:
Timestamp:
Dec 13, 2010 10:29:58 AM (14 years ago)
Author:
vboxsync
Message:

FE/Qt: 3635: Scale mode: Notify user about entering scale mode.

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

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxProblemReporter.cpp

    r34982 r34984  
    18721872{
    18731873    return messageOkCancel (mainMachineWindowShown(), Info,
    1874         tr ("<p>The virtual machine window will be now switched to "
    1875             "<b>fullscreen</b> mode. "
    1876             "You can go back to windowed mode at any time by pressing "
    1877             "<b>%1</b>. Note that the <i>Host</i> key is currently "
    1878             "defined as <b>%2</b>.</p>"
    1879             "<p>Note that the main menu bar is hidden in fullscreen mode. You "
    1880             "can access it by pressing <b>Host+Home</b>.</p>")
     1874        tr ("<p>The virtual machine window will be now switched to <b>fullscreen</b> mode. "
     1875            "You can go back to windowed mode at any time by pressing <b>%1</b>.</p>"
     1876            "<p>Note that the <i>Host</i> key is currently defined as <b>%2</b>.</p>"
     1877            "<p>Note that the main menu bar is hidden in fullscreen mode. "
     1878            "You can access it by pressing <b>Host+Home</b>.</p>")
    18811879            .arg (aHotKey)
    18821880            .arg (QIHotKeyEdit::keyName (vboxGlobal().settings().hostKey())),
     
    18941892{
    18951893    return messageOkCancel (mainMachineWindowShown(), Info,
    1896         tr ("<p>The virtual machine window will be now switched to "
    1897             "<b>Seamless</b> mode. "
    1898             "You can go back to windowed mode at any time by pressing "
    1899             "<b>%1</b>. Note that the <i>Host</i> key is currently "
    1900             "defined as <b>%2</b>.</p>"
    1901             "<p>Note that the main menu bar is hidden in seamless mode. You "
    1902             "can access it by pressing <b>Host+Home</b>.</p>")
     1894        tr ("<p>The virtual machine window will be now switched to <b>Seamless</b> mode. "
     1895            "You can go back to windowed mode at any time by pressing <b>%1</b>.</p>"
     1896            "<p>Note that the <i>Host</i> key is currently defined as <b>%2</b>.</p>"
     1897            "<p>Note that the main menu bar is hidden in seamless mode. "
     1898            "You can access it by pressing <b>Host+Home</b>.</p>")
    19031899            .arg (aHotKey)
    19041900            .arg (QIHotKeyEdit::keyName (vboxGlobal().settings().hostKey())),
    19051901        "confirmGoingSeamless",
    19061902        tr ("Switch", "seamless"));
     1903}
     1904
     1905/**
     1906 *  @param aHotKey Scale hot key as defined in the menu.
     1907 *
     1908 *  @return @c true if the user has chosen to go scale (this is always
     1909 *  the case if the dialog was autoconfirmed).
     1910 */
     1911bool VBoxProblemReporter::confirmGoingScale (const QString &aHotKey)
     1912{
     1913    return messageOkCancel (mainMachineWindowShown(), Info,
     1914        tr ("<p>The virtual machine window will be now switched to <b>Scale</b> mode. "
     1915            "You can go back to windowed mode at any time by pressing <b>%1</b>.</p>"
     1916            "<p>Note that the <i>Host</i> key is currently defined as <b>%2</b>.</p>"
     1917            "<p>Note that the main menu bar is hidden in scale mode. "
     1918            "You can access it by pressing <b>Host+Home</b>.</p>")
     1919            .arg (aHotKey)
     1920            .arg (QIHotKeyEdit::keyName (vboxGlobal().settings().hostKey())),
     1921        "confirmGoingScale",
     1922        tr ("Switch", "scale"));
    19071923}
    19081924
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxProblemReporter.h

    r34978 r34984  
    315315    bool confirmGoingFullscreen (const QString &aHotKey);
    316316    bool confirmGoingSeamless (const QString &aHotKey);
     317    bool confirmGoingScale (const QString &aHotKey);
    317318
    318319    bool remindAboutGuruMeditation (const CConsole &aConsole,
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineLogicScale.cpp

    r31285 r34984  
    5353    /* Cleanup actions groups: */
    5454    cleanupActionGroups();
     55}
     56
     57bool UIMachineLogicScale::checkAvailability()
     58{
     59    /* Base class availability: */
     60    if (!UIMachineLogic::checkAvailability())
     61        return false;
     62
     63    /* Take the toggle hot key from the menu item. Since
     64     * VBoxGlobal::extractKeyFromActionText gets exactly the
     65     * linked key without the 'Host+' part we are adding it here. */
     66    QString strHotKey = QString("Host+%1")
     67        .arg(VBoxGlobal::extractKeyFromActionText(actionsPool()->action(UIActionIndex_Toggle_Scale)->text()));
     68    Assert(!strHotKey.isEmpty());
     69
     70    /* Show the info message. */
     71    if (!vboxProblem().confirmGoingScale(strHotKey))
     72        return false;
     73
     74    return true;
    5575}
    5676
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/scale/UIMachineLogicScale.h

    r30848 r34984  
    3838    virtual ~UIMachineLogicScale();
    3939
     40    bool checkAvailability();
    4041    void initialize();
    4142
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