Changeset 47510 in vbox
- Timestamp:
- Aug 1, 2013 2:13:16 PM (11 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/VBoxFBOverlay.cpp
r44529 r47510 31 31 #include "VBoxFBOverlay.h" 32 32 #include "UIMessageCenter.h" 33 #include "UIPopupCenter.h" 33 34 #include "VBoxGlobal.h" 34 35 … … 3922 3923 3923 3924 if (remind) 3924 msgCenter().remindAboutWrongColorDepth(size.bitsPerPixel(), 32); 3925 popupCenter().remindAboutWrongColorDepth(vboxGlobal().activeMachineWindow(), size.bitsPerPixel(), 32); 3926 else 3927 popupCenter().forgetAboutWrongColorDepth(vboxGlobal().activeMachineWindow()); 3925 3928 } 3926 3929 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
r46813 r47510 1766 1766 } 1767 1767 1768 void UIMessageCenter::cannotSendACPIToMachine() const1769 {1770 alert(0, MessageType_Warning,1771 tr("You are trying to shut down the guest with the ACPI power button. "1772 "This is currently not possible because the guest does not support software shutdown."));1773 }1774 1775 1768 bool UIMessageCenter::confirmInputCapture(bool &fAutoConfirmed) const 1776 1769 { … … 1796 1789 /* True if "Ok" was pressed: */ 1797 1790 return (rc & AlertButtonMask) == AlertButton_Ok; 1798 }1799 1800 void UIMessageCenter::remindAboutAutoCapture() const1801 {1802 alert(0, MessageType_Info,1803 tr("<p>You have the <b>Auto capture keyboard</b> option turned on. "1804 "This will cause the Virtual Machine to automatically <b>capture</b> "1805 "the keyboard every time the VM window is activated and make it "1806 "unavailable to other applications running on your host machine: "1807 "when the keyboard is captured, all keystrokes (including system ones "1808 "like Alt-Tab) will be directed to the VM.</p>"1809 "<p>You can press the <b>host key</b> at any time to <b>uncapture</b> the "1810 "keyboard and mouse (if it is captured) and return them to normal "1811 "operation. The currently assigned host key is shown on the status bar "1812 "at the bottom of the Virtual Machine window, next to the "1813 "<img src=:/hostkey_16px.png/> icon. This icon, together "1814 "with the mouse icon placed nearby, indicate the current keyboard "1815 "and mouse capture state.</p>") +1816 tr("<p>The host key is currently defined as <b>%1</b>.</p>",1817 "additional message box paragraph")1818 .arg(UIHostCombo::toReadableString(vboxGlobal().settings().hostCombo())),1819 "remindAboutAutoCapture");1820 }1821 1822 void UIMessageCenter::remindAboutMouseIntegration(bool fSupportsAbsolute) const1823 {1824 if (warningShown("remindAboutMouseIntegration"))1825 return;1826 setWarningShown("remindAboutMouseIntegration", true);1827 1828 /* Show one of warnings, do not close outdated, not possible in current archi: */1829 static const char *kNames [2] =1830 {1831 "remindAboutMouseIntegrationOff",1832 "remindAboutMouseIntegrationOn"1833 };1834 if (fSupportsAbsolute)1835 {1836 alert(0, MessageType_Info,1837 tr("<p>The Virtual Machine reports that the guest OS supports <b>mouse pointer integration</b>. "1838 "This means that you do not need to <i>capture</i> the mouse pointer to be able to use it in your guest OS -- "1839 "all mouse actions you perform when the mouse pointer is over the Virtual Machine's display "1840 "are directly sent to the guest OS. If the mouse is currently captured, it will be automatically uncaptured.</p>"1841 "<p>The mouse icon on the status bar will look like <img src=:/mouse_seamless_16px.png/> to inform you "1842 "that mouse pointer integration is supported by the guest OS and is currently turned on.</p>"1843 "<p><b>Note</b>: Some applications may behave incorrectly in mouse pointer integration mode. "1844 "You can always disable it for the current session (and enable it again) "1845 "by selecting the corresponding action from the menu bar.</p>"),1846 kNames [1] /* auto-confirm id */);1847 }1848 else1849 {1850 alert(0, MessageType_Info,1851 tr("<p>The Virtual Machine reports that the guest OS does not support <b>mouse pointer integration</b> "1852 "in the current video mode. You need to capture the mouse (by clicking over the VM display "1853 "or pressing the host key) in order to use the mouse inside the guest OS.</p>"),1854 kNames [0] /* auto-confirm id */);1855 }1856 1857 setWarningShown("remindAboutMouseIntegration", false);1858 }1859 1860 void UIMessageCenter::remindAboutPausedVMInput() const1861 {1862 alert(0, MessageType_Info,1863 tr("<p>The Virtual Machine is currently in the <b>Paused</b> state and "1864 "not able to see any keyboard or mouse input. If you want to "1865 "continue to work inside the VM, you need to resume it by selecting the "1866 "corresponding action from the menu bar.</p>"),1867 "remindAboutPausedVMInput");1868 1791 } 1869 1792 … … 2479 2402 } 2480 2403 2481 void UIMessageCenter::remindAboutWrongColorDepth(ulong uRealBPP, ulong uWantedBPP) const2482 {2483 emit sigRemindAboutWrongColorDepth(uRealBPP, uWantedBPP);2484 }2485 2486 2404 void UIMessageCenter::sltShowHelpWebDialog() 2487 2405 { … … 2582 2500 } 2583 2501 2584 void UIMessageCenter::sltRemindAboutWrongColorDepth(ulong uRealBPP, ulong uWantedBPP) const2585 {2586 alert(0, MessageType_Info,2587 tr("<p>The virtual machine window is optimized to work in "2588 "<b>%1 bit</b> color mode but the "2589 "virtual display is currently set to <b>%2 bit</b>.</p>"2590 "<p>Please open the display properties dialog of the guest OS and "2591 "select a <b>%3 bit</b> color mode, if it is available, for "2592 "best possible performance of the virtual video subsystem.</p>"2593 "<p><b>Note</b>. Some operating systems, like OS/2, may actually "2594 "work in 32 bit mode but report it as 24 bit "2595 "(16 million colors). You may try to select a different color "2596 "mode to see if this message disappears or you can simply "2597 "disable the message now if you are sure the required color "2598 "mode (%4 bit) is not available in the guest OS.</p>")2599 .arg(uWantedBPP).arg(uRealBPP).arg(uWantedBPP).arg(uWantedBPP),2600 "remindAboutWrongColorDepth");2601 }2602 2603 2502 UIMessageCenter::UIMessageCenter() 2604 2503 { … … 2638 2537 Qt::BlockingQueuedConnection); 2639 2538 2640 /* Prepare synchronization connection: */2641 connect(this, SIGNAL(sigRemindAboutWrongColorDepth(ulong, ulong)),2642 this, SLOT(sltRemindAboutWrongColorDepth(ulong, ulong)), Qt::QueuedConnection);2643 2644 2539 /* Translations for Main. 2645 2540 * Please make sure they corresponds to the strings coming from Main one-by-one symbol! */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
r46813 r47510 63 63 const QString &strButtonText1, const QString &strButtonText2, const QString &strButtonText3, 64 64 const QString &strAutoConfirmId) const; 65 66 /* Notifiers: Synchronization stuff: */67 void sigRemindAboutWrongColorDepth(ulong uRealBPP, ulong uWantedBPP) const;68 65 69 66 public: … … 282 279 void cannotStartMachine(const CConsole &console, const QString &strName) const; 283 280 void cannotStartMachine(const CProgress &progress, const QString &strName) const; 284 void cannotSendACPIToMachine() const;285 281 bool confirmInputCapture(bool &fAutoConfirmed) const; 286 void remindAboutAutoCapture() const;287 void remindAboutMouseIntegration(bool fSupportsAbsolute) const;288 void remindAboutPausedVMInput() const;289 282 bool confirmGoingFullscreen(const QString &strHotKey) const; 290 283 bool confirmGoingSeamless(const QString &strHotKey) const; … … 358 351 static QString formatErrorInfo(const COMResult &rc); 359 352 360 /* API: Async stuff: */361 void remindAboutWrongColorDepth(ulong uRealBPP, ulong uWantedBPP) const;362 363 353 public slots: 364 354 … … 379 369 const QString &strAutoConfirmId) const; 380 370 381 /* Handlers: Synchronization stuff: */382 void sltRemindAboutWrongColorDepth(ulong uRealBPP, ulong uWantedBPP) const;383 384 371 private: 385 372 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.cpp
r47493 r47510 173 173 bool fProposeAutoConfirmation) 174 174 { 175 /* Make sure parent is set! */ 176 AssertMsg(pParent, ("Parent is NULL!")); 177 if (!pParent) 178 return; 179 175 180 /* Make sure at least one button is valid: */ 176 181 if (iButton1 == 0 && iButton2 == 0) … … 196 201 } 197 202 198 /* Make sure parent is set! */199 AssertMsg(pParent, ("Parent is NULL!"));200 if (!pParent)201 return;202 203 203 /* Looking for the corresponding popup-stack: */ 204 204 const QString strPopupStackID(popupStackID(pParent)); … … 442 442 void UIPopupCenter::cannotSendACPIToMachine(QWidget *pParent) 443 443 { 444 alert(pParent, 444 alert(pParent, "cannotSendACPIToMachine", 445 445 QApplication::translate("UIMessageCenter", "You are trying to shut down the guest with the ACPI power button. " 446 446 "This is currently not possible because the guest does not support software shutdown.")); … … 504 504 } 505 505 506 void UIPopupCenter::remindAboutGuestAdditionsAreNotActive(QWidget *pParent) 507 { 508 alert(pParent, "remindAboutGuestAdditionsAreNotActive", 509 QApplication::translate("UIMessageCenter", "<p>The VirtualBox Guest Additions do not appear to be available on this virtual machine, " 510 "and shared folders cannot be used without them. To use shared folders inside the virtual machine, " 511 "please install the Guest Additions if they are not installed, or re-install them if they are " 512 "not working correctly, by selecting <b>Install Guest Additions</b> from the <b>Devices</b> menu. " 513 "If they are installed but the machine is not yet fully started then shared folders will be available once it is.</p>"), 514 true); 515 } 516 517 void UIPopupCenter::updatePopupAboutWrongColorDepth(QWidget *pParent, ulong uRealBPP, ulong uWantedBPP) 506 void UIPopupCenter::remindAboutWrongColorDepth(QWidget *pParent, ulong uRealBPP, ulong uWantedBPP) 518 507 { 519 508 alert(pParent, "remindAboutWrongColorDepth", … … 530 519 } 531 520 532 void UIPopupCenter:: recallPopupAboutWrongColorDepth(QWidget *pParent)521 void UIPopupCenter::forgetAboutWrongColorDepth(QWidget *pParent) 533 522 { 534 523 recall(pParent, "remindAboutWrongColorDepth"); -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.h
r47493 r47510 104 104 void remindAboutMouseIntegration(QWidget *pParent, bool fSupportsAbsolute); 105 105 void remindAboutPausedVMInput(QWidget *pParent); 106 void remindAboutGuestAdditionsAreNotActive(QWidget *pParent); 107 void updatePopupAboutWrongColorDepth(QWidget *pParent, ulong uRealBPP, ulong uWantedBPP); 108 void recallPopupAboutWrongColorDepth(QWidget *pParent); 106 void remindAboutWrongColorDepth(QWidget *pParent, ulong uRealBPP, ulong uWantedBPP); 107 void forgetAboutWrongColorDepth(QWidget *pParent); 109 108 110 109 private slots: -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBufferQImage.cpp
r47372 r47510 141 141 /* Remind if requested: */ 142 142 if (bRemind) 143 popupCenter(). updatePopupAboutWrongColorDepth(m_pMachineView->machineWindow(),143 popupCenter().remindAboutWrongColorDepth(m_pMachineView->machineWindow(), 144 144 pEvent->bitsPerPixel(), 32); 145 145 else 146 popupCenter(). recallPopupAboutWrongColorDepth(m_pMachineView->machineWindow());146 popupCenter().forgetAboutWrongColorDepth(m_pMachineView->machineWindow()); 147 147 } 148 148 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBufferQuartz2D.cpp
r47210 r47510 211 211 212 212 if (remind) 213 popupCenter(). updatePopupAboutWrongColorDepth(m_pMachineView->machineWindow(),213 popupCenter().remindAboutWrongColorDepth(m_pMachineView->machineWindow(), 214 214 aEvent->bitsPerPixel(), 32); 215 215 else 216 popupCenter(). recallPopupAboutWrongColorDepth(m_pMachineView->machineWindow());216 popupCenter().forgetAboutWrongColorDepth(m_pMachineView->machineWindow()); 217 217 } 218 218
Note:
See TracChangeset
for help on using the changeset viewer.