Changeset 3971 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Aug 1, 2007 3:47:41 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleWnd.cpp
r3957 r3971 230 230 mProgressBar = new QProgressBar (this); 231 231 mProgressBar->setFixedWidth (100); 232 mProgressBar->setPercentageVisible (true); 233 mProgressBar->setProgress (0); 234 232 235 mCancelButton = new QToolButton (this); 233 236 mCancelButton->setAutoRaise (true); … … 273 276 { 274 277 mCancelButton->setText (tr ("Cancel")); 275 QToolTip::add (mProgressBar, tr ("Downloading the VirtualBox Guest Additions CD image"276 " from <nobr><b>%1</b>...</nobr>")278 QToolTip::add (mProgressBar, tr ("Downloading the VirtualBox Guest Additions " 279 "CD image from <nobr><b>%1</b>...</nobr>") 277 280 .arg (mProtocol + mHost + mPath + mFile)); 278 281 QToolTip::add (mCancelButton, tr ("Cancel the VirtualBox Guest " … … 295 298 if (mStatus == 404) 296 299 abortDownload (tr ("Could not locate the file on " 297 "the server.")); 300 "the server (response: %1).") 301 .arg (mStatus)); 298 302 else 299 303 processFile (aTotal); … … 352 356 void processTimeout() 353 357 { 354 if (mConnectDone) return; 358 if (mConnectDone) 359 return; 355 360 mHttp->abort(); 356 abortDownload (tr ("The download process has been cancelled " 357 "due to connection timeout.")); 361 abortDownload (tr ("Connection timed out.")); 358 362 } 359 363 … … 401 405 } 402 406 else 403 abortDownload (tr ("Download rejected by user.")); 404 } 405 406 /* This wrapper displays the error message box with the root cause of the 407 * download procedure termination. It is also used to command the 408 * downloader to terminate himself after all the events being processed. */ 409 void abortDownload (const QString &aReason) 407 abortDownload(); 408 } 409 410 /* This wrapper displays an error message box (unless @aReason is 411 * QString::null) with the cause of the download procedure 412 * termination. After the message box is dismissed, the downloader signals 413 * to close itself on the next event loop iteration. */ 414 void abortDownload (const QString &aReason = QString::null) 410 415 { 411 416 /* Protect against double kill request. */ 412 if (mSuicide) return; 417 if (mSuicide) 418 return; 413 419 mSuicide = true; 414 420 415 vboxProblem().cannotDownloadGuestAdditions (mProtocol + mHost + 416 mPath + mFile, aReason); 421 if (!aReason.isNull()) 422 vboxProblem().cannotDownloadGuestAdditions (mProtocol + mHost + 423 mPath + mFile, aReason); 417 424 /* Allows all the queued signals to be processed before quit. */ 418 425 QTimer::singleShot (0, this, SLOT (suicide()));
Note:
See TracChangeset
for help on using the changeset viewer.