- Timestamp:
- Aug 3, 2021 9:56:48 AM (4 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
r90086 r90491 2890 2890 bool UIMessageCenter::confirmCancelingAllNetworkRequests() const 2891 2891 { 2892 return questionBinary(windowManager(). networkManagerOrMainWindowShown(), MessageType_Question,2892 return questionBinary(windowManager().mainWindowShown(), MessageType_Question, 2893 2893 tr("Do you wish to cancel all current network operations?")); 2894 2894 } … … 2896 2896 void UIMessageCenter::showUpdateSuccess(const QString &strVersion, const QString &strLink) const 2897 2897 { 2898 alert(windowManager(). networkManagerOrMainWindowShown(), MessageType_Info,2898 alert(windowManager().mainWindowShown(), MessageType_Info, 2899 2899 tr("<p>A new version of VirtualBox has been released! Version <b>%1</b> is available " 2900 2900 "at <a href=\"https://www.virtualbox.org/\">virtualbox.org</a>.</p>" … … 2906 2906 void UIMessageCenter::showUpdateNotFound() const 2907 2907 { 2908 alert(windowManager(). networkManagerOrMainWindowShown(), MessageType_Info,2908 alert(windowManager().mainWindowShown(), MessageType_Info, 2909 2909 tr("You are already running the most recent version of VirtualBox.")); 2910 2910 } … … 2912 2912 void UIMessageCenter::askUserToDownloadExtensionPack(const QString &strExtPackName, const QString &strExtPackVersion, const QString &strVBoxVersion) const 2913 2913 { 2914 alert(windowManager(). networkManagerOrMainWindowShown(), MessageType_Info,2914 alert(windowManager().mainWindowShown(), MessageType_Info, 2915 2915 tr("<p>You have version %1 of the <b><nobr>%2</nobr></b> installed.</p>" 2916 2916 "<p>You should download and install version %3 of this extension pack from Oracle!</p>") … … 2929 2929 bool UIMessageCenter::confirmDownloadGuestAdditions(const QString &strUrl, qulonglong uSize) const 2930 2930 { 2931 return questionBinary(windowManager(). networkManagerOrMainWindowShown(), MessageType_Question,2931 return questionBinary(windowManager().mainWindowShown(), MessageType_Question, 2932 2932 tr("<p>Are you sure you want to download the <b>VirtualBox Guest Additions</b> disk image file " 2933 2933 "from <nobr><a href=\"%1\">%1</a></nobr> (size %2 bytes)?</p>") … … 2939 2939 void UIMessageCenter::cannotSaveGuestAdditions(const QString &strURL, const QString &strTarget) const 2940 2940 { 2941 alert(windowManager(). networkManagerOrMainWindowShown(), MessageType_Error,2941 alert(windowManager().mainWindowShown(), MessageType_Error, 2942 2942 tr("<p>The <b>VirtualBox Guest Additions</b> disk image file has been successfully downloaded " 2943 2943 "from <nobr><a href=\"%1\">%1</a></nobr> " … … 2949 2949 bool UIMessageCenter::proposeMountGuestAdditions(const QString &strUrl, const QString &strSrc) const 2950 2950 { 2951 return questionBinary(windowManager(). networkManagerOrMainWindowShown(), MessageType_Question,2951 return questionBinary(windowManager().mainWindowShown(), MessageType_Question, 2952 2952 tr("<p>The <b>VirtualBox Guest Additions</b> disk image file has been successfully downloaded " 2953 2953 "from <nobr><a href=\"%1\">%1</a></nobr> " … … 2961 2961 void UIMessageCenter::cannotValidateGuestAdditionsSHA256Sum(const QString &strUrl, const QString &strSrc) const 2962 2962 { 2963 alert(windowManager(). networkManagerOrMainWindowShown(), MessageType_Error,2963 alert(windowManager().mainWindowShown(), MessageType_Error, 2964 2964 tr("<p>The <b>VirtualBox Guest Additions</b> disk image file has been successfully downloaded " 2965 2965 "from <nobr><a href=\"%1\">%1</a></nobr> " … … 2990 2990 bool UIMessageCenter::confirmDownloadUserManual(const QString &strURL, qulonglong uSize) const 2991 2991 { 2992 return questionBinary(windowManager(). networkManagerOrMainWindowShown(), MessageType_Question,2992 return questionBinary(windowManager().mainWindowShown(), MessageType_Question, 2993 2993 tr("<p>Are you sure you want to download the <b>VirtualBox User Manual</b> " 2994 2994 "from <nobr><a href=\"%1\">%1</a></nobr> (size %2 bytes)?</p>") … … 3000 3000 void UIMessageCenter::cannotSaveUserManual(const QString &strURL, const QString &strTarget) const 3001 3001 { 3002 alert(windowManager(). networkManagerOrMainWindowShown(), MessageType_Error,3002 alert(windowManager().mainWindowShown(), MessageType_Error, 3003 3003 tr("<p>The VirtualBox User Manual has been successfully downloaded " 3004 3004 "from <nobr><a href=\"%1\">%1</a></nobr> " … … 3010 3010 void UIMessageCenter::warnAboutUserManualDownloaded(const QString &strURL, const QString &strTarget) const 3011 3011 { 3012 alert(windowManager(). networkManagerOrMainWindowShown(), MessageType_Warning,3012 alert(windowManager().mainWindowShown(), MessageType_Warning, 3013 3013 tr("<p>The VirtualBox User Manual has been successfully downloaded " 3014 3014 "from <nobr><a href=\"%1\">%1</a></nobr> " … … 3019 3019 bool UIMessageCenter::warnAboutOutdatedExtensionPack(const QString &strExtPackName, const QString &strExtPackVersion) const 3020 3020 { 3021 return questionBinary(windowManager(). networkManagerOrMainWindowShown(), MessageType_Question,3021 return questionBinary(windowManager().mainWindowShown(), MessageType_Question, 3022 3022 tr("<p>You have an old version (%1) of the <b><nobr>%2</nobr></b> installed.</p>" 3023 3023 "<p>Do you wish to download latest one from the Internet?</p>") … … 3029 3029 bool UIMessageCenter::confirmDownloadExtensionPack(const QString &strExtPackName, const QString &strURL, qulonglong uSize) const 3030 3030 { 3031 return questionBinary(windowManager(). networkManagerOrMainWindowShown(), MessageType_Question,3031 return questionBinary(windowManager().mainWindowShown(), MessageType_Question, 3032 3032 tr("<p>Are you sure you want to download the <b><nobr>%1</nobr></b> " 3033 3033 "from <nobr><a href=\"%2\">%2</a></nobr> (size %3 bytes)?</p>") … … 3039 3039 void UIMessageCenter::cannotSaveExtensionPack(const QString &strExtPackName, const QString &strFrom, const QString &strTo) const 3040 3040 { 3041 alert(windowManager(). networkManagerOrMainWindowShown(), MessageType_Error,3041 alert(windowManager().mainWindowShown(), MessageType_Error, 3042 3042 tr("<p>The <b><nobr>%1</nobr></b> has been successfully downloaded " 3043 3043 "from <nobr><a href=\"%2\">%2</a></nobr> " … … 3049 3049 bool UIMessageCenter::proposeInstallExtentionPack(const QString &strExtPackName, const QString &strFrom, const QString &strTo) const 3050 3050 { 3051 return questionBinary(windowManager(). networkManagerOrMainWindowShown(), MessageType_Question,3051 return questionBinary(windowManager().mainWindowShown(), MessageType_Question, 3052 3052 tr("<p>The <b><nobr>%1</nobr></b> has been successfully downloaded " 3053 3053 "from <nobr><a href=\"%2\">%2</a></nobr> " … … 3061 3061 void UIMessageCenter::cannotValidateExtentionPackSHA256Sum(const QString &strExtPackName, const QString &strFrom, const QString &strTo) const 3062 3062 { 3063 alert(windowManager(). networkManagerOrMainWindowShown(), MessageType_Error,3063 alert(windowManager().mainWindowShown(), MessageType_Error, 3064 3064 tr("<p>The <b><nobr>%1</nobr></b> has been successfully downloaded " 3065 3065 "from <nobr><a href=\"%2\">%2</a></nobr> " … … 3072 3072 bool UIMessageCenter::proposeDeleteExtentionPack(const QString &strTo) const 3073 3073 { 3074 return questionBinary(windowManager(). networkManagerOrMainWindowShown(), MessageType_Question,3074 return questionBinary(windowManager().mainWindowShown(), MessageType_Question, 3075 3075 tr("Do you want to delete the downloaded file <nobr><b>%1</b></nobr>?") 3076 3076 .arg(strTo), … … 3081 3081 bool UIMessageCenter::proposeDeleteOldExtentionPacks(const QStringList &strFiles) const 3082 3082 { 3083 return questionBinary(windowManager(). networkManagerOrMainWindowShown(), MessageType_Question,3083 return questionBinary(windowManager().mainWindowShown(), MessageType_Question, 3084 3084 tr("Do you want to delete following list of files <nobr><b>%1</b></nobr>?") 3085 3085 .arg(strFiles.join(",")), -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIModalWindowManager.cpp
r86996 r90491 72 72 s_pInstance = 0; 73 73 } 74 75 #ifdef VBOX_GUI_WITH_NETWORK_MANAGER76 QWidget *UIModalWindowManager::networkManagerOrMainWindowShown() const77 {78 /* Return main application window before network-manager initialization: */79 return gNetworkManager && gNetworkManager->window()->isVisible() ? gNetworkManager->window() : mainWindowShown();80 }81 #endif /* VBOX_GUI_WITH_NETWORK_MANAGER */82 74 83 75 QWidget *UIModalWindowManager::realParentWindow(QWidget *pWidget) -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIModalWindowManager.h
r82968 r90491 62 62 /** Returns the main application window shown. */ 63 63 QWidget *mainWindowShown() const { return m_pMainWindowShown; } 64 #ifdef VBOX_GUI_WITH_NETWORK_MANAGER65 /** Returns network manager or main window shown. */66 QWidget* networkManagerOrMainWindowShown() const;67 #endif68 64 69 65 private slots: -
trunk/src/VBox/Frontends/VirtualBox/src/networking/UIDownloaderAdditions.cpp
r82968 r90491 193 193 /* Ask the user for another location for the additions-image file: */ 194 194 const QString strTarget = QIFileDialog::getExistingDirectory(QFileInfo(target()).absolutePath(), 195 windowManager(). networkManagerOrMainWindowShown(),195 windowManager().mainWindowShown(), 196 196 tr("Select folder to save Guest Additions image to"), true); 197 197 -
trunk/src/VBox/Frontends/VirtualBox/src/networking/UIDownloaderExtensionPack.cpp
r82968 r90491 177 177 /* Ask the user for another location for the extension-pack file: */ 178 178 QString strTarget = QIFileDialog::getExistingDirectory(QFileInfo(target()).absolutePath(), 179 windowManager(). networkManagerOrMainWindowShown(),179 windowManager().mainWindowShown(), 180 180 tr("Select folder to save %1 to").arg(GUI_ExtPackName), true); 181 181 -
trunk/src/VBox/Frontends/VirtualBox/src/networking/UIDownloaderUserManual.cpp
r82968 r90491 120 120 /* Ask the user for another location for the user-manual file: */ 121 121 QString strTarget = QIFileDialog::getExistingDirectory(QFileInfo(target()).absolutePath(), 122 windowManager(). networkManagerOrMainWindowShown(),122 windowManager().mainWindowShown(), 123 123 tr("Select folder to save User Manual to"), true); 124 124 -
trunk/src/VBox/Frontends/VirtualBox/src/networking/UIUpdateManager.cpp
r87251 r90491 491 491 /* Warn the user about extension pack was downloaded and saved, propose to install it: */ 492 492 if (msgCenter().proposeInstallExtentionPack(GUI_ExtPackName, strSource, QDir::toNativeSeparators(strTarget))) 493 uiCommon().doExtPackInstallation(strTarget, strDigest, windowManager(). networkManagerOrMainWindowShown(), NULL);493 uiCommon().doExtPackInstallation(strTarget, strDigest, windowManager().mainWindowShown(), NULL); 494 494 /* Propose to delete the downloaded extension pack: */ 495 495 if (msgCenter().proposeDeleteExtentionPack(QDir::toNativeSeparators(strTarget)))
Note:
See TracChangeset
for help on using the changeset viewer.