Changeset 34806 in vbox
- Timestamp:
- Dec 7, 2010 5:11:51 PM (14 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxProblemReporter.cpp
r34787 r34806 2142 2142 } 2143 2143 2144 bool VBoxProblemReporter::confirmRemovingPackage(const QString &strPackName, QWidget *pParent /* = 0 */) 2144 bool VBoxProblemReporter::confirmInstallingPackage(const QString &strPackName, const QString &strPackVersion, 2145 const QString &strPackDescription, QWidget *pParent /* = 0 */) 2145 2146 { 2146 2147 return messageOkCancel (pParent ? pParent : mainWindowShown(), 2147 2148 Question, 2148 tr("You are about to remove the Extension Pack <b>%1</b>. Are you sure you want to do that?").arg(strPackName), 2149 tr("<p>You are about to install a VirtualBox extension pack. " 2150 "Extension packs complement the functionality of VirtualBox and can contain system level software " 2151 "that could be potentially harmful to your system. Please review the description below and only proceed " 2152 "if you have obtained the extension pack from a trusted source.</p>" 2153 "<p><table cellpadding=0 cellspacing=0>" 2154 "<tr><td><b>Name: </b></td><td>%1</td></tr>" 2155 "<tr><td><b>Version: </b></td><td>%2</td></tr>" 2156 "<tr><td><b>Description: </b></td><td>%3</td></tr>" 2157 "</table></p>") 2158 .arg(strPackName).arg(strPackVersion).arg(strPackDescription), 2159 0, 2160 tr("&Install")); 2161 } 2162 2163 bool VBoxProblemReporter::confirmRemovingPackage(const QString &strPackName, QWidget *pParent /* = 0 */) 2164 { 2165 return messageOkCancel (pParent ? pParent : mainWindowShown(), 2166 Question, 2167 tr("<p>You are about to remove the VirtualBox extension pack <b>%1</b>.</p>" 2168 "<p>Are you sure you want to do that?</p>").arg(strPackName), 2149 2169 0, 2150 2170 tr("&Remove")); -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxProblemReporter.h
r34787 r34806 342 342 void cannotInstallExtPack(const QString &strFilename, const CExtPackFile &extPackFile, QWidget *pParent = 0); 343 343 void cannotUninstallExtPack(const QString &strPackName, const CExtPackManager &extPackManager, QWidget *pParent = 0); 344 bool confirmInstallingPackage(const QString &strPackName, const QString &strPackVersion, const QString &strPackDescription, QWidget *pParent = 0); 344 345 bool confirmRemovingPackage(const QString &strPackName, QWidget *pParent = 0); 345 346 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/global/UIGlobalSettingsExtension.cpp
r34787 r34806 50 50 51 51 /* Version: */ 52 setText(2, m_data.m_strVersion);52 setText(2, QString("%1.%2").arg(m_data.m_strVersion).arg(m_data.m_strRevision)); 53 53 54 54 /* Tool-tip: */ … … 120 120 bool fInstalled = false; 121 121 122 /* 123 * Open the extpack tarball via IExtPackManager. 124 */ 122 /* Open the extpack tarball via IExtPackManager: */ 125 123 CExtPackManager manager = vboxGlobal().virtualBox().GetExtensionPackManager(); 126 124 CExtPackFile extPackFile = manager.OpenExtPackFile(strFilePath); … … 131 129 if (extPackFile.GetUsable()) 132 130 { 133 bool fAck = true; 134 /** @todo display big fat warning message. */ 131 bool fAck = vboxProblem().confirmInstallingPackage(extPackFile.GetName(), 132 QString("%1.%2").arg(extPackFile.GetVersion()).arg(extPackFile.GetRevision()), 133 extPackFile.GetDescription()); 135 134 136 135 if (fAck) 137 136 { 138 /** @todo display licenses. */ 139 } 140 141 /* 142 * Install it if everything was ACKed by the user. 143 */ 144 if (fAck) 145 { 137 /* TODO: Display license! */ 138 139 /* Install package: */ 146 140 extPackFile.Install(); 147 141 if (extPackFile.isOk()) … … 278 272 if (doInstallation(strFilePath, this, &strExtPackName)) 279 273 { 280 /* 281 * Insert the fresly installed extension pack, mark it as 282 * current in the tree and sort by name (col 1). 283 */ 274 /* Insert the fresly installed extension pack, mark it as 275 * current in the tree and sort by name (col 1): */ 284 276 CExtPackManager manager = vboxGlobal().virtualBox().GetExtensionPackManager(); 285 277 const CExtPack &package = manager.Find(strExtPackName);
Note:
See TracChangeset
for help on using the changeset viewer.