Changeset 91179 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Sep 9, 2021 1:16:15 PM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
r91169 r91179 1459 1459 } 1460 1460 1461 #ifdef VBOX_GUI_WITH_NETWORK_MANAGER 1462 bool UIMessageCenter::confirmLookingForGuestAdditions() const 1463 { 1464 return questionBinary(0, MessageType_Question, 1465 tr("<p>Could not find the <b>VirtualBox Guest Additions</b> disk image file.</p>" 1466 "<p>Do you wish to download this disk image file from the Internet?</p>"), 1467 0 /* auto-confirm id */, 1468 tr("Download")); 1469 } 1470 1471 bool UIMessageCenter::confirmDownloadGuestAdditions(const QString &strUrl, qulonglong uSize) const 1472 { 1473 return questionBinary(windowManager().mainWindowShown(), MessageType_Question, 1474 tr("<p>Are you sure you want to download the <b>VirtualBox Guest Additions</b> disk image file " 1475 "from <nobr><a href=\"%1\">%1</a></nobr> (size %2 bytes)?</p>") 1476 .arg(strUrl, QLocale(UITranslator::languageId()).toString(uSize)), 1477 0 /* auto-confirm id */, 1478 tr("Download")); 1479 } 1480 1481 void UIMessageCenter::cannotSaveGuestAdditions(const QString &strURL, const QString &strTarget) const 1482 { 1483 alert(windowManager().mainWindowShown(), MessageType_Error, 1484 tr("<p>The <b>VirtualBox Guest Additions</b> disk image file has been successfully downloaded " 1485 "from <nobr><a href=\"%1\">%1</a></nobr> " 1486 "but can't be saved locally as <nobr><b>%2</b>.</nobr></p>" 1487 "<p>Please choose another location for that file.</p>") 1488 .arg(strURL, strTarget)); 1489 } 1490 1491 bool UIMessageCenter::proposeMountGuestAdditions(const QString &strUrl, const QString &strSrc) const 1492 { 1493 return questionBinary(windowManager().mainWindowShown(), MessageType_Question, 1494 tr("<p>The <b>VirtualBox Guest Additions</b> disk image file has been successfully downloaded " 1495 "from <nobr><a href=\"%1\">%1</a></nobr> " 1496 "and saved locally as <nobr><b>%2</b>.</nobr></p>" 1497 "<p>Do you wish to register this disk image file and insert it into the virtual optical drive?</p>") 1498 .arg(strUrl, strSrc), 1499 0 /* auto-confirm id */, 1500 tr("Insert", "additions")); 1501 } 1502 1503 bool UIMessageCenter::confirmLookingForUserManual(const QString &strMissedLocation) const 1504 { 1505 return questionBinary(0, MessageType_Question, 1506 tr("<p>Could not find the <b>VirtualBox User Manual</b> <nobr><b>%1</b>.</nobr></p>" 1507 "<p>Do you wish to download this file from the Internet?</p>") 1508 .arg(strMissedLocation), 1509 0 /* auto-confirm id */, 1510 tr("Download")); 1511 } 1512 1513 bool UIMessageCenter::confirmDownloadUserManual(const QString &strURL, qulonglong uSize) const 1514 { 1515 return questionBinary(windowManager().mainWindowShown(), MessageType_Question, 1516 tr("<p>Are you sure you want to download the <b>VirtualBox User Manual</b> " 1517 "from <nobr><a href=\"%1\">%1</a></nobr> (size %2 bytes)?</p>") 1518 .arg(strURL, QLocale(UITranslator::languageId()).toString(uSize)), 1519 0 /* auto-confirm id */, 1520 tr("Download")); 1521 } 1522 1523 void UIMessageCenter::cannotSaveUserManual(const QString &strURL, const QString &strTarget) const 1524 { 1525 alert(windowManager().mainWindowShown(), MessageType_Error, 1526 tr("<p>The VirtualBox User Manual has been successfully downloaded " 1527 "from <nobr><a href=\"%1\">%1</a></nobr> " 1528 "but can't be saved locally as <nobr><b>%2</b>.</nobr></p>" 1529 "<p>Please choose another location for that file.</p>") 1530 .arg(strURL, strTarget)); 1531 } 1532 1533 bool UIMessageCenter::confirmLookingForExtensionPack(const QString &strExtPackName, const QString &strExtPackVersion) const 1534 { 1535 return questionBinary(windowManager().mainWindowShown(), MessageType_Question, 1536 tr("<p>You have an old version (%1) of the <b><nobr>%2</nobr></b> installed.</p>" 1537 "<p>Do you wish to download latest one from the Internet?</p>") 1538 .arg(strExtPackVersion).arg(strExtPackName), 1539 0 /* auto-confirm id */, 1540 tr("Download")); 1541 } 1542 1543 bool UIMessageCenter::confirmDownloadExtensionPack(const QString &strExtPackName, const QString &strURL, qulonglong uSize) const 1544 { 1545 return questionBinary(windowManager().mainWindowShown(), MessageType_Question, 1546 tr("<p>Are you sure you want to download the <b><nobr>%1</nobr></b> " 1547 "from <nobr><a href=\"%2\">%2</a></nobr> (size %3 bytes)?</p>") 1548 .arg(strExtPackName, strURL, QLocale(UITranslator::languageId()).toString(uSize)), 1549 0 /* auto-confirm id */, 1550 tr("Download")); 1551 } 1552 1553 void UIMessageCenter::cannotSaveExtensionPack(const QString &strExtPackName, const QString &strFrom, const QString &strTo) const 1554 { 1555 alert(windowManager().mainWindowShown(), MessageType_Error, 1556 tr("<p>The <b><nobr>%1</nobr></b> has been successfully downloaded " 1557 "from <nobr><a href=\"%2\">%2</a></nobr> " 1558 "but can't be saved locally as <nobr><b>%3</b>.</nobr></p>" 1559 "<p>Please choose another location for that file.</p>") 1560 .arg(strExtPackName, strFrom, strTo)); 1561 } 1562 1563 bool UIMessageCenter::proposeInstallExtentionPack(const QString &strExtPackName, const QString &strFrom, const QString &strTo) const 1564 { 1565 return questionBinary(windowManager().mainWindowShown(), MessageType_Question, 1566 tr("<p>The <b><nobr>%1</nobr></b> has been successfully downloaded " 1567 "from <nobr><a href=\"%2\">%2</a></nobr> " 1568 "and saved locally as <nobr><b>%3</b>.</nobr></p>" 1569 "<p>Do you wish to install this extension pack?</p>") 1570 .arg(strExtPackName, strFrom, strTo), 1571 0 /* auto-confirm id */, 1572 tr("Install", "extension pack")); 1573 } 1574 1575 bool UIMessageCenter::proposeDeleteExtentionPack(const QString &strTo) const 1576 { 1577 return questionBinary(windowManager().mainWindowShown(), MessageType_Question, 1578 tr("Do you want to delete the downloaded file <nobr><b>%1</b></nobr>?") 1579 .arg(strTo), 1580 0 /* auto-confirm id */, 1581 tr("Delete", "extension pack")); 1582 } 1583 1584 bool UIMessageCenter::proposeDeleteOldExtentionPacks(const QStringList &strFiles) const 1585 { 1586 return questionBinary(windowManager().mainWindowShown(), MessageType_Question, 1587 tr("Do you want to delete following list of files <nobr><b>%1</b></nobr>?") 1588 .arg(strFiles.join(",")), 1589 0 /* auto-confirm id */, 1590 tr("Delete", "extension pack")); 1591 } 1592 #endif /* VBOX_GUI_WITH_NETWORK_MANAGER */ 1593 1461 1594 bool UIMessageCenter::cannotRestoreSnapshot(const CMachine &machine, const QString &strSnapshotName, const QString &strMachineName) const 1462 1595 { … … 2058 2191 UIErrorString::formatErrorInfo(comErrorInfo)); 2059 2192 } 2060 2061 #ifdef VBOX_GUI_WITH_NETWORK_MANAGER2062 bool UIMessageCenter::confirmCancelingAllNetworkRequests() const2063 {2064 return questionBinary(windowManager().mainWindowShown(), MessageType_Question,2065 tr("Do you wish to cancel all current network operations?"));2066 }2067 2068 void UIMessageCenter::showUpdateSuccess(const QString &strVersion, const QString &strLink) const2069 {2070 alert(windowManager().mainWindowShown(), MessageType_Info,2071 tr("<p>A new version of VirtualBox has been released! Version <b>%1</b> is available "2072 "at <a href=\"https://www.virtualbox.org/\">virtualbox.org</a>.</p>"2073 "<p>You can download this version using the link:</p>"2074 "<p><a href=%2>%3</a></p>")2075 .arg(strVersion, strLink, strLink));2076 }2077 2078 void UIMessageCenter::showUpdateNotFound() const2079 {2080 alert(windowManager().mainWindowShown(), MessageType_Info,2081 tr("You are already running the most recent version of VirtualBox."));2082 }2083 2084 void UIMessageCenter::askUserToDownloadExtensionPack(const QString &strExtPackName, const QString &strExtPackVersion, const QString &strVBoxVersion) const2085 {2086 alert(windowManager().mainWindowShown(), MessageType_Info,2087 tr("<p>You have version %1 of the <b><nobr>%2</nobr></b> installed.</p>"2088 "<p>You should download and install version %3 of this extension pack from Oracle!</p>")2089 .arg(strExtPackVersion).arg(strExtPackName).arg(strVBoxVersion));2090 }2091 2092 bool UIMessageCenter::cannotFindGuestAdditions() const2093 {2094 return questionBinary(0, MessageType_Question,2095 tr("<p>Could not find the <b>VirtualBox Guest Additions</b> disk image file.</p>"2096 "<p>Do you wish to download this disk image file from the Internet?</p>"),2097 0 /* auto-confirm id */,2098 tr("Download"));2099 }2100 2101 bool UIMessageCenter::confirmDownloadGuestAdditions(const QString &strUrl, qulonglong uSize) const2102 {2103 return questionBinary(windowManager().mainWindowShown(), MessageType_Question,2104 tr("<p>Are you sure you want to download the <b>VirtualBox Guest Additions</b> disk image file "2105 "from <nobr><a href=\"%1\">%1</a></nobr> (size %2 bytes)?</p>")2106 .arg(strUrl, QLocale(UITranslator::languageId()).toString(uSize)),2107 0 /* auto-confirm id */,2108 tr("Download"));2109 }2110 2111 void UIMessageCenter::cannotSaveGuestAdditions(const QString &strURL, const QString &strTarget) const2112 {2113 alert(windowManager().mainWindowShown(), MessageType_Error,2114 tr("<p>The <b>VirtualBox Guest Additions</b> disk image file has been successfully downloaded "2115 "from <nobr><a href=\"%1\">%1</a></nobr> "2116 "but can't be saved locally as <nobr><b>%2</b>.</nobr></p>"2117 "<p>Please choose another location for that file.</p>")2118 .arg(strURL, strTarget));2119 }2120 2121 bool UIMessageCenter::proposeMountGuestAdditions(const QString &strUrl, const QString &strSrc) const2122 {2123 return questionBinary(windowManager().mainWindowShown(), MessageType_Question,2124 tr("<p>The <b>VirtualBox Guest Additions</b> disk image file has been successfully downloaded "2125 "from <nobr><a href=\"%1\">%1</a></nobr> "2126 "and saved locally as <nobr><b>%2</b>.</nobr></p>"2127 "<p>Do you wish to register this disk image file and insert it into the virtual optical drive?</p>")2128 .arg(strUrl, strSrc),2129 0 /* auto-confirm id */,2130 tr("Insert", "additions"));2131 }2132 2133 void UIMessageCenter::cannotValidateGuestAdditionsSHA256Sum(const QString &strUrl, const QString &strSrc) const2134 {2135 alert(windowManager().mainWindowShown(), MessageType_Error,2136 tr("<p>The <b>VirtualBox Guest Additions</b> disk image file has been successfully downloaded "2137 "from <nobr><a href=\"%1\">%1</a></nobr> "2138 "and saved locally as <nobr><b>%2</b>, </nobr>"2139 "but the SHA-256 checksum verification failed.</p>"2140 "<p>Please do the download, installation and verification manually.</p>")2141 .arg(strUrl, strSrc));2142 }2143 2144 void UIMessageCenter::cannotUpdateGuestAdditions(const CProgress &progress) const2145 {2146 error(0, MessageType_Error,2147 tr("Failed to update Guest Additions. "2148 "The Guest Additions disk image file will be inserted for user installation."),2149 UIErrorString::formatErrorInfo(progress));2150 }2151 2152 bool UIMessageCenter::cannotFindUserManual(const QString &strMissedLocation) const2153 {2154 return questionBinary(0, MessageType_Question,2155 tr("<p>Could not find the <b>VirtualBox User Manual</b> <nobr><b>%1</b>.</nobr></p>"2156 "<p>Do you wish to download this file from the Internet?</p>")2157 .arg(strMissedLocation),2158 0 /* auto-confirm id */,2159 tr("Download"));2160 }2161 2162 bool UIMessageCenter::confirmDownloadUserManual(const QString &strURL, qulonglong uSize) const2163 {2164 return questionBinary(windowManager().mainWindowShown(), MessageType_Question,2165 tr("<p>Are you sure you want to download the <b>VirtualBox User Manual</b> "2166 "from <nobr><a href=\"%1\">%1</a></nobr> (size %2 bytes)?</p>")2167 .arg(strURL, QLocale(UITranslator::languageId()).toString(uSize)),2168 0 /* auto-confirm id */,2169 tr("Download"));2170 }2171 2172 void UIMessageCenter::cannotSaveUserManual(const QString &strURL, const QString &strTarget) const2173 {2174 alert(windowManager().mainWindowShown(), MessageType_Error,2175 tr("<p>The VirtualBox User Manual has been successfully downloaded "2176 "from <nobr><a href=\"%1\">%1</a></nobr> "2177 "but can't be saved locally as <nobr><b>%2</b>.</nobr></p>"2178 "<p>Please choose another location for that file.</p>")2179 .arg(strURL, strTarget));2180 }2181 2182 void UIMessageCenter::warnAboutUserManualDownloaded(const QString &strURL, const QString &strTarget) const2183 {2184 alert(windowManager().mainWindowShown(), MessageType_Warning,2185 tr("<p>The VirtualBox User Manual has been successfully downloaded "2186 "from <nobr><a href=\"%1\">%1</a></nobr> "2187 "and saved locally as <nobr><b>%2</b>.</nobr></p>")2188 .arg(strURL, strTarget));2189 }2190 2191 bool UIMessageCenter::warnAboutOutdatedExtensionPack(const QString &strExtPackName, const QString &strExtPackVersion) const2192 {2193 return questionBinary(windowManager().mainWindowShown(), MessageType_Question,2194 tr("<p>You have an old version (%1) of the <b><nobr>%2</nobr></b> installed.</p>"2195 "<p>Do you wish to download latest one from the Internet?</p>")2196 .arg(strExtPackVersion).arg(strExtPackName),2197 0 /* auto-confirm id */,2198 tr("Download"));2199 }2200 2201 bool UIMessageCenter::confirmDownloadExtensionPack(const QString &strExtPackName, const QString &strURL, qulonglong uSize) const2202 {2203 return questionBinary(windowManager().mainWindowShown(), MessageType_Question,2204 tr("<p>Are you sure you want to download the <b><nobr>%1</nobr></b> "2205 "from <nobr><a href=\"%2\">%2</a></nobr> (size %3 bytes)?</p>")2206 .arg(strExtPackName, strURL, QLocale(UITranslator::languageId()).toString(uSize)),2207 0 /* auto-confirm id */,2208 tr("Download"));2209 }2210 2211 void UIMessageCenter::cannotSaveExtensionPack(const QString &strExtPackName, const QString &strFrom, const QString &strTo) const2212 {2213 alert(windowManager().mainWindowShown(), MessageType_Error,2214 tr("<p>The <b><nobr>%1</nobr></b> has been successfully downloaded "2215 "from <nobr><a href=\"%2\">%2</a></nobr> "2216 "but can't be saved locally as <nobr><b>%3</b>.</nobr></p>"2217 "<p>Please choose another location for that file.</p>")2218 .arg(strExtPackName, strFrom, strTo));2219 }2220 2221 bool UIMessageCenter::proposeInstallExtentionPack(const QString &strExtPackName, const QString &strFrom, const QString &strTo) const2222 {2223 return questionBinary(windowManager().mainWindowShown(), MessageType_Question,2224 tr("<p>The <b><nobr>%1</nobr></b> has been successfully downloaded "2225 "from <nobr><a href=\"%2\">%2</a></nobr> "2226 "and saved locally as <nobr><b>%3</b>.</nobr></p>"2227 "<p>Do you wish to install this extension pack?</p>")2228 .arg(strExtPackName, strFrom, strTo),2229 0 /* auto-confirm id */,2230 tr("Install", "extension pack"));2231 }2232 2233 void UIMessageCenter::cannotValidateExtentionPackSHA256Sum(const QString &strExtPackName, const QString &strFrom, const QString &strTo) const2234 {2235 alert(windowManager().mainWindowShown(), MessageType_Error,2236 tr("<p>The <b><nobr>%1</nobr></b> has been successfully downloaded "2237 "from <nobr><a href=\"%2\">%2</a></nobr> "2238 "and saved locally as <nobr><b>%3</b>, </nobr>"2239 "but the SHA-256 checksum verification failed.</p>"2240 "<p>Please do the download, installation and verification manually.</p>")2241 .arg(strExtPackName, strFrom, strTo));2242 }2243 2244 bool UIMessageCenter::proposeDeleteExtentionPack(const QString &strTo) const2245 {2246 return questionBinary(windowManager().mainWindowShown(), MessageType_Question,2247 tr("Do you want to delete the downloaded file <nobr><b>%1</b></nobr>?")2248 .arg(strTo),2249 0 /* auto-confirm id */,2250 tr("Delete", "extension pack"));2251 }2252 2253 bool UIMessageCenter::proposeDeleteOldExtentionPacks(const QStringList &strFiles) const2254 {2255 return questionBinary(windowManager().mainWindowShown(), MessageType_Question,2256 tr("Do you want to delete following list of files <nobr><b>%1</b></nobr>?")2257 .arg(strFiles.join(",")),2258 0 /* auto-confirm id */,2259 tr("Delete", "extension pack"));2260 }2261 #endif /* VBOX_GUI_WITH_NETWORK_MANAGER */2262 2193 2263 2194 bool UIMessageCenter::confirmInstallExtensionPack(const QString &strPackName, const QString &strPackVersion, … … 2590 2521 gpNotificationCenter->invoke(); 2591 2522 /* Else propose to download user manual: */ 2592 else if (c annotFindUserManual(strUserManualFileName1))2523 else if (confirmLookingForUserManual(strUserManualFileName1)) 2593 2524 { 2594 2525 /* Download user manual: */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
r91169 r91179 379 379 /** @} */ 380 380 381 /** @name VirtualBox Manager / Cloud networking stuff.381 /** @name VirtualBox Manager / Cloud networking warnings. 382 382 * @{ */ 383 383 void cannotAcquireCloudProviderManager(const CVirtualBox &comVBox, QWidget *pParent = 0) const; … … 394 394 /** @} */ 395 395 396 /** @name VirtualBox Manager / Cloud machine settings .396 /** @name VirtualBox Manager / Cloud machine settings warnings. 397 397 * @{ */ 398 398 void cannotAssignFormValue(const QString &strError, QWidget *pParent = 0) const; 399 /** @} */ 400 401 /** @name VirtualBox Manager / Downloading warnings. 402 * @{ */ 403 #ifdef VBOX_GUI_WITH_NETWORK_MANAGER 404 bool confirmLookingForGuestAdditions() const; 405 bool confirmDownloadGuestAdditions(const QString &strUrl, qulonglong uSize) const; 406 void cannotSaveGuestAdditions(const QString &strURL, const QString &strTarget) const; 407 bool proposeMountGuestAdditions(const QString &strUrl, const QString &strSrc) const; 408 409 bool confirmLookingForUserManual(const QString &strMissedLocation) const; 410 bool confirmDownloadUserManual(const QString &strURL, qulonglong uSize) const; 411 void cannotSaveUserManual(const QString &strURL, const QString &strTarget) const; 412 413 bool confirmLookingForExtensionPack(const QString &strExtPackName, const QString &strExtPackVersion) const; 414 bool confirmDownloadExtensionPack(const QString &strExtPackName, const QString &strURL, qulonglong uSize) const; 415 void cannotSaveExtensionPack(const QString &strExtPackName, const QString &strFrom, const QString &strTo) const; 416 bool proposeInstallExtentionPack(const QString &strExtPackName, const QString &strFrom, const QString &strTo) const; 417 bool proposeDeleteExtentionPack(const QString &strTo) const; 418 bool proposeDeleteOldExtentionPacks(const QStringList &strFiles) const; 419 #endif /* VBOX_GUI_WITH_NETWORK_MANAGER */ 399 420 /** @} */ 400 421 … … 459 480 void cannotRunUnattendedGuestInstall(const CUnattended &comUnattendedInstall, QWidget *pParent = 0); 460 481 461 #ifdef VBOX_GUI_WITH_NETWORK_MANAGER462 /* API: Network management warnings: */463 bool confirmCancelingAllNetworkRequests() const;464 void showUpdateSuccess(const QString &strVersion, const QString &strLink) const;465 void showUpdateNotFound() const;466 void askUserToDownloadExtensionPack(const QString &strExtPackName, const QString &strExtPackVersion, const QString &strVBoxVersion) const;467 468 /* API: Downloading warnings: */469 bool cannotFindGuestAdditions() const;470 bool confirmDownloadGuestAdditions(const QString &strUrl, qulonglong uSize) const;471 void cannotSaveGuestAdditions(const QString &strURL, const QString &strTarget) const;472 bool proposeMountGuestAdditions(const QString &strUrl, const QString &strSrc) const;473 void cannotValidateGuestAdditionsSHA256Sum(const QString &strUrl, const QString &strSrc) const;474 void cannotUpdateGuestAdditions(const CProgress &progress) const;475 bool cannotFindUserManual(const QString &strMissedLocation) const;476 bool confirmDownloadUserManual(const QString &strURL, qulonglong uSize) const;477 void cannotSaveUserManual(const QString &strURL, const QString &strTarget) const;478 void warnAboutUserManualDownloaded(const QString &strURL, const QString &strTarget) const;479 bool warnAboutOutdatedExtensionPack(const QString &strExtPackName, const QString &strExtPackVersion) const;480 bool confirmDownloadExtensionPack(const QString &strExtPackName, const QString &strURL, qulonglong uSize) const;481 void cannotSaveExtensionPack(const QString &strExtPackName, const QString &strFrom, const QString &strTo) const;482 bool proposeInstallExtentionPack(const QString &strExtPackName, const QString &strFrom, const QString &strTo) const;483 void cannotValidateExtentionPackSHA256Sum(const QString &strExtPackName, const QString &strFrom, const QString &strTo) const;484 bool proposeDeleteExtentionPack(const QString &strTo) const;485 bool proposeDeleteOldExtentionPacks(const QStringList &strFiles) const;486 #endif /* VBOX_GUI_WITH_NETWORK_MANAGER */487 488 482 /* API: Extension-pack warnings: */ 489 483 bool confirmInstallExtensionPack(const QString &strPackName, const QString &strPackVersion, const QString &strPackDescription, QWidget *pParent = 0) const; -
trunk/src/VBox/Frontends/VirtualBox/src/networking/UIDownloaderExtensionPack.cpp
r90560 r91179 28 28 #include "UIModalWindowManager.h" 29 29 #include "UINetworkReply.h" 30 #include "UINotificationCenter.h" 30 31 #include "UIVersion.h" 31 32 … … 120 121 { 121 122 /* Warn the user about additions-image was downloaded and saved but checksum is invalid: */ 122 msgCenter().cannotValidateExtentionPackSHA256Sum(GUI_ExtPackName, source().toString(), QDir::toNativeSeparators(target()));123 UINotificationMessage::cannotValidateExtentionPackSHA256Sum(GUI_ExtPackName, source().toString(), QDir::toNativeSeparators(target())); 123 124 return; 124 125 } -
trunk/src/VBox/Frontends/VirtualBox/src/networking/UIDownloaderGuestAdditions.cpp
r90569 r91179 28 28 #include "UIModalWindowManager.h" 29 29 #include "UINetworkReply.h" 30 #include "UINotificationCenter.h" 30 31 #include "UIVersion.h" 31 32 … … 118 119 { 119 120 /* Warn the user about additions-image was downloaded and saved but checksum is invalid: */ 120 msgCenter().cannotValidateGuestAdditionsSHA256Sum(source().toString(), QDir::toNativeSeparators(target()));121 UINotificationMessage::cannotValidateGuestAdditionsSHA256Sum(source().toString(), QDir::toNativeSeparators(target())); 121 122 return; 122 123 } -
trunk/src/VBox/Frontends/VirtualBox/src/networking/UIDownloaderUserManual.cpp
r90561 r91179 28 28 #include "UIModalWindowManager.h" 29 29 #include "UINetworkReply.h" 30 #include "UINotificationCenter.h" 30 31 #include "UIVersion.h" 31 32 … … 87 88 { 88 89 /* Warn the user about user-manual loaded and saved: */ 89 msgCenter().warnAboutUserManualDownloaded(source().toString(), QDir::toNativeSeparators(target()));90 UINotificationMessage::warnAboutUserManualDownloaded(source().toString(), QDir::toNativeSeparators(target())); 90 91 /* Warn the listener about user-manual was downloaded: */ 91 92 emit sigDownloadFinished(target()); -
trunk/src/VBox/Frontends/VirtualBox/src/networking/UINewVersionChecker.cpp
r90604 r91179 22 22 #include "UICommon.h" 23 23 #include "UIExtraDataManager.h" 24 #include "UIMessageCenter.h"25 24 #include "UINetworkReply.h" 26 25 #include "UINewVersionChecker.h" 26 #include "UINotificationCenter.h" 27 27 #include "UIUpdateDefs.h" 28 28 #ifdef Q_OS_LINUX … … 106 106 { 107 107 const QStringList response = strResponseData.split(" ", QString::SkipEmptyParts); 108 msgCenter().showUpdateSuccess(response[0], response[1]);108 UINotificationMessage::showUpdateSuccess(response[0], response[1]); 109 109 } 110 110 /* No newer version of necessary package found: */ … … 112 112 { 113 113 if (isItForcedCall()) 114 msgCenter().showUpdateNotFound();114 UINotificationMessage::showUpdateNotFound(); 115 115 } 116 116 -
trunk/src/VBox/Frontends/VirtualBox/src/networking/UIUpdateManager.cpp
r91009 r91179 192 192 { 193 193 /* Inform the user that he should update the extension pack: */ 194 msgCenter().askUserToDownloadExtensionPack(GUI_ExtPackName, strExtPackVersion, strVBoxVersion);194 UINotificationMessage::askUserToDownloadExtensionPack(GUI_ExtPackName, strExtPackVersion, strVBoxVersion); 195 195 /* Never try to download for ENTERPRISE version: */ 196 196 emit sigStepFinished(); … … 199 199 200 200 /* Ask the user about extension pack downloading: */ 201 if (!msgCenter(). warnAboutOutdatedExtensionPack(GUI_ExtPackName, strExtPackVersion))201 if (!msgCenter().confirmLookingForExtensionPack(GUI_ExtPackName, strExtPackVersion)) 202 202 { 203 203 emit sigStepFinished(); -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.cpp
r91169 r91179 110 110 .arg(strPasswordId)); 111 111 } 112 113 #ifdef VBOX_GUI_WITH_NETWORK_MANAGER 114 /* static */ 115 void UINotificationMessage::showUpdateNotFound() 116 { 117 createMessage( 118 QApplication::translate("UIMessageCenter", "Nothing to update ..."), 119 QApplication::translate("UIMessageCenter", "You are already running the most recent version of VirtualBox.")); 120 } 121 122 /* static */ 123 void UINotificationMessage::showUpdateSuccess(const QString &strVersion, const QString &strLink) 124 { 125 createMessage( 126 QApplication::translate("UIMessageCenter", "New version found ..."), 127 QApplication::translate("UIMessageCenter", "<p>A new version of VirtualBox has been released! Version <b>%1</b> is available " 128 "at <a href=\"https://www.virtualbox.org/\">virtualbox.org</a>.</p>" 129 "<p>You can download this version using the link:</p>" 130 "<p><a href=%2>%3</a></p>").arg(strVersion, strLink, strLink)); 131 } 132 133 /* static */ 134 void UINotificationMessage::askUserToDownloadExtensionPack(const QString &strExtPackName, 135 const QString &strExtPackVersion, 136 const QString &strVBoxVersion) 137 { 138 createMessage( 139 QApplication::translate("UIMessageCenter", "Update is required ..."), 140 QApplication::translate("UIMessageCenter", "<p>You have version %1 of the <b><nobr>%2</nobr></b> installed.</p>" 141 "<p>You should download and install version %3 of this extension pack from " 142 "Oracle!</p>").arg(strExtPackVersion, strExtPackName, strVBoxVersion)); 143 } 144 145 /* static */ 146 void UINotificationMessage::cannotValidateGuestAdditionsSHA256Sum(const QString &strUrl, 147 const QString &strSrc) 148 { 149 createMessage( 150 QApplication::translate("UIMessageCenter", "Unable to validate GA ..."), 151 QApplication::translate("UIMessageCenter", "<p>The <b>VirtualBox Guest Additions</b> disk image file has been " 152 "successfully downloaded from <nobr><a href=\"%1\">%1</a></nobr> and saved " 153 "locally as <nobr><b>%2</b>, </nobr>but the SHA-256 checksum verification " 154 "failed.</p><p>Please do the download, installation and verification " 155 "manually.</p>").arg(strUrl, strSrc)); 156 } 157 158 /* static */ 159 void UINotificationMessage::warnAboutUserManualDownloaded(const QString &strUrl, const QString &strTarget) 160 { 161 createMessage( 162 QApplication::translate("UIMessageCenter", "User manual downloaded ..."), 163 QApplication::translate("UIMessageCenter", "<p>The VirtualBox User Manual has been successfully downloaded from " 164 "<nobr><a href=\"%1\">%1</a></nobr> and saved locally as " 165 "<nobr><b>%2</b>.</nobr></p>").arg(strUrl, strTarget)); 166 } 167 168 /* static */ 169 void UINotificationMessage::cannotValidateExtentionPackSHA256Sum(const QString &strExtPackName, 170 const QString &strFrom, 171 const QString &strTo) 172 { 173 createMessage( 174 QApplication::translate("UIMessageCenter", "Unable to validate EP ..."), 175 QApplication::translate("UIMessageCenter", "<p>The <b><nobr>%1</nobr></b> has been successfully downloaded " 176 "from <nobr><a href=\"%2\">%2</a></nobr> and saved locally as " 177 "<nobr><b>%3</b>, </nobr>but the SHA-256 checksum verification failed.</p>" 178 "<p>Please do the download, installation and verification manually.</p>") 179 .arg(strExtPackName, strFrom, strTo)); 180 } 181 #endif /* VBOX_GUI_WITH_NETWORK_MANAGER */ 112 182 113 183 /* static */ -
trunk/src/VBox/Frontends/VirtualBox/src/notificationcenter/UINotificationObjects.h
r91169 r91179 76 76 * @param strPasswordId Brings password ID. */ 77 77 static void warnAboutInvalidEncryptionPassword(const QString &strPasswordId); 78 79 #ifdef VBOX_GUI_WITH_NETWORK_MANAGER 80 /** Notifies about update not found. */ 81 static void showUpdateNotFound(); 82 /** Notifies about update successful. 83 * @param strVersion Brings the found version. 84 * @param strLink Brings the link to found package. */ 85 static void showUpdateSuccess(const QString &strVersion, const QString &strLink); 86 /** Notifies about extension pack needs to be updated. 87 * @param strExtPackName Brings the package name. 88 * @param strExtPackVersion Brings the package version. 89 * @param strVBoxVersion Brings VBox version. */ 90 static void askUserToDownloadExtensionPack(const QString &strExtPackName, 91 const QString &strExtPackVersion, 92 const QString &strVBoxVersion); 93 94 /** Notifies about inability to validate guest additions. 95 * @param strUrl Brings the GA URL. 96 * @param strSrc Brings the GA source. */ 97 static void cannotValidateGuestAdditionsSHA256Sum(const QString &strUrl, 98 const QString &strSrc); 99 100 /** Notifies about user manual downloded. 101 * @param strUrl Brings the GA URL. 102 * @param strSrc Brings the GA source. */ 103 static void warnAboutUserManualDownloaded(const QString &strUrl, 104 const QString &strTarget); 105 106 /** Notifies about inability to validate guest additions. 107 * @param strUrl Brings the GA URL. 108 * @param strSrc Brings the GA source. */ 109 static void cannotValidateExtentionPackSHA256Sum(const QString &strExtPackName, 110 const QString &strFrom, 111 const QString &strTo); 112 #endif /* VBOX_GUI_WITH_NETWORK_MANAGER */ 78 113 /** @} */ 79 114 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r91169 r91179 2425 2425 gpNotificationCenter->invoke(); 2426 2426 /* Else propose to download additions: */ 2427 else if (msgCenter().c annotFindGuestAdditions())2427 else if (msgCenter().confirmLookingForGuestAdditions()) 2428 2428 { 2429 2429 /* Download guest additions: */
Note:
See TracChangeset
for help on using the changeset viewer.