Changeset 90695 in vbox
- Timestamp:
- Aug 16, 2021 1:09:37 PM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.cpp
r90689 r90695 421 421 pParent->window()->removeEventFilter(pPopupStack); 422 422 } 423 424 void UIPopupCenter::cannotAttachUSBDevice(QWidget *pParent, const CConsole &comConsole, const QString &strDevice)425 {426 alertWithDetails(pParent, "cannotAttachUSBDevice",427 QApplication::translate("UIMessageCenter",428 "Failed to attach the USB device <b>%1</b> to the virtual machine <b>%2</b>.")429 .arg(strDevice, CConsole(comConsole).GetMachine().GetName()),430 UIErrorString::formatErrorInfo(comConsole));431 }432 433 void UIPopupCenter::cannotAttachUSBDevice(QWidget *pParent, const CVirtualBoxErrorInfo &comErrorInfo,434 const QString &strDevice, const QString &strMachineName)435 {436 alertWithDetails(pParent, "cannotAttachUSBDevice",437 QApplication::translate("UIMessageCenter",438 "Failed to attach the USB device <b>%1</b> to the virtual machine <b>%2</b>.")439 .arg(strDevice).arg(strMachineName),440 UIErrorString::formatErrorInfo(comErrorInfo));441 }442 443 void UIPopupCenter::cannotDetachUSBDevice(QWidget *pParent, const CConsole &comConsole, const QString &strDevice)444 {445 alertWithDetails(pParent, "cannotDetachUSBDevice",446 QApplication::translate("UIMessageCenter",447 "Failed to detach the USB device <b>%1</b> from the virtual machine <b>%2</b>.")448 .arg(strDevice, CConsole(comConsole).GetMachine().GetName()),449 UIErrorString::formatErrorInfo(comConsole));450 }451 452 void UIPopupCenter::cannotDetachUSBDevice(QWidget *pParent, const CVirtualBoxErrorInfo &comErrorInfo,453 const QString &strDevice, const QString &strMachineName)454 {455 alertWithDetails(pParent, "cannotDetachUSBDevice",456 QApplication::translate("UIMessageCenter",457 "Failed to detach the USB device <b>%1</b> from the virtual machine <b>%2</b>.")458 .arg(strDevice, strMachineName),459 UIErrorString::formatErrorInfo(comErrorInfo));460 }461 462 void UIPopupCenter::cannotAttachWebCam(QWidget *pParent, const CEmulatedUSB &comDispatcher,463 const QString &strWebCamName, const QString &strMachineName)464 {465 alertWithDetails(pParent, "cannotAttachWebCam",466 QApplication::translate("UIMessageCenter",467 "Failed to attach the webcam <b>%1</b> to the virtual machine <b>%2</b>.")468 .arg(strWebCamName, strMachineName),469 UIErrorString::formatErrorInfo(comDispatcher));470 }471 472 void UIPopupCenter::cannotDetachWebCam(QWidget *pParent, const CEmulatedUSB &comDispatcher,473 const QString &strWebCamName, const QString &strMachineName)474 {475 alertWithDetails(pParent, "cannotDetachWebCam",476 QApplication::translate("UIMessageCenter",477 "Failed to detach the webcam <b>%1</b> from the virtual machine <b>%2</b>.")478 .arg(strWebCamName, strMachineName),479 UIErrorString::formatErrorInfo(comDispatcher));480 }481 482 void UIPopupCenter::cannotToggleRecording(QWidget *pParent, const CMachine &comMachine, bool fEnable)483 {484 /* Get machine-name preserving error-info: */485 QString strMachineName(CMachine(comMachine).GetName());486 alertWithDetails(pParent, "cannotToggleRecording",487 fEnable ?488 QApplication::translate("UIMessageCenter", "Failed to enable recording for the virtual machine <b>%1</b>.").arg(strMachineName) :489 QApplication::translate("UIMessageCenter", "Failed to disable recording for the virtual machine <b>%1</b>.").arg(strMachineName),490 UIErrorString::formatErrorInfo(comMachine));491 }492 493 void UIPopupCenter::cannotToggleVRDEServer(QWidget *pParent, const CVRDEServer &comServer, const QString &strMachineName, bool fEnable)494 {495 alertWithDetails(pParent, "cannotToggleVRDEServer",496 fEnable ?497 QApplication::translate("UIMessageCenter", "Failed to enable the remote desktop server for the virtual machine <b>%1</b>.").arg(strMachineName) :498 QApplication::translate("UIMessageCenter", "Failed to disable the remote desktop server for the virtual machine <b>%1</b>.").arg(strMachineName),499 UIErrorString::formatErrorInfo(comServer));500 }501 502 void UIPopupCenter::cannotToggleNetworkAdapterCable(QWidget *pParent, const CNetworkAdapter &comAdapter, const QString &strMachineName, bool fConnect)503 {504 alertWithDetails(pParent, "cannotToggleNetworkAdapterCable",505 fConnect ?506 QApplication::translate("UIMessageCenter", "Failed to connect the network adapter cable of the virtual machine <b>%1</b>.").arg(strMachineName) :507 QApplication::translate("UIMessageCenter", "Failed to disconnect the network adapter cable of the virtual machine <b>%1</b>.").arg(strMachineName),508 UIErrorString::formatErrorInfo(comAdapter));509 }510 511 void UIPopupCenter::cannotToggleAudioOutput(QWidget *pParent, const CAudioAdapter &comAdapter, const QString &strMachineName, bool fEnable)512 {513 alertWithDetails(pParent, "cannotToggleAudioOutput",514 fEnable ?515 QApplication::translate("UIMessageCenter", "Failed to enable the audio adapter output for the virtual machine <b>%1</b>.").arg(strMachineName) :516 QApplication::translate("UIMessageCenter", "Failed to disable the audio adapter output for the virtual machine <b>%1</b>.").arg(strMachineName),517 UIErrorString::formatErrorInfo(comAdapter));518 }519 520 void UIPopupCenter::cannotToggleAudioInput(QWidget *pParent, const CAudioAdapter &comAdapter, const QString &strMachineName, bool fEnable)521 {522 alertWithDetails(pParent, "cannotToggleAudioInput",523 fEnable ?524 QApplication::translate("UIMessageCenter", "Failed to enable the audio adapter input for the virtual machine <b>%1</b>.").arg(strMachineName) :525 QApplication::translate("UIMessageCenter", "Failed to disable the audio adapter input for the virtual machine <b>%1</b>.").arg(strMachineName),526 UIErrorString::formatErrorInfo(comAdapter));527 }528 529 void UIPopupCenter::cannotMountImage(QWidget *pParent, const QString &strMachineName, const QString &strMediumName)530 {531 alert(pParent, "cannotMountImage",532 QApplication::translate("UIMessageCenter",533 "<p>Could not insert the <b>%1</b> disk image file into the virtual machine <b>%2</b>, "534 "as the machine has no optical drives. Please add a drive using the storage page of the "535 "virtual machine settings window.</p>")536 .arg(strMediumName, strMachineName));537 }538 539 void UIPopupCenter::cannotOpenMedium(QWidget *pParent, const CVirtualBox &comVBox, UIMediumDeviceType /* enmType */, const QString &strLocation)540 {541 alertWithDetails(pParent, "cannotOpenMedium",542 QApplication::translate("UIMessageCenter",543 "Failed to open the disk image file <nobr><b>%1</b></nobr>.")544 .arg(strLocation),545 UIErrorString::formatErrorInfo(comVBox));546 }547 548 void UIPopupCenter::cannotSaveMachineSettings(QWidget *pParent, const CMachine &comMachine)549 {550 alertWithDetails(pParent, "cannotSaveMachineSettings",551 QApplication::translate("UIMessageCenter",552 "Failed to save the settings of the virtual machine <b>%1</b> to <b><nobr>%2</nobr></b>.")553 .arg(CMachine(comMachine).GetName(), CMachine(comMachine).GetSettingsFilePath()),554 UIErrorString::formatErrorInfo(comMachine));555 }556 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIPopupCenter.h
r90689 r90695 147 147 void recall(QWidget *pParent, const QString &strID); 148 148 149 /* API: Runtime UI stuff: */150 void cannotAttachUSBDevice(QWidget *pParent, const CConsole &comConsole, const QString &strDevice);151 void cannotAttachUSBDevice(QWidget *pParent, const CVirtualBoxErrorInfo &comErrorInfo,152 const QString &strDevice, const QString &strMachineName);153 void cannotDetachUSBDevice(QWidget *pParent, const CConsole &comConsole, const QString &strDevice);154 void cannotDetachUSBDevice(QWidget *pParent, const CVirtualBoxErrorInfo &comErrorInfo,155 const QString &strDevice, const QString &strMachineName);156 void cannotAttachWebCam(QWidget *pParent, const CEmulatedUSB &comDispatcher,157 const QString &strWebCamName, const QString &strMachineName);158 void cannotDetachWebCam(QWidget *pParent, const CEmulatedUSB &comDispatcher,159 const QString &strWebCamName, const QString &strMachineName);160 void cannotToggleRecording(QWidget *pParent, const CMachine &comMachine, bool fEnable);161 void cannotToggleVRDEServer(QWidget *pParent, const CVRDEServer &comServer,162 const QString &strMachineName, bool fEnable);163 void cannotToggleNetworkAdapterCable(QWidget *pParent, const CNetworkAdapter &comAdapter,164 const QString &strMachineName, bool fConnect);165 void cannotToggleAudioOutput(QWidget *pParent, const CAudioAdapter &comAdapter,166 const QString &strMachineName, bool fEnable);167 void cannotToggleAudioInput(QWidget *pParent, const CAudioAdapter &comAdapter,168 const QString &strMachineName, bool fEnable);169 void cannotMountImage(QWidget *pParent, const QString &strMachineName, const QString &strMediumName);170 void cannotOpenMedium(QWidget *pParent, const CVirtualBox &comVBox, UIMediumDeviceType enmType, const QString &strLocation);171 void cannotSaveMachineSettings(QWidget *pParent, const CMachine &comMachine);172 173 149 private slots: 174 150 -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.cpp
r90690 r90695 22 22 /* GUI includes: */ 23 23 #include "UICommon.h" 24 #include "UIErrorString.h" 24 25 #include "UIExtraDataManager.h" 25 26 #include "UIHostComboEditor.h" … … 34 35 35 36 /* COM includes: */ 37 #include "CAudioAdapter.h" 36 38 #include "CConsole.h" 39 #include "CEmulatedUSB.h" 40 #include "CNetworkAdapter.h" 41 #include "CVRDEServer.h" 37 42 38 43 … … 43 48 /* static */ 44 49 QMap<QString, QUuid> UINotificationMessage::m_messages = QMap<QString, QUuid>(); 50 51 /* static */ 52 void UINotificationMessage::cannotMountImage(const QString &strMachineName, const QString &strMediumName) 53 { 54 createMessage( 55 QApplication::translate("UIMessageCenter", "Can't mount image ..."), 56 QApplication::translate("UIMessageCenter", "<p>Could not insert the <b>%1</b> disk image file into the virtual machine " 57 "<b>%2</b>, as the machine has no optical drives. Please add a drive using " 58 "the storage page of the virtual machine settings window.</p>") 59 .arg(strMediumName, strMachineName)); 60 } 45 61 46 62 /* static */ … … 148 164 } 149 165 166 /* static */ 150 167 void UINotificationMessage::remindAboutGuestAdditionsAreNotActive() 151 168 { … … 162 179 } 163 180 181 /* static */ 182 void UINotificationMessage::cannotAttachUSBDevice(const CConsole &comConsole, const QString &strDevice) 183 { 184 createMessage( 185 QApplication::translate("UIMessageCenter", "Can't attach USB device ..."), 186 QApplication::translate("UIMessageCenter", "Failed to attach the USB device <b>%1</b> to the virtual machine <b>%2</b>.") 187 .arg(strDevice, CConsole(comConsole).GetMachine().GetName()) + 188 UIErrorString::formatErrorInfo(comConsole)); 189 } 190 191 /* static */ 192 void UINotificationMessage::cannotAttachUSBDevice(const CVirtualBoxErrorInfo &comErrorInfo, 193 const QString &strDevice, const QString &strMachineName) 194 { 195 createMessage( 196 QApplication::translate("UIMessageCenter", "Can't attach USB device ..."), 197 QApplication::translate("UIMessageCenter", "Failed to attach the USB device <b>%1</b> to the virtual machine <b>%2</b>.") 198 .arg(strDevice, strMachineName) + 199 UIErrorString::formatErrorInfo(comErrorInfo)); 200 } 201 202 /* static */ 203 void UINotificationMessage::cannotDetachUSBDevice(const CConsole &comConsole, const QString &strDevice) 204 { 205 createMessage( 206 QApplication::translate("UIMessageCenter", "Can't detach USB device ..."), 207 QApplication::translate("UIMessageCenter", "Failed to detach the USB device <b>%1</b> from the virtual machine <b>%2</b>.") 208 .arg(strDevice, CConsole(comConsole).GetMachine().GetName()) + 209 UIErrorString::formatErrorInfo(comConsole)); 210 } 211 212 /* static */ 213 void UINotificationMessage::cannotDetachUSBDevice(const CVirtualBoxErrorInfo &comErrorInfo, 214 const QString &strDevice, const QString &strMachineName) 215 { 216 createMessage( 217 QApplication::translate("UIMessageCenter", "Can't detach USB device ..."), 218 QApplication::translate("UIMessageCenter", "Failed to detach the USB device <b>%1</b> from the virtual machine <b>%2</b>.") 219 .arg(strDevice, strMachineName) + 220 UIErrorString::formatErrorInfo(comErrorInfo)); 221 } 222 223 /* static */ 224 void UINotificationMessage::cannotAttachWebCam(const CEmulatedUSB &comDispatcher, 225 const QString &strWebCamName, const QString &strMachineName) 226 { 227 createMessage( 228 QApplication::translate("UIMessageCenter", "Can't attach webcam ..."), 229 QApplication::translate("UIMessageCenter", "Failed to attach the webcam <b>%1</b> to the virtual machine <b>%2</b>.") 230 .arg(strWebCamName, strMachineName) + 231 UIErrorString::formatErrorInfo(comDispatcher)); 232 } 233 234 /* static */ 235 void UINotificationMessage::cannotDetachWebCam(const CEmulatedUSB &comDispatcher, 236 const QString &strWebCamName, const QString &strMachineName) 237 { 238 createMessage( 239 QApplication::translate("UIMessageCenter", "Can't detach webcam ..."), 240 QApplication::translate("UIMessageCenter", "Failed to detach the webcam <b>%1</b> from the virtual machine <b>%2</b>.") 241 .arg(strWebCamName, strMachineName) + 242 UIErrorString::formatErrorInfo(comDispatcher)); 243 } 244 245 /* static */ 246 void UINotificationMessage::cannotOpenMedium(const CVirtualBox &comVBox, const QString &strLocation) 247 { 248 createMessage( 249 QApplication::translate("UIMessageCenter", "Can't open medium ..."), 250 QApplication::translate("UIMessageCenter", "Failed to open the disk image file <nobr><b>%1</b></nobr>.") 251 .arg(strLocation) + 252 UIErrorString::formatErrorInfo(comVBox)); 253 } 254 255 /* static */ 256 void UINotificationMessage::cannotSaveMachineSettings(const CMachine &comMachine) 257 { 258 createMessage( 259 QApplication::translate("UIMessageCenter", "Can't save machine settings ..."), 260 QApplication::translate("UIMessageCenter", "Failed to save the settings of the virtual machine <b>%1</b> to " 261 "<b><nobr>%2</nobr></b>.") 262 .arg(CMachine(comMachine).GetName(), 263 CMachine(comMachine).GetSettingsFilePath()) + 264 UIErrorString::formatErrorInfo(comMachine)); 265 } 266 267 /* static */ 268 void UINotificationMessage::cannotToggleAudioInput(const CAudioAdapter &comAdapter, 269 const QString &strMachineName, bool fEnable) 270 { 271 createMessage( 272 QApplication::translate("UIMessageCenter", "Can't toggle audio input ..."), 273 ( fEnable 274 ? QApplication::translate("UIMessageCenter", "Failed to enable the audio adapter input for the virtual machine <b>%1</b>.") 275 .arg(strMachineName) 276 : QApplication::translate("UIMessageCenter", "Failed to disable the audio adapter input for the virtual machine <b>%1</b>.") 277 .arg(strMachineName)) + 278 UIErrorString::formatErrorInfo(comAdapter)); 279 } 280 281 /* static */ 282 void UINotificationMessage::cannotToggleAudioOutput(const CAudioAdapter &comAdapter, 283 const QString &strMachineName, bool fEnable) 284 { 285 createMessage( 286 QApplication::translate("UIMessageCenter", "Can't toggle audio output ..."), 287 ( fEnable 288 ? QApplication::translate("UIMessageCenter", "Failed to enable the audio adapter output for the virtual machine <b>%1</b>.") 289 .arg(strMachineName) 290 : QApplication::translate("UIMessageCenter", "Failed to disable the audio adapter output for the virtual machine <b>%1</b>.") 291 .arg(strMachineName)) + 292 UIErrorString::formatErrorInfo(comAdapter)); 293 } 294 295 /* static */ 296 void UINotificationMessage::cannotToggleNetworkCable(const CNetworkAdapter &comAdapter, 297 const QString &strMachineName, bool fConnect) 298 { 299 createMessage( 300 QApplication::translate("UIMessageCenter", "Can't toggle network cable ..."), 301 ( fConnect 302 ? QApplication::translate("UIMessageCenter", "Failed to connect the network adapter cable of the virtual machine <b>%1</b>.") 303 .arg(strMachineName) 304 : QApplication::translate("UIMessageCenter", "Failed to disconnect the network adapter cable of the virtual machine <b>%1</b>.") 305 .arg(strMachineName)) + 306 UIErrorString::formatErrorInfo(comAdapter)); 307 } 308 309 /* static */ 310 void UINotificationMessage::cannotToggleRecording(const CMachine &comMachine, bool fEnable) 311 { 312 const QString strMachineName(CMachine(comMachine).GetName()); 313 createMessage( 314 QApplication::translate("UIMessageCenter", "Can't toggle recording ..."), 315 ( fEnable 316 ? QApplication::translate("UIMessageCenter", "Failed to enable recording for the virtual machine <b>%1</b>.") 317 .arg(strMachineName) 318 : QApplication::translate("UIMessageCenter", "Failed to disable recording for the virtual machine <b>%1</b>.") 319 .arg(strMachineName)) + 320 UIErrorString::formatErrorInfo(comMachine)); 321 } 322 323 /* static */ 324 void UINotificationMessage::cannotToggleVRDEServer(const CVRDEServer &comServer, 325 const QString &strMachineName, bool fEnable) 326 { 327 createMessage( 328 QApplication::translate("UIMessageCenter", "Can't toggle VRDE server ..."), 329 ( fEnable 330 ? QApplication::translate("UIMessageCenter", "Failed to enable the remote desktop server for the virtual machine <b>%1</b>.") 331 .arg(strMachineName) 332 : QApplication::translate("UIMessageCenter", "Failed to disable the remote desktop server for the virtual machine <b>%1</b>.") 333 .arg(strMachineName)) + 334 UIErrorString::formatErrorInfo(comServer)); 335 } 336 164 337 UINotificationMessage::UINotificationMessage(const QString &strName, 165 338 const QString &strDetails, -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.h
r90689 r90695 44 44 #include "CVirtualSystemDescription.h" 45 45 46 /* Forward declarations: */ 47 class CAudioAdapter; 48 class CConsole; 49 class CEmulatedUSB; 50 class CNetworkAdapter; 51 class CVirtualBox; 52 class CVirtualBoxErrorInfo; 53 class CVRDEServer; 54 46 55 /** UINotificationObject extension for message functionality. */ 47 56 class SHARED_LIBRARY_STUFF UINotificationMessage : public UINotificationSimple … … 51 60 public: 52 61 62 /** Notifies about inability to mount image. 63 * @param strMachineName Brings the machine name. 64 * @param strMediumName Brings the medium name. */ 65 static void cannotMountImage(const QString &strMachineName, const QString &strMediumName); 53 66 /** Notifies about inability to send ACPI shutdown. */ 54 67 static void cannotSendACPIToMachine(); … … 72 85 static void remindAboutGuestAdditionsAreNotActive(); 73 86 87 /** Notifies about inability to attach USB device. 88 * @param comConsole Brings console USB device belongs to. 89 * @param strDevice Brings the device name. */ 90 static void cannotAttachUSBDevice(const CConsole &comConsole, const QString &strDevice); 91 /** Notifies about inability to attach USB device. 92 * @param comErrorInfo Brings info about error happened. 93 * @param strDevice Brings the device name. 94 * @param strMachineName Brings the machine name. */ 95 static void cannotAttachUSBDevice(const CVirtualBoxErrorInfo &comErrorInfo, 96 const QString &strDevice, const QString &strMachineName); 97 /** Notifies about inability to detach USB device. 98 * @param comConsole Brings console USB device belongs to. 99 * @param strDevice Brings the device name. */ 100 static void cannotDetachUSBDevice(const CConsole &comConsole, const QString &strDevice); 101 /** Notifies about inability to detach USB device. 102 * @param comErrorInfo Brings info about error happened. 103 * @param strDevice Brings the device name. 104 * @param strMachineName Brings the machine name. */ 105 static void cannotDetachUSBDevice(const CVirtualBoxErrorInfo &comErrorInfo, 106 const QString &strDevice, const QString &strMachineName); 107 /** Notifies about inability to attach webcam. 108 * @param comDispatcher Brings emulated USB dispatcher webcam being attached to. 109 * @param strWebCamName Brings the webcam name. 110 * @param strMachineName Brings the machine name. */ 111 static void cannotAttachWebCam(const CEmulatedUSB &comDispatcher, 112 const QString &strWebCamName, const QString &strMachineName); 113 /** Notifies about inability to detach webcam. 114 * @param comDispatcher Brings emulated USB dispatcher webcam being detached from. 115 * @param strWebCamName Brings the webcam name. 116 * @param strMachineName Brings the machine name. */ 117 static void cannotDetachWebCam(const CEmulatedUSB &comDispatcher, 118 const QString &strWebCamName, const QString &strMachineName); 119 /** Notifies about inability to open medium. 120 * @param comVBox Brings common VBox object trying to open medium. 121 * @param strLocation Brings the medium location. */ 122 static void cannotOpenMedium(const CVirtualBox &comVBox, const QString &strLocation); 123 /** Notifies about inability to save machine settings. 124 * @param comMachine Brings the machine trying to save settings. */ 125 static void cannotSaveMachineSettings(const CMachine &comMachine); 126 /** Notifies about inability to toggle audio input. 127 * @param comAdapter Brings the adapter input being toggled for. 128 * @param strMachineName Brings the machine name. 129 * @param fEnable Brings whether adapter input is enabled or not. */ 130 static void cannotToggleAudioInput(const CAudioAdapter &comAdapter, 131 const QString &strMachineName, bool fEnable); 132 /** Notifies about inability to toggle audio output. 133 * @param comAdapter Brings the adapter output being toggled for. 134 * @param strMachineName Brings the machine name. 135 * @param fEnable Brings whether adapter output is enabled or not. */ 136 static void cannotToggleAudioOutput(const CAudioAdapter &comAdapter, 137 const QString &strMachineName, bool fEnable); 138 /** Notifies about inability to toggle network cable. 139 * @param comAdapter Brings the adapter network cable being toggled for. 140 * @param strMachineName Brings the machine name. 141 * @param fConnect Brings whether network cable is connected or not. */ 142 static void cannotToggleNetworkCable(const CNetworkAdapter &comAdapter, 143 const QString &strMachineName, bool fConnect); 144 /** Notifies about inability to toggle recording. 145 * @param comMachine Brings the machine recording being toggled for. 146 * @param fEnable Brings whether recording is enabled or not. */ 147 static void cannotToggleRecording(const CMachine &comMachine, bool fEnable); 148 /** Notifies about inability to toggle VRDE server. 149 * @param comServer Brings the server being toggled. 150 * @param strMachineName Brings the machine name. 151 * @param fEnable Brings whether server is enabled or not. */ 152 static void cannotToggleVRDEServer(const CVRDEServer &comServer, 153 const QString &strMachineName, bool fEnable); 154 74 155 protected: 75 156 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r90689 r90695 755 755 { 756 756 if (fIsAttached) 757 popupCenter().cannotAttachUSBDevice(activeMachineWindow(),error, uiCommon().details(device), machineName());757 UINotificationMessage::cannotAttachUSBDevice(error, uiCommon().details(device), machineName()); 758 758 else 759 popupCenter().cannotDetachUSBDevice(activeMachineWindow(),error, uiCommon().details(device), machineName());759 UINotificationMessage::cannotDetachUSBDevice(error, uiCommon().details(device), machineName()); 760 760 } 761 761 } … … 2176 2176 uisession()->updateStatusRecording(); 2177 2177 /* Notify about the error: */ 2178 return popupCenter().cannotToggleRecording(activeMachineWindow(),machine(), fEnabled);2178 return UINotificationMessage::cannotToggleRecording(machine(), fEnabled); 2179 2179 } 2180 2180 … … 2186 2186 uisession()->updateStatusRecording(); 2187 2187 /* Notify about the error: */ 2188 return msgCenter().cannotSaveMachineSettings(machine());2188 return UINotificationMessage::cannotSaveMachineSettings(machine()); 2189 2189 } 2190 2190 } … … 2212 2212 uisession()->updateStatusVRDE(); 2213 2213 /* Notify about the error: */ 2214 return popupCenter().cannotToggleVRDEServer(activeMachineWindow(),server, machineName(), fEnabled);2214 return UINotificationMessage::cannotToggleVRDEServer(server, machineName(), fEnabled); 2215 2215 } 2216 2216 … … 2222 2222 uisession()->updateStatusVRDE(); 2223 2223 /* Notify about the error: */ 2224 return msgCenter().cannotSaveMachineSettings(machine());2224 return UINotificationMessage::cannotSaveMachineSettings(machine()); 2225 2225 } 2226 2226 } … … 2288 2288 uisession()->updateAudioOutput(); 2289 2289 /* Notify about the error: */ 2290 return popupCenter().cannotToggleAudioOutput(activeMachineWindow(),comAdapter, machineName(), fEnabled);2290 return UINotificationMessage::cannotToggleAudioOutput(comAdapter, machineName(), fEnabled); 2291 2291 } 2292 2292 … … 2298 2298 uisession()->updateAudioOutput(); 2299 2299 /* Notify about the error: */ 2300 return msgCenter().cannotSaveMachineSettings(machine());2300 return UINotificationMessage::cannotSaveMachineSettings(machine()); 2301 2301 } 2302 2302 } … … 2324 2324 uisession()->updateAudioInput(); 2325 2325 /* Notify about the error: */ 2326 return popupCenter().cannotToggleAudioInput(activeMachineWindow(),comAdapter, machineName(), fEnabled);2326 return UINotificationMessage::cannotToggleAudioInput(comAdapter, machineName(), fEnabled); 2327 2327 } 2328 2328 … … 2334 2334 uisession()->updateAudioInput(); 2335 2335 /* Notify about the error: */ 2336 return msgCenter().cannotSaveMachineSettings(machine());2336 return UINotificationMessage::cannotSaveMachineSettings(machine()); 2337 2337 } 2338 2338 } … … 2397 2397 CUSBDevice device(hostDevice); 2398 2398 /* Show a message about procedure failure: */ 2399 popupCenter().cannotAttachUSBDevice(activeMachineWindow(),console(), uiCommon().details(device));2399 UINotificationMessage::cannotAttachUSBDevice(console(), uiCommon().details(device)); 2400 2400 } 2401 2401 } … … 2411 2411 { 2412 2412 /* Show a message about procedure failure: */ 2413 popupCenter().cannotDetachUSBDevice(activeMachineWindow(),console(), uiCommon().details(device));2413 UINotificationMessage::cannotDetachUSBDevice(console(), uiCommon().details(device)); 2414 2414 } 2415 2415 } … … 2435 2435 /* Check if dispatcher is OK: */ 2436 2436 if (!dispatcher.isOk()) 2437 popupCenter().cannotAttachWebCam(activeMachineWindow(),dispatcher, target.name, machineName());2437 UINotificationMessage::cannotAttachWebCam(dispatcher, target.name, machineName()); 2438 2438 } 2439 2439 /* Detach webcam device: */ … … 2444 2444 /* Check if dispatcher is OK: */ 2445 2445 if (!dispatcher.isOk()) 2446 popupCenter().cannotDetachWebCam(activeMachineWindow(),dispatcher, target.name, machineName());2446 UINotificationMessage::cannotDetachWebCam(dispatcher, target.name, machineName()); 2447 2447 } 2448 2448 } … … 2474 2474 adapter.SetCableConnected(fConnect); 2475 2475 if (!adapter.isOk()) 2476 return popupCenter().cannotToggleNetworkAdapterCable(activeMachineWindow(),adapter, machineName(), fConnect);2476 return UINotificationMessage::cannotToggleNetworkCable(adapter, machineName(), fConnect); 2477 2477 2478 2478 /* Save machine-settings: */ 2479 2479 machine().SaveSettings(); 2480 2480 if (!machine().isOk()) 2481 return msgCenter().cannotSaveMachineSettings(machine());2481 return UINotificationMessage::cannotSaveMachineSettings(machine()); 2482 2482 } 2483 2483 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r90689 r90695 46 46 #include "UIMousePointerShapeData.h" 47 47 #include "UINotificationCenter.h" 48 #include "UIPopupCenter.h"49 48 #include "UIWizardFirstRun.h" 50 49 #include "UIConsoleEventHandler.h" … … 1819 1818 if (!comVBox.isOk() || comMedium.isNull()) 1820 1819 { 1821 popupCenter().cannotOpenMedium(activeMachineWindow(), comVBox, enmMediumType, strMediumName);1820 UINotificationMessage::cannotOpenMedium(comVBox, strMediumName); 1822 1821 return false; 1823 1822 } … … 1862 1861 if (sStorageSlots.isEmpty()) 1863 1862 { 1864 popupCenter().cannotMountImage(activeMachineWindow(),machineName(), strMediumName);1863 UINotificationMessage::cannotMountImage(machineName(), strMediumName); 1865 1864 return false; 1866 1865 } … … 1888 1887 if (!machine().isOk()) 1889 1888 { 1890 popupCenter().cannotSaveMachineSettings(activeMachineWindow(),machine());1889 UINotificationMessage::cannotSaveMachineSettings(machine()); 1891 1890 return false; 1892 1891 }
Note:
See TracChangeset
for help on using the changeset viewer.