Changeset 90689 in vbox
- Timestamp:
- Aug 15, 2021 3:03:02 PM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.cpp
r82968 r90689 422 422 } 423 423 424 void UIPopupCenter::cannotSendACPIToMachine(QWidget *pParent)425 {426 alert(pParent, "cannotSendACPIToMachine",427 QApplication::translate("UIMessageCenter", "You are trying to shut down the guest with the ACPI power button. "428 "This is currently not possible because the guest does not support software shutdown."));429 }430 431 void UIPopupCenter::remindAboutAutoCapture(QWidget *pParent)432 {433 alert(pParent, "remindAboutAutoCapture",434 QApplication::translate("UIMessageCenter", "<p>You have the <b>Auto capture keyboard</b> option turned on. "435 "This will cause the Virtual Machine to automatically <b>capture</b> "436 "the keyboard every time the VM window is activated and make it "437 "unavailable to other applications running on your host machine: "438 "when the keyboard is captured, all keystrokes (including system ones "439 "like Alt-Tab) will be directed to the VM.</p>"440 "<p>You can press the <b>host key</b> at any time to <b>uncapture</b> the "441 "keyboard and mouse (if it is captured) and return them to normal "442 "operation. The currently assigned host key is shown on the status bar "443 "at the bottom of the Virtual Machine window, next to the "444 "<img src=:/hostkey_16px.png/> icon. This icon, together "445 "with the mouse icon placed nearby, indicate the current keyboard "446 "and mouse capture state.</p>") +447 QApplication::translate("UIMessageCenter", "<p>The host key is currently defined as <b>%1</b>.</p>",448 "additional message box paragraph")449 .arg(UIHostCombo::toReadableString(gEDataManager->hostKeyCombination())),450 true);451 }452 453 void UIPopupCenter::remindAboutMouseIntegration(QWidget *pParent, bool fSupportsAbsolute)454 {455 if (fSupportsAbsolute)456 {457 alert(pParent, "remindAboutMouseIntegration",458 QApplication::translate("UIMessageCenter", "<p>The Virtual Machine reports that the guest OS supports <b>mouse pointer integration</b>. "459 "This means that you do not need to <i>capture</i> the mouse pointer to be able to use it in your guest OS -- "460 "all mouse actions you perform when the mouse pointer is over the Virtual Machine's display "461 "are directly sent to the guest OS. If the mouse is currently captured, it will be automatically uncaptured.</p>"462 "<p>The mouse icon on the status bar will look like <img src=:/mouse_seamless_16px.png/> to inform you "463 "that mouse pointer integration is supported by the guest OS and is currently turned on.</p>"464 "<p><b>Note</b>: Some applications may behave incorrectly in mouse pointer integration mode. "465 "You can always disable it for the current session (and enable it again) "466 "by selecting the corresponding action from the menu bar.</p>"),467 true);468 }469 else470 {471 alert(pParent, "remindAboutMouseIntegration",472 QApplication::translate("UIMessageCenter", "<p>The Virtual Machine reports that the guest OS does not support <b>mouse pointer integration</b> "473 "in the current video mode. You need to capture the mouse (by clicking over the VM display "474 "or pressing the host key) in order to use the mouse inside the guest OS.</p>"),475 true);476 }477 }478 479 void UIPopupCenter::remindAboutPausedVMInput(QWidget *pParent)480 {481 alert(pParent, "remindAboutPausedVMInput",482 QApplication::translate("UIMessageCenter", "<p>The Virtual Machine is currently in the <b>Paused</b> state and not able to see any keyboard or mouse input. "483 "If you want to continue to work inside the VM, you need to resume it by selecting the corresponding action "484 "from the menu bar.</p>"),485 true);486 }487 488 void UIPopupCenter::forgetAboutPausedVMInput(QWidget *pParent)489 {490 recall(pParent, "remindAboutPausedVMInput");491 }492 493 void UIPopupCenter::remindAboutWrongColorDepth(QWidget *pParent, ulong uRealBPP, ulong uWantedBPP)494 {495 alert(pParent, "remindAboutWrongColorDepth",496 QApplication::translate("UIMessageCenter", "<p>The virtual screen is currently set to a <b>%1 bit</b> color mode. For better "497 "performance please change this to <b>%2 bit</b>. This can usually be done from the"498 " <b>Display</b> section of the guest operating system's Control Panel or System Settings.</p>")499 .arg(uRealBPP).arg(uWantedBPP),500 true);501 }502 503 void UIPopupCenter::forgetAboutWrongColorDepth(QWidget *pParent)504 {505 recall(pParent, "remindAboutWrongColorDepth");506 }507 508 424 void UIPopupCenter::cannotAttachUSBDevice(QWidget *pParent, const CConsole &comConsole, const QString &strDevice) 509 425 { … … 593 509 } 594 510 595 void UIPopupCenter::remindAboutGuestAdditionsAreNotActive(QWidget *pParent)596 {597 alert(pParent, "remindAboutGuestAdditionsAreNotActive",598 QApplication::translate("UIMessageCenter", "<p>The VirtualBox Guest Additions do not appear to be available on this virtual machine, "599 "and shared folders cannot be used without them. To use shared folders inside the virtual machine, "600 "please install the Guest Additions if they are not installed, or re-install them if they are "601 "not working correctly, by selecting <b>Insert Guest Additions CD image</b> from the <b>Devices</b> menu. "602 "If they are installed but the machine is not yet fully started then shared folders will be available once it is.</p>"),603 true);604 }605 606 511 void UIPopupCenter::cannotToggleAudioOutput(QWidget *pParent, const CAudioAdapter &comAdapter, const QString &strMachineName, bool fEnable) 607 512 { -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.h
r82968 r90689 148 148 149 149 /* API: Runtime UI stuff: */ 150 void cannotSendACPIToMachine(QWidget *pParent);151 void remindAboutAutoCapture(QWidget *pParent);152 void remindAboutMouseIntegration(QWidget *pParent, bool fSupportsAbsolute);153 void remindAboutPausedVMInput(QWidget *pParent);154 void forgetAboutPausedVMInput(QWidget *pParent);155 void remindAboutWrongColorDepth(QWidget *pParent, ulong uRealBPP, ulong uWantedBPP);156 void forgetAboutWrongColorDepth(QWidget *pParent);157 150 void cannotAttachUSBDevice(QWidget *pParent, const CConsole &comConsole, const QString &strDevice); 158 151 void cannotAttachUSBDevice(QWidget *pParent, const CVirtualBoxErrorInfo &comErrorInfo, … … 170 163 void cannotToggleNetworkAdapterCable(QWidget *pParent, const CNetworkAdapter &comAdapter, 171 164 const QString &strMachineName, bool fConnect); 172 void remindAboutGuestAdditionsAreNotActive(QWidget *pParent);173 165 void cannotToggleAudioOutput(QWidget *pParent, const CAudioAdapter &comAdapter, 174 166 const QString &strMachineName, bool fEnable); -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.cpp
r90687 r90689 22 22 /* GUI includes: */ 23 23 #include "UICommon.h" 24 #include "UIExtraDataManager.h" 25 #include "UIHostComboEditor.h" 24 26 #include "UINotificationCenter.h" 25 27 #include "UINotificationObjects.h" … … 41 43 /* static */ 42 44 QMap<QString, QUuid> UINotificationMessage::m_messages = QMap<QString, QUuid>(); 45 46 /* static */ 47 void UINotificationMessage::cannotSendACPIToMachine() 48 { 49 createMessage( 50 QApplication::translate("UIMessageCenter", "Can't send ACPI ..."), 51 QApplication::translate("UIMessageCenter", "You are trying to shut down the guest with the ACPI power button. " 52 "This is currently not possible because the guest does not support " 53 "software shutdown.")); 54 } 55 56 /* static */ 57 void UINotificationMessage::remindAboutAutoCapture() 58 { 59 createMessage( 60 QApplication::translate("UIMessageCenter", "Auto capture keyboard ..."), 61 QApplication::translate("UIMessageCenter", "<p>You have the <b>Auto capture keyboard</b> option turned on. " 62 "This will cause the Virtual Machine to automatically <b>capture</b> " 63 "the keyboard every time the VM window is activated and make it " 64 "unavailable to other applications running on your host machine: " 65 "when the keyboard is captured, all keystrokes (including system ones " 66 "like Alt-Tab) will be directed to the VM.</p>" 67 "<p>You can press the <b>host key</b> at any time to <b>uncapture</b> the " 68 "keyboard and mouse (if it is captured) and return them to normal " 69 "operation. The currently assigned host key is shown on the status bar " 70 "at the bottom of the Virtual Machine window. This icon, together " 71 "with the mouse icon placed nearby, indicate the current keyboard " 72 "and mouse capture state.</p>") + 73 QApplication::translate("UIMessageCenter", "<p>The host key is currently defined as <b>%1</b>.</p>", 74 "additional message box paragraph") 75 .arg(UIHostCombo::toReadableString(gEDataManager->hostKeyCombination())), 76 "remindAboutAutoCapture"); 77 } 78 79 /* static */ 80 void UINotificationMessage::remindAboutMouseIntegration(bool fSupportsAbsolute) 81 { 82 if (fSupportsAbsolute) 83 { 84 createMessage( 85 QApplication::translate("UIMessageCenter", "Mouse integration ..."), 86 QApplication::translate("UIMessageCenter", "<p>The Virtual Machine reports that the guest OS supports <b>mouse " 87 "pointer integration</b>. This means that you do not need to " 88 "<i>capture</i> the mouse pointer to be able to use it in your guest " 89 "OS -- all mouse actions you perform when the mouse pointer is over the " 90 "Virtual Machine's display are directly sent to the guest OS. If the " 91 "mouse is currently captured, it will be automatically uncaptured.</p>" 92 "<p>The mouse icon on the status bar will look " 93 "like <img src=:/mouse_seamless_16px.png/> to inform you that " 94 "mouse pointer integration is supported by the guest OS and is currently " 95 "turned on.</p><p><b>Note</b>: Some applications may behave incorrectly " 96 "in mouse pointer integration mode. You can always disable it for the " 97 "current session (and enable it again) by selecting the corresponding " 98 "action from the menu bar.</p>"), 99 "remindAboutMouseIntegration"); 100 } 101 else 102 { 103 createMessage( 104 QApplication::translate("UIMessageCenter", "Mouse integration ..."), 105 QApplication::translate("UIMessageCenter", "<p>The Virtual Machine reports that the guest OS does not support " 106 "<b>mouse pointer integration</b> in the current video mode. You need to " 107 "capture the mouse (by clicking over the VM display or pressing the host " 108 "key) in order to use the mouse inside the guest OS.</p>"), 109 "remindAboutMouseIntegration"); 110 } 111 } 112 113 /* static */ 114 void UINotificationMessage::remindAboutPausedVMInput() 115 { 116 createMessage( 117 QApplication::translate("UIMessageCenter", "Paused VM input ..."), 118 QApplication::translate("UIMessageCenter", "<p>The Virtual Machine is currently in the <b>Paused</b> state and not able " 119 "to see any keyboard or mouse input. If you want to continue to work inside " 120 "the VM, you need to resume it by selecting the corresponding action from the " 121 "menu bar.</p>"), 122 "remindAboutPausedVMInput"); 123 } 124 125 /* static */ 126 void UINotificationMessage::forgetAboutPausedVMInput() 127 { 128 destroyMessage("remindAboutPausedVMInput"); 129 } 130 131 /* static */ 132 void UINotificationMessage::remindAboutWrongColorDepth(ulong uRealBPP, ulong uWantedBPP) 133 { 134 createMessage( 135 QApplication::translate("UIMessageCenter", "Wrong color depth ..."), 136 QApplication::translate("UIMessageCenter", "<p>The virtual screen is currently set to a <b>%1 bit</b> color mode. " 137 "For better performance please change this to <b>%2 bit</b>. This can " 138 "usually be done from the <b>Display</b> section of the guest operating " 139 "system's Control Panel or System Settings.</p>") 140 .arg(uRealBPP).arg(uWantedBPP), 141 "remindAboutWrongColorDepth"); 142 } 143 144 /* static */ 145 void UINotificationMessage::forgetAboutWrongColorDepth() 146 { 147 destroyMessage("remindAboutWrongColorDepth"); 148 } 149 150 void UINotificationMessage::remindAboutGuestAdditionsAreNotActive() 151 { 152 createMessage( 153 QApplication::translate("UIMessageCenter", "GA not active ..."), 154 QApplication::translate("UIMessageCenter", "<p>The VirtualBox Guest Additions do not appear to be available on this " 155 "virtual machine, and shared folders cannot be used without them. To use " 156 "shared folders inside the virtual machine, please install the Guest " 157 "Additions if they are not installed, or re-install them if they are not " 158 "working correctly, by selecting <b>Insert Guest Additions CD image</b> from " 159 "the <b>Devices</b> menu. If they are installed but the machine is not yet " 160 "fully started then shared folders will be available once it is.</p>"), 161 "remindAboutGuestAdditionsAreNotActive"); 162 } 43 163 44 164 UINotificationMessage::UINotificationMessage(const QString &strName, -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.h
r90687 r90689 51 51 public: 52 52 53 /** Notifies about inability to send ACPI shutdown. */ 54 static void cannotSendACPIToMachine(); 55 56 /** Reminds about keyboard auto capturing. */ 57 static void remindAboutAutoCapture(); 58 /** Reminds about mouse integration. 59 * @param fSupportsAbsolute Brings whether mouse supports absolute pointing. */ 60 static void remindAboutMouseIntegration(bool fSupportsAbsolute); 61 /** Reminds about paused VM input. */ 62 static void remindAboutPausedVMInput(); 63 /** Revokes message about paused VM input. */ 64 static void forgetAboutPausedVMInput(); 65 /** Reminds about wrong color depth. 66 * @param uRealBPP Brings real bit per pixel value. 67 * @param uWantedBPP Brings wanted bit per pixel value. */ 68 static void remindAboutWrongColorDepth(ulong uRealBPP, ulong uWantedBPP); 69 /** Revokes message about wrong color depth. */ 70 static void forgetAboutWrongColorDepth(); 71 /** Reminds about GA not affected. */ 72 static void remindAboutGuestAdditionsAreNotActive(); 73 53 74 protected: 54 75 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIFrameBuffer.cpp
r84888 r90689 30 30 #include "UIMachineWindow.h" 31 31 #include "UIMachineView.h" 32 #include "UI PopupCenter.h"32 #include "UINotificationCenter.h" 33 33 #include "UIExtraDataManager.h" 34 34 #include "UICommon.h" … … 1884 1884 && ulGuestBitsPerPixel != 0 1885 1885 && m_pMachineView->uisession()->isGuestSupportsGraphics()) 1886 popupCenter().remindAboutWrongColorDepth(m_pMachineView->machineWindow(), 1887 ulGuestBitsPerPixel, ulBitsPerPixel); 1886 UINotificationMessage::remindAboutWrongColorDepth(ulGuestBitsPerPixel, ulBitsPerPixel); 1888 1887 else 1889 popupCenter().forgetAboutWrongColorDepth(m_pMachineView->machineWindow());1888 UINotificationMessage::forgetAboutWrongColorDepth(); 1890 1889 } 1891 1890 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIKeyboardHandler.cpp
r90475 r90689 42 42 #include "UIExtraDataManager.h" 43 43 #include "UIMessageCenter.h" 44 #include "UIPopupCenter.h"45 44 #include "UIActionPool.h" 46 45 #include "UISession.h" … … 54 53 #include "UIKeyboardHandlerScale.h" 55 54 #include "UIMouseHandler.h" 55 #include "UINotificationCenter.h" 56 56 #ifdef VBOX_WS_MAC 57 57 # include "UICocoaApplication.h" … … 946 946 state != KMachineState_Paused && 947 947 state != KMachineState_TeleportingPausedVM) 948 popupCenter().forgetAboutPausedVMInput(machineLogic()->activeMachineWindow());948 UINotificationMessage::forgetAboutPausedVMInput(); 949 949 } 950 950 … … 1246 1246 /* Show a possible warning on key release which seems to be more expected by the end user: */ 1247 1247 if (uisession()->isPaused()) 1248 popupCenter().remindAboutPausedVMInput(machineLogic()->activeMachineWindow());1248 UINotificationMessage::remindAboutPausedVMInput(); 1249 1249 } 1250 1250 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r90664 r90689 433 433 /* Warn the user about ACPI is not available if so: */ 434 434 if (!console().GetGuestEnteredACPIMode()) 435 return popupCenter().cannotSendACPIToMachine(activeMachineWindow());435 return UINotificationMessage::cannotSendACPIToMachine(); 436 436 437 437 /* Shutdown: */ … … 2354 2354 /* Do not process if additions are not loaded! */ 2355 2355 if (!uisession()->isGuestAdditionsActive()) 2356 popupCenter().remindAboutGuestAdditionsAreNotActive(activeMachineWindow());2356 UINotificationMessage::remindAboutGuestAdditionsAreNotActive(); 2357 2357 2358 2358 /* Open VM settings : Shared folders page: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMouseHandler.cpp
r82968 r90689 29 29 #include "UIExtraDataManager.h" 30 30 #include "UIMessageCenter.h" 31 #include "UI PopupCenter.h"31 #include "UINotificationCenter.h" 32 32 #include "UISession.h" 33 33 #include "UIMachineLogic.h" … … 386 386 machineState != KMachineState_Paused && 387 387 machineState != KMachineState_TeleportingPausedVM) 388 popupCenter().forgetAboutPausedVMInput(machineLogic()->activeMachineWindow());388 UINotificationMessage::forgetAboutPausedVMInput(); 389 389 390 390 /* Notify all the listeners: */ … … 434 434 #endif 435 435 436 /* Notify user about mouse supports or not absolute pointing if that method was called by signal: */ 436 /* Notify user whether mouse supports absolute pointing 437 * if that method was called by corresponding signal: */ 437 438 if (sender()) 438 439 { 439 /* don't annoy the user while restoring a VM */ 440 KMachineState state = uisession()->machineState(); 441 if (state != KMachineState_Restoring) 442 popupCenter().remindAboutMouseIntegration(uisession()->machineLogic()->activeMachineWindow(), 443 uisession()->isMouseSupportsAbsolute()); 440 /* Do not annoy user while restoring VM: */ 441 if (uisession()->machineState() != KMachineState_Restoring) 442 UINotificationMessage::remindAboutMouseIntegration(uisession()->isMouseSupportsAbsolute()); 444 443 } 445 444 … … 1129 1128 { 1130 1129 if (uisession()->isPaused()) 1131 { 1132 popupCenter().remindAboutPausedVMInput(machineLogic()->activeMachineWindow()); 1133 } 1130 UINotificationMessage::remindAboutPausedVMInput(); 1134 1131 else if (uisession()->isRunning()) 1135 1132 { -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r90663 r90689 167 167 /* Notify user about mouse&keyboard auto-capturing: */ 168 168 if (gEDataManager->autoCaptureEnabled()) 169 popupCenter().remindAboutAutoCapture(activeMachineWindow());169 UINotificationMessage::remindAboutAutoCapture(); 170 170 171 171 /* Check if we are in teleportation waiting mode.
Note:
See TracChangeset
for help on using the changeset viewer.