Changeset 91007 in vbox
- Timestamp:
- Aug 30, 2021 5:50:44 PM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UICommon.cpp
r91003 r91007 3724 3724 /* Acquire client result: */ 3725 3725 bool fResult = client.result(); 3726 3727 3726 if (!fResult) 3728 msgCenter().cannotOpenURL(strUrl);3727 UINotificationMessage::cannotOpenURL(strUrl); 3729 3728 3730 3729 return fResult; -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
r90967 r91007 453 453 } 454 454 455 void UIMessageCenter::cannotFindLanguage(const QString &strLangId, const QString &strNlsPath) const 456 { 457 alert(0, MessageType_Error, 458 tr("<p>Could not find a language file for the language <b>%1</b> in the directory <b><nobr>%2</nobr></b>.</p>" 459 "<p>The language will be temporarily reset to the system default language. " 460 "Please go to the <b>Preferences</b> window which you can open from the <b>File</b> menu of the " 461 "VirtualBox Manager window, and select one of the existing languages on the <b>Language</b> page.</p>") 462 .arg(strLangId).arg(strNlsPath)); 463 } 464 465 void UIMessageCenter::cannotLoadLanguage(const QString &strLangFile) const 466 { 467 alert(0, MessageType_Error, 468 tr("<p>Could not load the language file <b><nobr>%1</nobr></b>. " 469 "<p>The language will be temporarily reset to English (built-in). " 470 "Please go to the <b>Preferences</b> window which you can open from the <b>File</b> menu of the " 471 "VirtualBox Manager window, and select one of the existing languages on the <b>Language</b> page.</p>") 472 .arg(strLangFile)); 473 } 474 455 475 void UIMessageCenter::cannotInitUserHome(const QString &strUserHome) const 456 476 { … … 494 514 } 495 515 496 void UIMessageCenter::cannotFindLanguage(const QString &strLangId, const QString &strNlsPath) const497 {498 alert(0, MessageType_Error,499 tr("<p>Could not find a language file for the language <b>%1</b> in the directory <b><nobr>%2</nobr></b>.</p>"500 "<p>The language will be temporarily reset to the system default language. "501 "Please go to the <b>Preferences</b> window which you can open from the <b>File</b> menu of the "502 "VirtualBox Manager window, and select one of the existing languages on the <b>Language</b> page.</p>")503 .arg(strLangId).arg(strNlsPath));504 }505 506 void UIMessageCenter::cannotLoadLanguage(const QString &strLangFile) const507 {508 alert(0, MessageType_Error,509 tr("<p>Could not load the language file <b><nobr>%1</nobr></b>. "510 "<p>The language will be temporarily reset to English (built-in). "511 "Please go to the <b>Preferences</b> window which you can open from the <b>File</b> menu of the "512 "VirtualBox Manager window, and select one of the existing languages on the <b>Language</b> page.</p>")513 .arg(strLangFile));514 }515 516 516 void UIMessageCenter::cannotFindMachineByName(const CVirtualBox &vbox, const QString &strName) const 517 517 { … … 551 551 .arg(strMachineName), 552 552 UIErrorString::formatErrorInfo(progress)); 553 }554 555 void UIMessageCenter::cannotGetMediaAccessibility(const UIMedium &medium) const556 {557 error(0, MessageType_Error,558 tr("Failed to access the disk image file <nobr><b>%1</b></nobr>.")559 .arg(medium.location()),560 UIErrorString::formatErrorInfo(medium.result()));561 }562 563 void UIMessageCenter::cannotOpenURL(const QString &strUrl) const564 {565 alert(0, MessageType_Error,566 tr("Failed to open <tt>%1</tt>. "567 "Make sure your desktop environment can properly handle URLs of this type.")568 .arg(strUrl));569 553 } 570 554 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
r90933 r91007 250 250 void cannotStartSelector() const; 251 251 void cannotStartRuntime() const; 252 253 void cannotFindLanguage(const QString &strLangId, const QString &strNlsPath) const; 254 void cannotLoadLanguage(const QString &strLangFile) const; 252 255 /** @} */ 253 256 … … 261 264 262 265 /* API: Global warnings: */ 263 void cannotFindLanguage(const QString &strLangId, const QString &strNlsPath) const;264 void cannotLoadLanguage(const QString &strLangFile) const;265 266 void cannotFindMachineByName(const CVirtualBox &vbox, const QString &strName) const; 266 267 void cannotFindMachineById(const CVirtualBox &vbox, const QUuid &uId) const; … … 268 269 void cannotOpenSession(const CMachine &machine) const; 269 270 void cannotOpenSession(const CProgress &progress, const QString &strMachineName) const; 270 void cannotGetMediaAccessibility(const UIMedium &medium) const;271 void cannotOpenURL(const QString &strUrl) const;272 271 void cannotSetExtraData(const CVirtualBox &vbox, const QString &strKey, const QString &strValue); 273 272 void cannotSetExtraData(const CMachine &machine, const QString &strKey, const QString &strValue); -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.cpp
r90967 r91007 56 56 /* static */ 57 57 QMap<QString, QUuid> UINotificationMessage::m_messages = QMap<QString, QUuid>(); 58 59 /* static */ 60 void UINotificationMessage::cannotOpenURL(const QString &strUrl) 61 { 62 createMessage( 63 QApplication::translate("UIMessageCenter", "Can't open URL ..."), 64 QApplication::translate("UIMessageCenter", "Failed to open <tt>%1</tt>. " 65 "Make sure your desktop environment can properly handle URLs of this type.") 66 .arg(strUrl)); 67 } 58 68 59 69 /* static */ -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.h
r90933 r91007 61 61 public: 62 62 63 /** Notifies about inability to open @a strUrl. */ 64 static void cannotOpenURL(const QString &strUrl); 63 65 /** Notifies about inability to mount image. 64 66 * @param strMachineName Brings the machine name.
Note:
See TracChangeset
for help on using the changeset viewer.