VirtualBox

Ignore:
Timestamp:
Apr 4, 2013 9:59:39 AM (12 years ago)
Author:
vboxsync
Message:

FE/Qt: Message-center rework (part 26): More runtime stuff.

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

Legend:

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

    r45328 r45333  
    15561556}
    15571557
    1558 bool UIMessageCenter::warnAboutVirtNotEnabled64BitsGuest(bool fHWVirtExSupported)
     1558bool UIMessageCenter::warnAboutVirtNotEnabled64BitsGuest(bool fHWVirtExSupported) const
    15591559{
    15601560    if (fHWVirtExSupported)
     
    15761576}
    15771577
    1578 bool UIMessageCenter::warnAboutVirtNotEnabledGuestRequired(bool fHWVirtExSupported)
     1578bool UIMessageCenter::warnAboutVirtNotEnabledGuestRequired(bool fHWVirtExSupported) const
    15791579{
    15801580    if (fHWVirtExSupported)
     
    15931593}
    15941594
    1595 bool UIMessageCenter::cannotStartWithoutNetworkIf(const QString &strMachineName, const QString &strIfNames)
     1595bool UIMessageCenter::cannotStartWithoutNetworkIf(const QString &strMachineName, const QString &strIfNames) const
    15961596{
    15971597    return messageOkCancel(mainMachineWindowShown(), MessageType_Error,
     
    16051605}
    16061606
    1607 void UIMessageCenter::cannotStartMachine(const CConsole &console, const QString &strName)
     1607void UIMessageCenter::cannotStartMachine(const CConsole &console, const QString &strName) const
    16081608{
    16091609    message(mainMachineWindowShown(), MessageType_Error,
     
    16131613}
    16141614
    1615 void UIMessageCenter::cannotStartMachine(const CProgress &progress, const QString &strName)
     1615void UIMessageCenter::cannotStartMachine(const CProgress &progress, const QString &strName) const
    16161616{
    16171617    message(mainMachineWindowShown(), MessageType_Error,
     
    16211621}
    16221622
    1623 void UIMessageCenter::cannotSendACPIToMachine()
    1624 {
    1625     message(mainWindowShown(),  MessageType_Warning,
    1626         tr("You are trying to shut down the guest with the ACPI power "
    1627             "button. This is currently not possible because the guest "
    1628             "does not support software shutdown."));
    1629 }
    1630 
    1631 bool UIMessageCenter::confirmInputCapture(bool *pfAutoConfirmed /* = NULL */)
     1623void UIMessageCenter::cannotSendACPIToMachine() const
     1624{
     1625    message(mainMachineWindowShown(),  MessageType_Warning,
     1626            tr("You are trying to shut down the guest with the ACPI power button. "
     1627               "This is currently not possible because the guest does not support software shutdown."));
     1628}
     1629
     1630bool UIMessageCenter::confirmInputCapture(bool &fAutoConfirmed) const
    16321631{
    16331632    int rc = message(mainMachineWindowShown(), MessageType_Info,
    1634         tr("<p>You have <b>clicked the mouse</b> inside the Virtual Machine display "
    1635            "or pressed the <b>host key</b>. This will cause the Virtual Machine to "
    1636            "<b>capture</b> the host mouse pointer (only if the mouse pointer "
    1637            "integration is not currently supported by the guest OS) and the "
    1638            "keyboard, which will make them unavailable to other applications "
    1639            "running on your host machine."
    1640            "</p>"
    1641            "<p>You can press the <b>host key</b> at any time to <b>uncapture</b> the "
    1642            "keyboard and mouse (if it is captured) and return them to normal "
    1643            "operation. The currently assigned host key is shown on the status bar "
    1644            "at the bottom of the Virtual Machine window, next to the&nbsp;"
    1645            "<img src=:/hostkey_16px.png/>&nbsp;icon. This icon, together "
    1646            "with the mouse icon placed nearby, indicate the current keyboard "
    1647            "and mouse capture state."
    1648            "</p>") +
    1649         tr("<p>The host key is currently defined as <b>%1</b>.</p>",
    1650            "additional message box paragraph")
    1651             .arg(UIHostCombo::toReadableString(vboxGlobal().settings().hostCombo())),
    1652         "confirmInputCapture",
    1653         AlertButton_Ok | AlertButtonOption_Default,
    1654         AlertButton_Cancel | AlertButtonOption_Escape,
    1655         0,
    1656         tr("Capture", "do input capture"));
    1657 
    1658     if (pfAutoConfirmed)
    1659         *pfAutoConfirmed = (rc & AutoConfirmed);
    1660 
     1633                     tr("<p>You have <b>clicked the mouse</b> inside the Virtual Machine display or pressed the <b>host key</b>. "
     1634                        "This will cause the Virtual Machine to <b>capture</b> the host mouse pointer (only if the mouse pointer "
     1635                        "integration is not currently supported by the guest OS) and the keyboard, which will make them "
     1636                        "unavailable to other applications running on your host machine.</p>"
     1637                        "<p>You can press the <b>host key</b> at any time to <b>uncapture</b> the keyboard and mouse "
     1638                        "(if it is captured) and return them to normal operation. "
     1639                        "The currently assigned host key is shown on the status bar at the bottom of the Virtual Machine window, "
     1640                        "next to the&nbsp;<img src=:/hostkey_16px.png/>&nbsp;icon. "
     1641                        "This icon, together with the mouse icon placed nearby, indicate the current keyboard and mouse capture state.</p>") +
     1642                     tr("<p>The host key is currently defined as <b>%1</b>.</p>", "additional message box paragraph")
     1643                        .arg(UIHostCombo::toReadableString(vboxGlobal().settings().hostCombo())),
     1644                     "confirmInputCapture",
     1645                     AlertButton_Ok | AlertButtonOption_Default,
     1646                     AlertButton_Cancel | AlertButtonOption_Escape,
     1647                     0,
     1648                     tr("Capture", "do input capture"));
     1649    /* Was the message auto-confirmed? */
     1650    fAutoConfirmed = (rc & AutoConfirmed);
     1651    /* True if "Ok" was pressed: */
    16611652    return (rc & AlertButtonMask) == AlertButton_Ok;
    16621653}
    16631654
    1664 void UIMessageCenter::remindAboutAutoCapture()
     1655void UIMessageCenter::remindAboutAutoCapture() const
    16651656{
    16661657    message(mainMachineWindowShown(), MessageType_Info,
    1667         tr("<p>You have the <b>Auto capture keyboard</b> option turned on. "
    1668            "This will cause the Virtual Machine to automatically <b>capture</b> "
    1669            "the keyboard every time the VM window is activated and make it "
    1670            "unavailable to other applications running on your host machine: "
    1671            "when the keyboard is captured, all keystrokes (including system ones "
    1672            "like Alt-Tab) will be directed to the VM."
    1673            "</p>"
    1674            "<p>You can press the <b>host key</b> at any time to <b>uncapture</b> the "
    1675            "keyboard and mouse (if it is captured) and return them to normal "
    1676            "operation. The currently assigned host key is shown on the status bar "
    1677            "at the bottom of the Virtual Machine window, next to the&nbsp;"
    1678            "<img src=:/hostkey_16px.png/>&nbsp;icon. This icon, together "
    1679            "with the mouse icon placed nearby, indicate the current keyboard "
    1680            "and mouse capture state."
    1681            "</p>") +
    1682         tr("<p>The host key is currently defined as <b>%1</b>.</p>",
    1683            "additional message box paragraph")
    1684             .arg(UIHostCombo::toReadableString(vboxGlobal().settings().hostCombo())),
    1685         "remindAboutAutoCapture");
    1686 }
    1687 
    1688 void UIMessageCenter::remindAboutMouseIntegration(bool fSupportsAbsolute)
    1689 {
     1658            tr("<p>You have the <b>Auto capture keyboard</b> option turned on. "
     1659               "This will cause the Virtual Machine to automatically <b>capture</b> "
     1660               "the keyboard every time the VM window is activated and make it "
     1661               "unavailable to other applications running on your host machine: "
     1662               "when the keyboard is captured, all keystrokes (including system ones "
     1663               "like Alt-Tab) will be directed to the VM.</p>"
     1664               "<p>You can press the <b>host key</b> at any time to <b>uncapture</b> the "
     1665               "keyboard and mouse (if it is captured) and return them to normal "
     1666               "operation. The currently assigned host key is shown on the status bar "
     1667               "at the bottom of the Virtual Machine window, next to the&nbsp;"
     1668               "<img src=:/hostkey_16px.png/>&nbsp;icon. This icon, together "
     1669               "with the mouse icon placed nearby, indicate the current keyboard "
     1670               "and mouse capture state.</p>") +
     1671            tr("<p>The host key is currently defined as <b>%1</b>.</p>",
     1672               "additional message box paragraph")
     1673                .arg(UIHostCombo::toReadableString(vboxGlobal().settings().hostCombo())),
     1674            "remindAboutAutoCapture");
     1675}
     1676
     1677void UIMessageCenter::remindAboutMouseIntegration(bool fSupportsAbsolute) const
     1678{
     1679    /* Do not show this async warning more than one at time: */
    16901680    if (warningShown("remindAboutMouseIntegration"))
    16911681        return;
    16921682    setWarningShown("remindAboutMouseIntegration", true);
    16931683
     1684    /* Show one of warnings, do not close outdated, not possible in current archi: */
    16941685    static const char *kNames [2] =
    16951686    {
     
    16971688        "remindAboutMouseIntegrationOn"
    16981689    };
    1699 
    1700     /* Close the previous (outdated) window if any. We use kName as
    1701      * pcszAutoConfirmId which is also used as the widget name by default. */
    1702     {
    1703         QWidget *outdated =
    1704             VBoxGlobal::findWidget(NULL, kNames [int (!fSupportsAbsolute)],
    1705                                     "QIMessageBox");
    1706         if (outdated)
    1707             outdated->close();
    1708     }
    1709 
    17101690    if (fSupportsAbsolute)
    17111691    {
    17121692        message(mainMachineWindowShown(), MessageType_Info,
    1713             tr("<p>The Virtual Machine reports that the guest OS supports "
    1714                "<b>mouse pointer integration</b>. This means that you do not "
    1715                "need to <i>capture</i> the mouse pointer to be able to use it "
    1716                "in your guest OS -- all "
    1717                "mouse actions you perform when the mouse pointer is over the "
    1718                "Virtual Machine's display are directly sent to the guest OS. "
    1719                "If the mouse is currently captured, it will be automatically "
    1720                "uncaptured."
    1721                "</p>"
    1722                "<p>The mouse icon on the status bar will look like&nbsp;"
    1723                "<img src=:/mouse_seamless_16px.png/>&nbsp;to inform you that mouse "
    1724                "pointer integration is supported by the guest OS and is "
    1725                "currently turned on."
    1726                "</p>"
    1727                "<p><b>Note</b>: Some applications may behave incorrectly in "
    1728                "mouse pointer integration mode. You can always disable it for "
    1729                "the current session (and enable it again) by selecting the "
    1730                "corresponding action from the menu bar."
    1731                "</p>"),
    1732             kNames [1] /* auto-confirm id */);
     1693                tr("<p>The Virtual Machine reports that the guest OS supports <b>mouse pointer integration</b>. "
     1694                   "This means that you do not need to <i>capture</i> the mouse pointer to be able to use it in your guest OS -- "
     1695                   "all mouse actions you perform when the mouse pointer is over the Virtual Machine's display "
     1696                   "are directly sent to the guest OS. If the mouse is currently captured, it will be automatically uncaptured.</p>"
     1697                   "<p>The mouse icon on the status bar will look like&nbsp;<img src=:/mouse_seamless_16px.png/>&nbsp;to inform you "
     1698                   "that mouse pointer integration is supported by the guest OS and is currently turned on.</p>"
     1699                   "<p><b>Note</b>: Some applications may behave incorrectly in mouse pointer integration mode. "
     1700                   "You can always disable it for the current session (and enable it again) "
     1701                   "by selecting the corresponding action from the menu bar.</p>"),
     1702                kNames [1] /* auto-confirm id */);
    17331703    }
    17341704    else
    17351705    {
    17361706        message(mainMachineWindowShown(), MessageType_Info,
    1737             tr("<p>The Virtual Machine reports that the guest OS does not "
    1738                "support <b>mouse pointer integration</b> in the current video "
    1739                "mode. You need to capture the mouse (by clicking over the VM "
    1740                "display or pressing the host key) in order to use the "
    1741                "mouse inside the guest OS.</p>"),
    1742             kNames [0] /* auto-confirm id */);
    1743     }
    1744 
     1707                tr("<p>The Virtual Machine reports that the guest OS does not support <b>mouse pointer integration</b> "
     1708                   "in the current video mode. You need to capture the mouse (by clicking over the VM display "
     1709                   "or pressing the host key) in order to use the mouse inside the guest OS.</p>"),
     1710                kNames [0] /* auto-confirm id */);
     1711    }
     1712
     1713    /* Allow to show this async warning: */
    17451714    setWarningShown("remindAboutMouseIntegration", false);
    17461715}
    17471716
    1748 bool UIMessageCenter::remindAboutPausedVMInput()
    1749 {
    1750     int rc = message(
    1751         mainMachineWindowShown(),
    1752         MessageType_Info,
    1753         tr("<p>The Virtual Machine is currently in the <b>Paused</b> state and "
    1754            "not able to see any keyboard or mouse input. If you want to "
    1755            "continue to work inside the VM, you need to resume it by selecting the "
    1756            "corresponding action from the menu bar.</p>"),
    1757         "remindAboutPausedVMInput"
    1758     );
     1717bool UIMessageCenter::remindAboutPausedVMInput() const
     1718{
     1719    int rc = message(mainMachineWindowShown(), MessageType_Info,
     1720                     tr("<p>The Virtual Machine is currently in the <b>Paused</b> state and "
     1721                        "not able to see any keyboard or mouse input. If you want to "
     1722                        "continue to work inside the VM, you need to resume it by selecting the "
     1723                        "corresponding action from the menu bar.</p>"),
     1724                        "remindAboutPausedVMInput");
    17591725    return !(rc & AutoConfirmed);
    17601726}
    17611727
    1762 void UIMessageCenter::cannotEnterSeamlessMode(ULONG /* uWidth */,
    1763                                               ULONG /* uHeight */,
    1764                                               ULONG /* uBpp */,
    1765                                               ULONG64 uMinVRAM)
     1728bool UIMessageCenter::confirmGoingFullscreen(const QString &strHotKey) const
     1729{
     1730    return messageOkCancel(mainMachineWindowShown(), MessageType_Info,
     1731                           tr("<p>The virtual machine window will be now switched to <b>fullscreen</b> mode. "
     1732                              "You can go back to windowed mode at any time by pressing <b>%1</b>.</p>"
     1733                              "<p>Note that the <i>Host</i> key is currently defined as <b>%2</b>.</p>"
     1734                              "<p>Note that the main menu bar is hidden in fullscreen mode. "
     1735                              "You can access it by pressing <b>Host+Home</b>.</p>")
     1736                              .arg(strHotKey)
     1737                              .arg(UIHostCombo::toReadableString(vboxGlobal().settings().hostCombo())),
     1738                           "confirmGoingFullscreen",
     1739                           tr("Switch"));
     1740}
     1741
     1742bool UIMessageCenter::confirmGoingSeamless(const QString &strHotKey) const
     1743{
     1744    return messageOkCancel(mainMachineWindowShown(), MessageType_Info,
     1745                           tr("<p>The virtual machine window will be now switched to <b>Seamless</b> mode. "
     1746                              "You can go back to windowed mode at any time by pressing <b>%1</b>.</p>"
     1747                              "<p>Note that the <i>Host</i> key is currently defined as <b>%2</b>.</p>"
     1748                              "<p>Note that the main menu bar is hidden in seamless mode. "
     1749                              "You can access it by pressing <b>Host+Home</b>.</p>")
     1750                              .arg(strHotKey)
     1751                              .arg(UIHostCombo::toReadableString(vboxGlobal().settings().hostCombo())),
     1752                           "confirmGoingSeamless",
     1753                           tr("Switch"));
     1754}
     1755
     1756bool UIMessageCenter::confirmGoingScale(const QString &strHotKey) const
     1757{
     1758    return messageOkCancel(mainMachineWindowShown(), MessageType_Info,
     1759                           tr("<p>The virtual machine window will be now switched to <b>Scale</b> mode. "
     1760                              "You can go back to windowed mode at any time by pressing <b>%1</b>.</p>"
     1761                              "<p>Note that the <i>Host</i> key is currently defined as <b>%2</b>.</p>"
     1762                              "<p>Note that the main menu bar is hidden in scale mode. "
     1763                              "You can access it by pressing <b>Host+Home</b>.</p>")
     1764                              .arg(strHotKey)
     1765                              .arg(UIHostCombo::toReadableString(vboxGlobal().settings().hostCombo())),
     1766                           "confirmGoingScale",
     1767                           tr("Switch"));
     1768}
     1769
     1770bool UIMessageCenter::cannotEnterFullscreenMode(ULONG /* uWidth */, ULONG /* uHeight */, ULONG /* uBpp */, ULONG64 uMinVRAM) const
     1771{
     1772    return messageOkCancel(mainMachineWindowShown(), MessageType_Warning,
     1773                           tr("<p>Could not switch the guest display to fullscreen mode due to insufficient guest video memory.</p>"
     1774                              "<p>You should configure the virtual machine to have at least <b>%1</b> of video memory.</p>"
     1775                              "<p>Press <b>Ignore</b> to switch to fullscreen mode anyway or press <b>Cancel</b> to cancel the operation.</p>")
     1776                              .arg(VBoxGlobal::formatSize(uMinVRAM)),
     1777                           0 /* auto-confirm id */,
     1778                           QIMessageBox::tr("Ignore"));
     1779}
     1780
     1781void UIMessageCenter::cannotEnterSeamlessMode(ULONG /* uWidth */, ULONG /* uHeight */, ULONG /* uBpp */, ULONG64 uMinVRAM) const
    17661782{
    17671783    message(mainMachineWindowShown(), MessageType_Error,
    1768              tr("<p>Could not enter seamless mode due to insufficient guest "
    1769                   "video memory.</p>"
    1770                   "<p>You should configure the virtual machine to have at "
    1771                   "least <b>%1</b> of video memory.</p>")
    1772              .arg(VBoxGlobal::formatSize(uMinVRAM)));
    1773 }
    1774 
    1775 int UIMessageCenter::cannotEnterFullscreenMode(ULONG /* uWidth */,
    1776                                                ULONG /* uHeight */,
    1777                                                ULONG /* uBpp */,
    1778                                                ULONG64 uMinVRAM)
    1779 {
    1780     return message(mainMachineWindowShown(), MessageType_Warning,
    1781              tr("<p>Could not switch the guest display to fullscreen mode due "
    1782                  "to insufficient guest video memory.</p>"
    1783                  "<p>You should configure the virtual machine to have at "
    1784                  "least <b>%1</b> of video memory.</p>"
    1785                  "<p>Press <b>Ignore</b> to switch to fullscreen mode anyway "
    1786                  "or press <b>Cancel</b> to cancel the operation.</p>")
    1787              .arg(VBoxGlobal::formatSize(uMinVRAM)),
    1788              0 /* auto-confirm id */,
    1789              AlertButton_Ignore | AlertButtonOption_Default,
    1790              AlertButton_Cancel | AlertButtonOption_Escape);
    1791 }
    1792 
    1793 void UIMessageCenter::cannotSwitchScreenInSeamless(quint64 uMinVRAM)
     1784            tr("<p>Could not enter seamless mode due to insufficient guest "
     1785               "video memory.</p>"
     1786               "<p>You should configure the virtual machine to have at "
     1787               "least <b>%1</b> of video memory.</p>")
     1788               .arg(VBoxGlobal::formatSize(uMinVRAM)));
     1789}
     1790
     1791bool UIMessageCenter::cannotSwitchScreenInFullscreen(quint64 uMinVRAM) const
     1792{
     1793    return messageOkCancel(mainMachineWindowShown(), MessageType_Warning,
     1794                           tr("<p>Could not change the guest screen to this host screen due to insufficient guest video memory.</p>"
     1795                              "<p>You should configure the virtual machine to have at least <b>%1</b> of video memory.</p>"
     1796                              "<p>Press <b>Ignore</b> to switch the screen anyway or press <b>Cancel</b> to cancel the operation.</p>")
     1797                              .arg(VBoxGlobal::formatSize(uMinVRAM)),
     1798                           0 /* auto-confirm id */,
     1799                           QIMessageBox::tr("Ignore"));
     1800}
     1801
     1802void UIMessageCenter::cannotSwitchScreenInSeamless(quint64 uMinVRAM) const
    17941803{
    17951804    message(mainMachineWindowShown(), MessageType_Error,
     
    17981807               "<p>You should configure the virtual machine to have at "
    17991808               "least <b>%1</b> of video memory.</p>")
    1800             .arg(VBoxGlobal::formatSize(uMinVRAM)));
    1801 }
    1802 
    1803 int UIMessageCenter::cannotSwitchScreenInFullscreen(quint64 uMinVRAM)
    1804 {
    1805     return message(mainMachineWindowShown(), MessageType_Warning,
    1806                    tr("<p>Could not change the guest screen to this host screen "
    1807                       "due to insufficient guest video memory.</p>"
    1808                       "<p>You should configure the virtual machine to have at "
    1809                       "least <b>%1</b> of video memory.</p>"
    1810                       "<p>Press <b>Ignore</b> to switch the screen anyway "
    1811                       "or press <b>Cancel</b> to cancel the operation.</p>")
    1812                    .arg(VBoxGlobal::formatSize(uMinVRAM)),
    1813                    0 /* auto-confirm id */,
    1814                    AlertButton_Ignore | AlertButtonOption_Default,
    1815                    AlertButton_Cancel | AlertButtonOption_Escape);
    1816 }
    1817 
    1818 bool UIMessageCenter::confirmGoingFullscreen(const QString &strHotKey)
    1819 {
    1820     return messageOkCancel(mainMachineWindowShown(), MessageType_Info,
    1821         tr("<p>The virtual machine window will be now switched to <b>fullscreen</b> mode. "
    1822            "You can go back to windowed mode at any time by pressing <b>%1</b>.</p>"
    1823            "<p>Note that the <i>Host</i> key is currently defined as <b>%2</b>.</p>"
    1824            "<p>Note that the main menu bar is hidden in fullscreen mode. "
    1825            "You can access it by pressing <b>Host+Home</b>.</p>")
    1826             .arg(strHotKey)
    1827             .arg(UIHostCombo::toReadableString(vboxGlobal().settings().hostCombo())),
    1828         "confirmGoingFullscreen",
    1829         tr("Switch", "fullscreen"));
    1830 }
    1831 
    1832 bool UIMessageCenter::confirmGoingSeamless(const QString &strHotKey)
    1833 {
    1834     return messageOkCancel(mainMachineWindowShown(), MessageType_Info,
    1835         tr("<p>The virtual machine window will be now switched to <b>Seamless</b> mode. "
    1836            "You can go back to windowed mode at any time by pressing <b>%1</b>.</p>"
    1837            "<p>Note that the <i>Host</i> key is currently defined as <b>%2</b>.</p>"
    1838            "<p>Note that the main menu bar is hidden in seamless mode. "
    1839            "You can access it by pressing <b>Host+Home</b>.</p>")
    1840             .arg(strHotKey)
    1841             .arg(UIHostCombo::toReadableString(vboxGlobal().settings().hostCombo())),
    1842         "confirmGoingSeamless",
    1843         tr("Switch", "seamless"));
    1844 }
    1845 
    1846 bool UIMessageCenter::confirmGoingScale(const QString &strHotKey)
    1847 {
    1848     return messageOkCancel(mainMachineWindowShown(), MessageType_Info,
    1849         tr("<p>The virtual machine window will be now switched to <b>Scale</b> mode. "
    1850            "You can go back to windowed mode at any time by pressing <b>%1</b>.</p>"
    1851            "<p>Note that the <i>Host</i> key is currently defined as <b>%2</b>.</p>"
    1852            "<p>Note that the main menu bar is hidden in scale mode. "
    1853            "You can access it by pressing <b>Host+Home</b>.</p>")
    1854             .arg(strHotKey)
    1855             .arg(UIHostCombo::toReadableString(vboxGlobal().settings().hostCombo())),
    1856         "confirmGoingScale",
    1857         tr("Switch", "scale"));
     1809               .arg(VBoxGlobal::formatSize(uMinVRAM)));
    18581810}
    18591811
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h

    r45328 r45333  
    300300    /* API: Runtime UI warnings: */
    301301    void showRuntimeError(const CConsole &console, bool fFatal, const QString &strErrorId, const QString &strErrorMsg) const;
    302     bool warnAboutVirtNotEnabled64BitsGuest(bool fHWVirtExSupported);
    303     bool warnAboutVirtNotEnabledGuestRequired(bool fHWVirtExSupported);
    304     bool cannotStartWithoutNetworkIf(const QString &strMachineName, const QString &strIfNames);
    305     void cannotStartMachine(const CConsole &console, const QString &strName);
    306     void cannotStartMachine(const CProgress &progress, const QString &strName);
    307     void cannotSendACPIToMachine();
    308     bool confirmInputCapture(bool *pfAutoConfirmed = NULL);
    309     void remindAboutAutoCapture();
    310     void remindAboutMouseIntegration(bool fSupportsAbsolute);
    311     bool remindAboutPausedVMInput();
    312     void cannotEnterSeamlessMode(ULONG uWidth, ULONG uHeight,
    313                                  ULONG uBpp, ULONG64 uMinVRAM);
    314     int cannotEnterFullscreenMode(ULONG uWidth, ULONG uHeight,
    315                                   ULONG uBpp, ULONG64 uMinVRAM);
    316     void cannotSwitchScreenInSeamless(quint64 uMinVRAM);
    317     int cannotSwitchScreenInFullscreen(quint64 uMinVRAM);
    318     bool confirmGoingFullscreen(const QString &strHotKey);
    319     bool confirmGoingSeamless(const QString &strHotKey);
    320     bool confirmGoingScale(const QString &strHotKey);
     302    bool warnAboutVirtNotEnabled64BitsGuest(bool fHWVirtExSupported) const;
     303    bool warnAboutVirtNotEnabledGuestRequired(bool fHWVirtExSupported) const;
     304    bool cannotStartWithoutNetworkIf(const QString &strMachineName, const QString &strIfNames) const;
     305    void cannotStartMachine(const CConsole &console, const QString &strName) const;
     306    void cannotStartMachine(const CProgress &progress, const QString &strName) const;
     307    void cannotSendACPIToMachine() const;
     308    bool confirmInputCapture(bool &fAutoConfirmed) const;
     309    void remindAboutAutoCapture() const;
     310    void remindAboutMouseIntegration(bool fSupportsAbsolute) const;
     311    bool remindAboutPausedVMInput() const;
     312    bool confirmGoingFullscreen(const QString &strHotKey) const;
     313    bool confirmGoingSeamless(const QString &strHotKey) const;
     314    bool confirmGoingScale(const QString &strHotKey) const;
     315    bool cannotEnterFullscreenMode(ULONG uWidth, ULONG uHeight, ULONG uBpp, ULONG64 uMinVRAM) const;
     316    void cannotEnterSeamlessMode(ULONG uWidth, ULONG uHeight, ULONG uBpp, ULONG64 uMinVRAM) const;
     317    bool cannotSwitchScreenInFullscreen(quint64 uMinVRAM) const;
     318    void cannotSwitchScreenInSeamless(quint64 uMinVRAM) const;
    321319    void cannotAttachUSBDevice(const CConsole &console, const QString &device);
    322320    void cannotAttachUSBDevice(const CConsole &console, const QString &device,
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp

    r44797 r45333  
    12851285                    setAutoCaptureDisabled(true);
    12861286                    bool fIsAutoConfirmed = false;
    1287                     ok = msgCenter().confirmInputCapture(&fIsAutoConfirmed);
     1287                    ok = msgCenter().confirmInputCapture(fIsAutoConfirmed);
    12881288                    if (fIsAutoConfirmed)
    12891289                        setAutoCaptureDisabled(false);
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp

    r45209 r45333  
    877877                     * the capture state is to be defined by the dialog result itself: */
    878878                    uisession()->setAutoCaptureDisabled(true);
    879                     bool autoConfirmed = false;
    880                     bool ok = msgCenter().confirmInputCapture(&autoConfirmed);
    881                     if (autoConfirmed)
     879                    bool fIsAutoConfirmed = false;
     880                    bool ok = msgCenter().confirmInputCapture(fIsAutoConfirmed);
     881                    if (fIsAutoConfirmed)
    882882                        uisession()->setAutoCaptureDisabled(false);
    883883                    /* Otherwise, the disable flag will be reset in the next console view's focus in event (since
     
    889889                         * otherwise the mouse is immediately ungrabbed again: */
    890890                        qApp->processEvents();
    891 #endif
     891#endif /* Q_WS_X11 */
    892892                        machineLogic()->keyboardHandler()->captureKeyboard(uScreenId);
    893893                        captureMouse(uScreenId);
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.cpp

    r45296 r45333  
    226226                msgCenter().cannotSwitchScreenInSeamless((((usedBits + 7) / 8 + _1M - 1) / _1M) * _1M);
    227227            else
    228                 fSuccess = msgCenter().cannotSwitchScreenInFullscreen((((usedBits + 7) / 8 + _1M - 1) / _1M) * _1M) != AlertButton_Cancel;
     228                fSuccess = msgCenter().cannotSwitchScreenInFullscreen((((usedBits + 7) / 8 + _1M - 1) / _1M) * _1M);
    229229        }
    230230    }
  • trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp

    r45296 r45333  
    6060        if (availBits < usedBits)
    6161        {
    62             int result = msgCenter().cannotEnterFullscreenMode(0, 0, 0,
    63                                                                (((usedBits + 7) / 8 + _1M - 1) / _1M) * _1M);
    64             if (result == AlertButton_Cancel)
     62            if (!msgCenter().cannotEnterFullscreenMode(0, 0, 0, (((usedBits + 7) / 8 + _1M - 1) / _1M) * _1M))
    6563                return false;
    6664        }
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