Changeset 45371 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Apr 5, 2013 1:46:55 PM (12 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
r45368 r45371 317 317 { 318 318 /* It may happen that this method is called during VBoxGlobal 319 * initialization or even after it failed (for example, to show some 320 * error message).Return no main window in this case: */319 * initialization or even after it failed (for example, to show some error message). 320 * Return no main window in this case: */ 321 321 if (!vboxGlobal().isValid()) 322 322 return 0; 323 323 324 /* For VM console process: */ 324 325 if (vboxGlobal().isVMConsoleProcess()) 325 326 { 326 if (vboxGlobal().vmWindow() && vboxGlobal().vmWindow()->isVisible()) /* VM window is visible */ 327 return vboxGlobal().vmWindow(); /* return that window */ 328 } 327 /* It will be currently active machine window if visible: */ 328 if (vboxGlobal().vmWindow()->isVisible()) 329 return vboxGlobal().vmWindow(); 330 } 331 /* Otherwise: */ 329 332 else 330 333 { 331 if (vboxGlobal().selectorWnd().isVisible()) /* VM selector is visible */ 332 return &vboxGlobal().selectorWnd(); /* return that window */ 333 } 334 334 /* It will be the selector window if visible: */ 335 if (vboxGlobal().selectorWnd().isVisible()) 336 return &vboxGlobal().selectorWnd(); 337 } 338 339 /* Nothing by default: */ 335 340 return 0; 336 341 } 337 342 338 QWidget* UIMessageCenter::mainMachineWindowShown() const339 {340 /* It may happen that this method is called during VBoxGlobal341 * initialization or even after it failed (for example, to show some342 * error message). Return no main window in this case: */343 if (!vboxGlobal().isValid())344 return 0;345 346 if (vboxGlobal().vmWindow() && vboxGlobal().vmWindow()->isVisible()) /* VM window is visible */347 return vboxGlobal().vmWindow(); /* return that window */348 349 return 0;350 }351 352 343 QWidget* UIMessageCenter::networkManagerOrMainWindowShown() const 353 344 { 354 345 return gNetworkManager->window()->isVisible() ? gNetworkManager->window() : mainWindowShown(); 355 }356 357 QWidget* UIMessageCenter::networkManagerOrMainMachineWindowShown() const358 {359 return gNetworkManager->window()->isVisible() ? gNetworkManager->window() : mainMachineWindowShown();360 346 } 361 347 … … 877 863 void UIMessageCenter::cannotTakeSnapshot(const CConsole &console, const QString &strMachineName, QWidget *pParent /*= 0*/) const 878 864 { 879 error(pParent ? pParent : mainWindowShown(), MessageType_Error,865 error(pParent, MessageType_Error, 880 866 tr("Failed to create a snapshot of the virtual machine <b>%1</b>.") 881 867 .arg(strMachineName), … … 885 871 void UIMessageCenter::cannotTakeSnapshot(const CProgress &progress, const QString &strMachineName, QWidget *pParent /*= 0*/) const 886 872 { 887 error(pParent ? pParent : mainWindowShown(), MessageType_Error,873 error(pParent, MessageType_Error, 888 874 tr("Failed to create a snapshot of the virtual machine <b>%1</b>.") 889 875 .arg(strMachineName), … … 893 879 void UIMessageCenter::cannotRestoreSnapshot(const CConsole &console, const QString &strSnapshotName, const QString &strMachineName, QWidget *pParent /*= 0*/) const 894 880 { 895 error(pParent ? pParent : mainWindowShown(), MessageType_Error,881 error(pParent, MessageType_Error, 896 882 tr("Failed to restore the snapshot <b>%1</b> of the virtual machine <b>%2</b>.") 897 883 .arg(strSnapshotName, strMachineName), … … 901 887 void UIMessageCenter::cannotRestoreSnapshot(const CProgress &progress, const QString &strSnapshotName, const QString &strMachineName, QWidget *pParent /*= 0*/) const 902 888 { 903 error(pParent ? pParent : mainWindowShown(), MessageType_Error,889 error(pParent, MessageType_Error, 904 890 tr("Failed to restore the snapshot <b>%1</b> of the virtual machine <b>%2</b>.") 905 891 .arg(strSnapshotName, strMachineName), … … 925 911 bool UIMessageCenter::confirmHostInterfaceRemoval(const QString &strName, QWidget *pParent /*= 0*/) const 926 912 { 927 return questionBinary(pParent ? pParent : mainWindowShown(), MessageType_Question,913 return questionBinary(pParent, MessageType_Question, 928 914 tr("<p>Deleting this host-only network will remove " 929 915 "the host-only interface this network is based on. Do you want to " … … 941 927 void UIMessageCenter::cannotCreateHostInterface(const CHost &host, QWidget *pParent /*= 0*/) 942 928 { 943 error(pParent ? pParent : mainWindowShown(), MessageType_Error,929 error(pParent, MessageType_Error, 944 930 tr("Failed to create the host network interface."), 945 931 formatErrorInfo(host)); … … 948 934 void UIMessageCenter::cannotCreateHostInterface(const CProgress &progress, QWidget *pParent /*= 0*/) 949 935 { 950 error(pParent ? pParent : mainWindowShown(), MessageType_Error,936 error(pParent, MessageType_Error, 951 937 tr("Failed to create the host network interface."), 952 938 !progress.isOk() ? formatErrorInfo(progress) : formatErrorInfo(progress.GetErrorInfo())); … … 955 941 void UIMessageCenter::cannotRemoveHostInterface(const CHost &host, const QString &strName, QWidget *pParent /*= 0*/) 956 942 { 957 error(pParent ? pParent : mainWindowShown(), MessageType_Error,943 error(pParent, MessageType_Error, 958 944 tr("Failed to remove the host network interface <b>%1</b>.") 959 945 .arg(strName), … … 963 949 void UIMessageCenter::cannotRemoveHostInterface(const CProgress &progress, const QString &strName, QWidget *pParent /*= 0*/) 964 950 { 965 error(pParent ? pParent : mainWindowShown(), MessageType_Error,951 error(pParent, MessageType_Error, 966 952 tr("Failed to remove the host network interface <b>%1</b>.") 967 953 .arg(strName), … … 971 957 void UIMessageCenter::cannotSetSystemProperties(const CSystemProperties &properties, QWidget *pParent /*= 0*/) const 972 958 { 973 error(pParent ? pParent : mainWindowShown(), MessageType_Critical,959 error(pParent, MessageType_Critical, 974 960 tr("Failed to set global VirtualBox properties."), 975 961 formatErrorInfo(properties)); … … 985 971 return; 986 972 /* Show the error: */ 987 error(pParent ? pParent : mainWindowShown(), res.isWarning() ? MessageType_Warning : MessageType_Error,973 error(pParent, res.isWarning() ? MessageType_Warning : MessageType_Error, 988 974 tr("Failed to access the USB subsystem."), 989 975 formatErrorInfo(res), … … 997 983 setWarningShown("warnAboutUnsupportedUSB2", true); 998 984 999 alert(pParent ? pParent : mainMachineWindowShown(), MessageType_Warning,985 alert(pParent, MessageType_Warning, 1000 986 tr("<p>USB 2.0 is currently enabled for this virtual machine. " 1001 987 "However, this requires the <b><nobr>%1</nobr></b> to be installed.</p>" … … 1015 1001 setWarningShown("warnAboutStateChange", true); 1016 1002 /* Show the error: */ 1017 alert(pParent ? pParent : mainWindowShown(), MessageType_Warning,1003 alert(pParent, MessageType_Warning, 1018 1004 tr("The virtual machine that you are changing has been started. " 1019 1005 "Only certain settings can be changed while a machine is running. " … … 1025 1011 bool UIMessageCenter::confirmSettingsReloading(QWidget *pParent /*= 0*/) const 1026 1012 { 1027 return questionBinary(pParent ? pParent : mainWindowShown(), MessageType_Question,1013 return questionBinary(pParent, MessageType_Question, 1028 1014 tr("<p>The machine settings were changed while you were editing them. " 1029 1015 "You currently have unsaved setting changes.</p>" … … 1035 1021 int UIMessageCenter::confirmHardDiskAttachmentCreation(const QString &strControllerName, QWidget *pParent /*= 0*/) const 1036 1022 { 1037 return questionTrinary(pParent ? pParent : mainWindowShown(), MessageType_Question,1023 return questionTrinary(pParent, MessageType_Question, 1038 1024 tr("<p>You are about to add a virtual hard disk to controller <b>%1</b>.</p>" 1039 1025 "<p>Would you like to create a new, empty file to hold the disk contents or select an existing one?</p>") … … 1046 1032 int UIMessageCenter::confirmOpticalAttachmentCreation(const QString &strControllerName, QWidget *pParent /*= 0*/) const 1047 1033 { 1048 return questionTrinary(pParent ? pParent : mainWindowShown(), MessageType_Question,1034 return questionTrinary(pParent, MessageType_Question, 1049 1035 tr("<p>You are about to add a new CD/DVD drive to controller <b>%1</b>.</p>" 1050 1036 "<p>Would you like to choose a virtual CD/DVD disk to put in the drive " … … 1058 1044 int UIMessageCenter::confirmFloppyAttachmentCreation(const QString &strControllerName, QWidget *pParent /*= 0*/) const 1059 1045 { 1060 return questionTrinary(pParent ? pParent : mainWindowShown(), MessageType_Question,1046 return questionTrinary(pParent, MessageType_Question, 1061 1047 tr("<p>You are about to add a new floppy drive to controller <b>%1</b>.</p>" 1062 1048 "<p>Would you like to choose a virtual floppy disk to put in the drive " … … 1070 1056 int UIMessageCenter::confirmRemovingOfLastDVDDevice(QWidget *pParent /*= 0*/) const 1071 1057 { 1072 return questionBinary(pParent ? pParent : mainWindowShown(), MessageType_Info,1058 return questionBinary(pParent, MessageType_Info, 1073 1059 tr("<p>Are you sure you want to delete the CD/DVD-ROM device?</p>" 1074 1060 "<p>You will not be able to mount any CDs or ISO images " … … 1106 1092 break; 1107 1093 } 1108 error(pParent ? pParent : mainWindowShown(), MessageType_Error,1094 error(pParent, MessageType_Error, 1109 1095 strMessage, formatErrorInfo(machine)); 1110 1096 } … … 1112 1098 void UIMessageCenter::warnAboutIncorrectPort(QWidget *pParent /*= 0*/) const 1113 1099 { 1114 alert(pParent ? pParent : mainWindowShown(), MessageType_Error,1100 alert(pParent, MessageType_Error, 1115 1101 tr("The current port forwarding rules are not valid. " 1116 1102 "None of the host or guest port values may be set to zero.")); … … 1119 1105 bool UIMessageCenter::confirmCancelingPortForwardingDialog(QWidget *pParent /*= 0*/) const 1120 1106 { 1121 return questionBinary(pParent ? pParent : mainWindowShown(), MessageType_Question,1107 return questionBinary(pParent, MessageType_Question, 1122 1108 tr("<p>There are unsaved changes in the port forwarding configuration.</p>" 1123 1109 "<p>If you proceed your changes will be discarded.</p>")); … … 1128 1114 QWidget *pParent /*= 0*/) 1129 1115 { 1130 error(pParent ? pParent : mainMachineWindowShown(), MessageType_Error,1116 error(pParent, MessageType_Error, 1131 1117 tr("Failed to create the shared folder <b>%1</b> (pointing to " 1132 1118 "<nobr><b>%2</b></nobr>) for the virtual machine <b>%3</b>.") … … 1139 1125 QWidget *pParent /*= 0*/) 1140 1126 { 1141 error(pParent ? pParent : mainMachineWindowShown(), MessageType_Error,1127 error(pParent, MessageType_Error, 1142 1128 tr("Failed to create the shared folder <b>%1</b> (pointing to " 1143 1129 "<nobr><b>%2</b></nobr>) for the virtual machine <b>%3</b>.") … … 1150 1136 QWidget *pParent /*= 0*/) 1151 1137 { 1152 error(pParent ? pParent : mainMachineWindowShown(), MessageType_Error,1138 error(pParent, MessageType_Error, 1153 1139 tr("<p>Failed to remove the shared folder <b>%1</b> (pointing to " 1154 1140 "<nobr><b>%2</b></nobr>) from the virtual machine <b>%3</b>.</p>" … … 1163 1149 QWidget *pParent /*= 0*/) 1164 1150 { 1165 error(pParent ? pParent : mainMachineWindowShown(), MessageType_Error,1151 error(pParent, MessageType_Error, 1166 1152 tr("<p>Failed to remove the shared folder <b>%1</b> (pointing to " 1167 1153 "<nobr><b>%2</b></nobr>) from the virtual machine <b>%3</b>.</p>" … … 1177 1163 COMResult res(machine); 1178 1164 /* Show the error: */ 1179 error(pParent ? pParent : mainWindowShown(), MessageType_Error,1165 error(pParent, MessageType_Error, 1180 1166 tr("Failed to save the settings of the virtual machine <b>%1</b> to <b><nobr>%2</nobr></b>.") 1181 1167 .arg(machine.GetName(), machine.GetSettingsFilePath()), … … 1186 1172 QWidget *pParent /*= 0*/) const 1187 1173 { 1188 error(pParent ? pParent : mainWindowShown(), MessageType_Error,1174 error(pParent, MessageType_Error, 1189 1175 tr("<p>Error changing medium type from <b>%1</b> to <b>%2</b>.</p>") 1190 1176 .arg(gpConverter->toString(oldMediumType)).arg(gpConverter->toString(newMediumType)), … … 1220 1206 } 1221 1207 /* Show the question: */ 1222 return questionBinary(pParent ? pParent : mainWindowShown(), MessageType_Question,1208 return questionBinary(pParent, MessageType_Question, 1223 1209 strMessage.arg(medium.location(), strUsage), 1224 1210 0 /* auto-confirm id */, tr("Release", "detach medium")); … … 1270 1256 } 1271 1257 /* Show the question: */ 1272 return questionBinary(pParent ? pParent : mainWindowShown(), MessageType_Question,1258 return questionBinary(pParent, MessageType_Question, 1273 1259 strMessage.arg(medium.location()), 1274 1260 "confirmMediumRemoval" /* auto-confirm id */, tr("Remove", "medium")); … … 1277 1263 int UIMessageCenter::confirmDeleteHardDiskStorage(const QString &strLocation, QWidget *pParent /*= 0*/) const 1278 1264 { 1279 return questionTrinary(pParent ? pParent : mainWindowShown(), MessageType_Question,1265 return questionTrinary(pParent, MessageType_Question, 1280 1266 tr("<p>Do you want to delete the storage unit of the hard disk " 1281 1267 "<nobr><b>%1</b></nobr>?</p>" … … 1295 1281 void UIMessageCenter::cannotDeleteHardDiskStorage(const CMedium &medium, const QString &strLocation, QWidget *pParent /*= 0*/) const 1296 1282 { 1297 error(pParent ? pParent : mainWindowShown(), MessageType_Error,1283 error(pParent, MessageType_Error, 1298 1284 tr("Failed to delete the storage unit of the hard disk <b>%1</b>.") 1299 1285 .arg(strLocation), … … 1303 1289 void UIMessageCenter::cannotDeleteHardDiskStorage(const CProgress &progress, const QString &strLocation, QWidget *pParent /*= 0*/) const 1304 1290 { 1305 error(pParent ? pParent : mainWindowShown(), MessageType_Error,1291 error(pParent, MessageType_Error, 1306 1292 tr("Failed to delete the storage unit of the hard disk <b>%1</b>.") 1307 1293 .arg(strLocation), … … 1339 1325 } 1340 1326 /* Show the error: */ 1341 error(pParent ? pParent : mainWindowShown(), MessageType_Error,1327 error(pParent, MessageType_Error, 1342 1328 strMessage, strErrorInfo); 1343 1329 } … … 1388 1374 /* Show the messsage: */ 1389 1375 if (fRetry) 1390 return errorWithQuestion(pParent ? pParent : mainWindowShown(), MessageType_Question,1376 return errorWithQuestion(pParent, MessageType_Question, 1391 1377 strMessage.arg(medium.isHostDrive() ? medium.name() : medium.location()).arg(machine.GetName()), 1392 1378 strErrorInfo, 1393 1379 0 /* Auto Confirm ID */, 1394 1380 tr("Force Unmount")); 1395 error(pParent ? pParent : mainWindowShown(), MessageType_Error,1381 error(pParent, MessageType_Error, 1396 1382 strMessage.arg(medium.isHostDrive() ? medium.name() : medium.location()).arg(machine.GetName()), 1397 1383 strErrorInfo); … … 1424 1410 } 1425 1411 /* Show the error: */ 1426 error(pParent ? pParent : mainWindowShown(), MessageType_Error,1412 error(pParent, MessageType_Error, 1427 1413 strMessage.arg(strLocation), formatErrorInfo(vbox)); 1428 1414 } … … 1453 1439 } 1454 1440 /* Show the error: */ 1455 error(pParent ? pParent : mainWindowShown(), MessageType_Error,1441 error(pParent, MessageType_Error, 1456 1442 strMessage.arg(medium.location()), formatErrorInfo(rc)); 1457 1443 } … … 1459 1445 bool UIMessageCenter::confirmHardDisklessMachine(QWidget *pParent /*= 0*/) const 1460 1446 { 1461 return questionBinary(pParent ? pParent : mainWindowShown(), MessageType_Warning,1447 return questionBinary(pParent, MessageType_Warning, 1462 1448 tr("You are about to create a new virtual machine without a hard drive. " 1463 1449 "You will not be able to install an operating system on the machine " … … 1471 1457 void UIMessageCenter::cannotCreateMachine(const CVirtualBox &vbox, QWidget *pParent /*= 0*/) const 1472 1458 { 1473 error(pParent ? pParent : mainWindowShown(), MessageType_Error,1459 error(pParent, MessageType_Error, 1474 1460 tr("Failed to create a new virtual machine."), 1475 1461 formatErrorInfo(vbox)); … … 1478 1464 void UIMessageCenter::cannotRegisterMachine(const CVirtualBox &vbox, const QString &strMachineName, QWidget *pParent /*= 0*/) const 1479 1465 { 1480 error(pParent ? pParent : mainWindowShown(), MessageType_Error,1466 error(pParent, MessageType_Error, 1481 1467 tr("Failed to register the virtual machine <b>%1</b>.") 1482 1468 .arg(strMachineName), … … 1489 1475 QString strErrorInfo = formatErrorInfo(machine); 1490 1476 /* Show the error: */ 1491 error(pParent ? pParent : mainWindowShown(), MessageType_Error,1477 error(pParent, MessageType_Error, 1492 1478 tr("Failed to clone the virtual machine <b>%1</b>.") 1493 1479 .arg(machine.GetName()), … … 1497 1483 void UIMessageCenter::cannotCreateClone(const CProgress &progress, const QString &strMachineName, QWidget *pParent /*= 0*/) const 1498 1484 { 1499 error(pParent ? pParent : mainWindowShown(), MessageType_Error,1485 error(pParent, MessageType_Error, 1500 1486 tr("Failed to clone the virtual machine <b>%1</b>.") 1501 1487 .arg(strMachineName), … … 1505 1491 void UIMessageCenter::cannotOverwriteHardDiskStorage(const QString &strLocation, QWidget *pParent /*= 0*/) const 1506 1492 { 1507 alert(pParent ? pParent : mainWindowShown(), MessageType_Info,1493 alert(pParent, MessageType_Info, 1508 1494 tr("<p>The hard disk storage unit at location <b>%1</b> already exists. " 1509 1495 "You cannot create a new virtual hard disk that uses this location " … … 1515 1501 void UIMessageCenter::cannotCreateHardDiskStorage(const CVirtualBox &vbox, const QString &strLocation, QWidget *pParent /*= 0*/) const 1516 1502 { 1517 error(pParent ? pParent : mainWindowShown(), MessageType_Error,1503 error(pParent, MessageType_Error, 1518 1504 tr("Failed to create the hard disk storage <nobr><b>%1</b>.</nobr>") 1519 1505 .arg(strLocation), … … 1523 1509 void UIMessageCenter::cannotCreateHardDiskStorage(const CMedium &medium, const QString &strLocation, QWidget *pParent /*= 0*/) const 1524 1510 { 1525 error(pParent ? pParent : mainWindowShown(), MessageType_Error,1511 error(pParent, MessageType_Error, 1526 1512 tr("Failed to create the hard disk storage <nobr><b>%1</b>.</nobr>") 1527 1513 .arg(strLocation), … … 1531 1517 void UIMessageCenter::cannotCreateHardDiskStorage(const CProgress &progress, const QString &strLocation, QWidget *pParent /*= 0*/) const 1532 1518 { 1533 error(pParent ? pParent : mainWindowShown(), MessageType_Error,1519 error(pParent, MessageType_Error, 1534 1520 tr("Failed to create the hard disk storage <nobr><b>%1</b>.</nobr>") 1535 1521 .arg(strLocation), … … 1540 1526 { 1541 1527 QFileInfo fi(strFolderName); 1542 alert(pParent ? pParent : mainWindowShown(), MessageType_Critical,1528 alert(pParent, MessageType_Critical, 1543 1529 tr("<p>Cannot remove the machine folder <nobr><b>%1</b>.</nobr></p>" 1544 1530 "<p>Please check that this folder really exists and that you have permissions to remove it.</p>") … … 1549 1535 { 1550 1536 QFileInfo fi(strFolderName); 1551 alert(pParent ? pParent : mainWindowShown(), MessageType_Critical,1537 alert(pParent, MessageType_Critical, 1552 1538 tr("<p>Cannot create the machine folder <b>%1</b> in the parent folder <nobr><b>%2</b>.</nobr></p>" 1553 1539 "<p>This folder already exists and possibly belongs to another machine.</p>") … … 1558 1544 { 1559 1545 QFileInfo fi(strFolderName); 1560 alert(pParent ? pParent : mainWindowShown(), MessageType_Critical,1546 alert(pParent, MessageType_Critical, 1561 1547 tr("<p>Cannot create the machine folder <b>%1</b> in the parent folder <nobr><b>%2</b>.</nobr></p>" 1562 1548 "<p>Please check that the parent really exists and that you have permissions to create the machine folder.</p>") … … 1575 1561 strWarningInfo = "<br />" + strWarningInfo; 1576 1562 /* Show the error: */ 1577 error(pParent ? pParent : mainWindowShown(), MessageType_Error,1563 error(pParent, MessageType_Error, 1578 1564 tr("Failed to open/interpret appliance <b>%1</b>.") 1579 1565 .arg(appliance.GetPath()), … … 1583 1569 void UIMessageCenter::cannotImportAppliance(const CProgress &progress, const QString &strPath, QWidget *pParent /*= 0*/) const 1584 1570 { 1585 error(pParent ? pParent : mainWindowShown(), MessageType_Error,1571 error(pParent, MessageType_Error, 1586 1572 tr("Failed to import appliance <b>%1</b>.") 1587 1573 .arg(strPath), … … 1591 1577 void UIMessageCenter::cannotCheckFiles(const CProgress &progress, QWidget *pParent /*= 0*/) const 1592 1578 { 1593 error(pParent ? pParent : mainWindowShown(), MessageType_Error,1579 error(pParent, MessageType_Error, 1594 1580 tr("Failed to check files."), 1595 1581 !progress.isOk() ? formatErrorInfo(progress) : formatErrorInfo(progress.GetErrorInfo())); … … 1598 1584 void UIMessageCenter::cannotRemoveFiles(const CProgress &progress, QWidget *pParent /*= 0*/) const 1599 1585 { 1600 error(pParent ? pParent : mainWindowShown(), MessageType_Error,1586 error(pParent, MessageType_Error, 1601 1587 tr("Failed to remove file."), 1602 1588 !progress.isOk() ? formatErrorInfo(progress) : formatErrorInfo(progress.GetErrorInfo())); … … 1605 1591 bool UIMessageCenter::confirmExportMachinesInSaveState(const QStringList &machineNames, QWidget *pParent /*= 0*/) const 1606 1592 { 1607 return questionBinary(pParent ? pParent : mainWindowShown(), MessageType_Warning,1593 return questionBinary(pParent, MessageType_Warning, 1608 1594 tr("<p>The %n following virtual machine(s) are currently in a saved state: <b>%1</b></p>" 1609 1595 "<p>If you continue the runtime state of the exported machine(s) will be discarded. " … … 1622 1608 QString strErrorInfo = formatErrorInfo(appliance); 1623 1609 /* Show the error: */ 1624 error(pParent ? pParent : mainWindowShown(), MessageType_Error,1610 error(pParent, MessageType_Error, 1625 1611 tr("Failed to prepare the export of the appliance <b>%1</b>.") 1626 1612 .arg(appliance.GetPath()), … … 1630 1616 void UIMessageCenter::cannotExportAppliance(const CMachine &machine, const QString &strPath, QWidget *pParent /*= 0*/) const 1631 1617 { 1632 error(pParent ? pParent : mainWindowShown(), MessageType_Error,1618 error(pParent, MessageType_Error, 1633 1619 tr("Failed to prepare the export of the appliance <b>%1</b>.") 1634 1620 .arg(strPath), … … 1638 1624 void UIMessageCenter::cannotExportAppliance(const CProgress &progress, const QString &strPath, QWidget *pParent /*= 0*/) const 1639 1625 { 1640 error(pParent ? pParent : mainWindowShown(), MessageType_Error,1626 error(pParent, MessageType_Error, 1641 1627 tr("Failed to export appliance <b>%1</b>.") 1642 1628 .arg(strPath), … … 1646 1632 void UIMessageCenter::cannotFindSnapshotByName(const CMachine &machine, const QString &strName, QWidget *pParent /*= 0*/) const 1647 1633 { 1648 error(pParent ? pParent : mainWindowShown(), MessageType_Error,1634 error(pParent, MessageType_Error, 1649 1635 tr("Can't find snapshot named <b>%1</b>.") 1650 1636 .arg(strName), … … 1713 1699 if (type == MessageType_Critical) 1714 1700 { 1715 error(main MachineWindowShown(), type,1701 error(mainWindowShown(), type, 1716 1702 tr("<p>A fatal error has occurred during virtual machine execution! " 1717 1703 "The virtual machine will be powered off. Please copy the following error message " … … 1721 1707 else if (type == MessageType_Error) 1722 1708 { 1723 error(main MachineWindowShown(), type,1709 error(mainWindowShown(), type, 1724 1710 tr("<p>An error has occurred during virtual machine execution! " 1725 1711 "The error details are shown below. You may try to correct the error " … … 1729 1715 else 1730 1716 { 1731 error(main MachineWindowShown(), type,1717 error(mainWindowShown(), type, 1732 1718 tr("<p>The virtual machine execution may run into an error condition as described below. " 1733 1719 "We suggest that you take an appropriate action to avert the error.</p>"), … … 1746 1732 bool UIMessageCenter::remindAboutGuruMeditation(const QString &strLogFolder) 1747 1733 { 1748 return questionBinary(main MachineWindowShown(), MessageType_GuruMeditation,1734 return questionBinary(mainWindowShown(), MessageType_GuruMeditation, 1749 1735 tr("<p>A critical error has occurred while running the virtual " 1750 1736 "machine and the machine execution has been stopped.</p>" … … 1773 1759 { 1774 1760 if (fHWVirtExSupported) 1775 return questionBinary(main MachineWindowShown(), MessageType_Error,1761 return questionBinary(mainWindowShown(), MessageType_Error, 1776 1762 tr("<p>VT-x/AMD-V hardware acceleration has been enabled, but is " 1777 1763 "not operational. Your 64-bit guest will fail to detect a " … … 1782 1768 tr("Close VM"), tr("Continue")); 1783 1769 else 1784 return questionBinary(main MachineWindowShown(), MessageType_Error,1770 return questionBinary(mainWindowShown(), MessageType_Error, 1785 1771 tr("<p>VT-x/AMD-V hardware acceleration is not available on your system. " 1786 1772 "Your 64-bit guest will fail to detect a 64-bit CPU and will " … … 1793 1779 { 1794 1780 if (fHWVirtExSupported) 1795 return questionBinary(main MachineWindowShown(), MessageType_Error,1781 return questionBinary(mainWindowShown(), MessageType_Error, 1796 1782 tr("<p>VT-x/AMD-V hardware acceleration has been enabled, but is not operational. " 1797 1783 "Certain guests (e.g. OS/2 and QNX) require this feature.</p>" … … 1800 1786 tr("Close VM"), tr("Continue")); 1801 1787 else 1802 return questionBinary(main MachineWindowShown(), MessageType_Error,1788 return questionBinary(mainWindowShown(), MessageType_Error, 1803 1789 tr("<p>VT-x/AMD-V hardware acceleration is not available on your system. " 1804 1790 "Certain guests (e.g. OS/2 and QNX) require this feature and will fail to boot without it.</p>"), … … 1809 1795 bool UIMessageCenter::cannotStartWithoutNetworkIf(const QString &strMachineName, const QString &strIfNames) const 1810 1796 { 1811 return questionBinary(main MachineWindowShown(), MessageType_Error,1797 return questionBinary(mainWindowShown(), MessageType_Error, 1812 1798 tr("<p>Could not start the machine <b>%1</b> because the following " 1813 1799 "physical network interfaces were not found:</p><p><b>%2</b></p>" … … 1820 1806 void UIMessageCenter::cannotStartMachine(const CConsole &console, const QString &strName) const 1821 1807 { 1822 error(main MachineWindowShown(), MessageType_Error,1808 error(mainWindowShown(), MessageType_Error, 1823 1809 tr("Failed to start the virtual machine <b>%1</b>.") 1824 1810 .arg(strName), … … 1828 1814 void UIMessageCenter::cannotStartMachine(const CProgress &progress, const QString &strName) const 1829 1815 { 1830 error(main MachineWindowShown(), MessageType_Error,1816 error(mainWindowShown(), MessageType_Error, 1831 1817 tr("Failed to start the virtual machine <b>%1</b>.") 1832 1818 .arg(strName), … … 1836 1822 void UIMessageCenter::cannotSendACPIToMachine() const 1837 1823 { 1838 alert(main MachineWindowShown(), MessageType_Warning,1824 alert(mainWindowShown(), MessageType_Warning, 1839 1825 tr("You are trying to shut down the guest with the ACPI power button. " 1840 1826 "This is currently not possible because the guest does not support software shutdown.")); … … 1843 1829 bool UIMessageCenter::confirmInputCapture(bool &fAutoConfirmed) const 1844 1830 { 1845 int rc = question(main MachineWindowShown(), MessageType_Info,1831 int rc = question(mainWindowShown(), MessageType_Info, 1846 1832 tr("<p>You have <b>clicked the mouse</b> inside the Virtual Machine display or pressed the <b>host key</b>. " 1847 1833 "This will cause the Virtual Machine to <b>capture</b> the host mouse pointer (only if the mouse pointer " … … 1868 1854 void UIMessageCenter::remindAboutAutoCapture() const 1869 1855 { 1870 alert(main MachineWindowShown(), MessageType_Info,1856 alert(mainWindowShown(), MessageType_Info, 1871 1857 tr("<p>You have the <b>Auto capture keyboard</b> option turned on. " 1872 1858 "This will cause the Virtual Machine to automatically <b>capture</b> " … … 1903 1889 if (fSupportsAbsolute) 1904 1890 { 1905 alert(main MachineWindowShown(), MessageType_Info,1891 alert(mainWindowShown(), MessageType_Info, 1906 1892 tr("<p>The Virtual Machine reports that the guest OS supports <b>mouse pointer integration</b>. " 1907 1893 "This means that you do not need to <i>capture</i> the mouse pointer to be able to use it in your guest OS -- " … … 1917 1903 else 1918 1904 { 1919 alert(main MachineWindowShown(), MessageType_Info,1905 alert(mainWindowShown(), MessageType_Info, 1920 1906 tr("<p>The Virtual Machine reports that the guest OS does not support <b>mouse pointer integration</b> " 1921 1907 "in the current video mode. You need to capture the mouse (by clicking over the VM display " … … 1930 1916 void UIMessageCenter::remindAboutPausedVMInput() const 1931 1917 { 1932 alert(main MachineWindowShown(), MessageType_Info,1918 alert(mainWindowShown(), MessageType_Info, 1933 1919 tr("<p>The Virtual Machine is currently in the <b>Paused</b> state and " 1934 1920 "not able to see any keyboard or mouse input. If you want to " … … 1940 1926 bool UIMessageCenter::confirmGoingFullscreen(const QString &strHotKey) const 1941 1927 { 1942 return questionBinary(main MachineWindowShown(), MessageType_Info,1928 return questionBinary(mainWindowShown(), MessageType_Info, 1943 1929 tr("<p>The virtual machine window will be now switched to <b>fullscreen</b> mode. " 1944 1930 "You can go back to windowed mode at any time by pressing <b>%1</b>.</p>" … … 1953 1939 bool UIMessageCenter::confirmGoingSeamless(const QString &strHotKey) const 1954 1940 { 1955 return questionBinary(main MachineWindowShown(), MessageType_Info,1941 return questionBinary(mainWindowShown(), MessageType_Info, 1956 1942 tr("<p>The virtual machine window will be now switched to <b>Seamless</b> mode. " 1957 1943 "You can go back to windowed mode at any time by pressing <b>%1</b>.</p>" … … 1966 1952 bool UIMessageCenter::confirmGoingScale(const QString &strHotKey) const 1967 1953 { 1968 return questionBinary(main MachineWindowShown(), MessageType_Info,1954 return questionBinary(mainWindowShown(), MessageType_Info, 1969 1955 tr("<p>The virtual machine window will be now switched to <b>Scale</b> mode. " 1970 1956 "You can go back to windowed mode at any time by pressing <b>%1</b>.</p>" … … 1979 1965 bool UIMessageCenter::cannotEnterFullscreenMode(ULONG /* uWidth */, ULONG /* uHeight */, ULONG /* uBpp */, ULONG64 uMinVRAM) const 1980 1966 { 1981 return questionBinary(main MachineWindowShown(), MessageType_Warning,1967 return questionBinary(mainWindowShown(), MessageType_Warning, 1982 1968 tr("<p>Could not switch the guest display to fullscreen mode due to insufficient guest video memory.</p>" 1983 1969 "<p>You should configure the virtual machine to have at least <b>%1</b> of video memory.</p>" … … 1990 1976 void UIMessageCenter::cannotEnterSeamlessMode(ULONG /* uWidth */, ULONG /* uHeight */, ULONG /* uBpp */, ULONG64 uMinVRAM) const 1991 1977 { 1992 alert(main MachineWindowShown(), MessageType_Error,1978 alert(mainWindowShown(), MessageType_Error, 1993 1979 tr("<p>Could not enter seamless mode due to insufficient guest " 1994 1980 "video memory.</p>" … … 2000 1986 bool UIMessageCenter::cannotSwitchScreenInFullscreen(quint64 uMinVRAM) const 2001 1987 { 2002 return questionBinary(main MachineWindowShown(), MessageType_Warning,1988 return questionBinary(mainWindowShown(), MessageType_Warning, 2003 1989 tr("<p>Could not change the guest screen to this host screen due to insufficient guest video memory.</p>" 2004 1990 "<p>You should configure the virtual machine to have at least <b>%1</b> of video memory.</p>" … … 2011 1997 void UIMessageCenter::cannotSwitchScreenInSeamless(quint64 uMinVRAM) const 2012 1998 { 2013 alert(main MachineWindowShown(), MessageType_Error,1999 alert(mainWindowShown(), MessageType_Error, 2014 2000 tr("<p>Could not change the guest screen to this host screen " 2015 2001 "due to insufficient guest video memory.</p>" … … 2024 2010 QString strErrorInfo = formatErrorInfo(console); 2025 2011 /* Show the error: */ 2026 error(main MachineWindowShown(), MessageType_Error,2012 error(mainWindowShown(), MessageType_Error, 2027 2013 tr("Failed to attach the USB device <b>%1</b> to the virtual machine <b>%2</b>.") 2028 2014 .arg(strDevice, console.GetMachine().GetName()), … … 2032 2018 void UIMessageCenter::cannotAttachUSBDevice(const CVirtualBoxErrorInfo &errorInfo, const QString &strDevice, const QString &strMachineName) const 2033 2019 { 2034 error(main MachineWindowShown(), MessageType_Error,2020 error(mainWindowShown(), MessageType_Error, 2035 2021 tr("Failed to attach the USB device <b>%1</b> to the virtual machine <b>%2</b>.") 2036 2022 .arg(strDevice, strMachineName), … … 2043 2029 QString strErrorInfo = formatErrorInfo(console); 2044 2030 /* Show the error: */ 2045 error(main MachineWindowShown(), MessageType_Error,2031 error(mainWindowShown(), MessageType_Error, 2046 2032 tr("Failed to detach the USB device <b>%1</b> from the virtual machine <b>%2</b>.") 2047 2033 .arg(strDevice, console.GetMachine().GetName()), … … 2051 2037 void UIMessageCenter::cannotDetachUSBDevice(const CVirtualBoxErrorInfo &errorInfo, const QString &strDevice, const QString &strMachineName) const 2052 2038 { 2053 error(main MachineWindowShown(), MessageType_Error,2039 error(mainWindowShown(), MessageType_Error, 2054 2040 tr("Failed to detach the USB device <b>%1</b> from the virtual machine <b>%2</b>.") 2055 2041 .arg(strDevice, strMachineName), … … 2059 2045 void UIMessageCenter::remindAboutGuestAdditionsAreNotActive(QWidget *pParent /*= 0*/) const 2060 2046 { 2061 alert(pParent ? pParent : mainMachineWindowShown(), MessageType_Warning,2047 alert(pParent, MessageType_Warning, 2062 2048 tr("<p>The VirtualBox Guest Additions do not appear to be available on this virtual machine, " 2063 2049 "and shared folders cannot be used without them. To use shared folders inside the virtual machine, " … … 2101 2087 bool UIMessageCenter::cannotFindGuestAdditions() const 2102 2088 { 2103 return questionBinary(main MachineWindowShown(), MessageType_Question,2089 return questionBinary(mainWindowShown(), MessageType_Question, 2104 2090 tr("<p>Could not find the <b>VirtualBox Guest Additions</b> CD image.</p>" 2105 2091 "<p>Do you wish to download this CD image from the Internet?</p>"), … … 2111 2097 { 2112 2098 QLocale loc(VBoxGlobal::languageId()); 2113 return questionBinary(networkManagerOrMain MachineWindowShown(), MessageType_Question,2099 return questionBinary(networkManagerOrMainWindowShown(), MessageType_Question, 2114 2100 tr("<p>Are you sure you want to download the <b>VirtualBox Guest Additions</b> CD image " 2115 2101 "from <nobr><a href=\"%1\">%1</a></nobr> (size %2 bytes)?</p>") … … 2121 2107 void UIMessageCenter::cannotSaveGuestAdditions(const QString &strURL, const QString &strTarget) const 2122 2108 { 2123 alert(networkManagerOrMain MachineWindowShown(), MessageType_Error,2109 alert(networkManagerOrMainWindowShown(), MessageType_Error, 2124 2110 tr("<p>The <b>VirtualBox Guest Additions</b> CD image has been successfully downloaded " 2125 2111 "from <nobr><a href=\"%1\">%1</a></nobr> " … … 2131 2117 bool UIMessageCenter::proposeMountGuestAdditions(const QString &strUrl, const QString &strSrc) const 2132 2118 { 2133 return questionBinary(networkManagerOrMain MachineWindowShown(), MessageType_Question,2119 return questionBinary(networkManagerOrMainWindowShown(), MessageType_Question, 2134 2120 tr("<p>The <b>VirtualBox Guest Additions</b> CD image has been successfully downloaded " 2135 2121 "from <nobr><a href=\"%1\">%1</a></nobr> " … … 2143 2129 void UIMessageCenter::cannotMountGuestAdditions(const QString &strMachineName) const 2144 2130 { 2145 alert(main MachineWindowShown(), MessageType_Error,2131 alert(mainWindowShown(), MessageType_Error, 2146 2132 tr("<p>Could not insert the <b>VirtualBox Guest Additions</b> CD image into the virtual machine <b>%1</b>, " 2147 2133 "as the machine has no CD/DVD-ROM drives. Please add a drive using the storage page of the " … … 2152 2138 void UIMessageCenter::cannotUpdateGuestAdditions(const CProgress &progress) const 2153 2139 { 2154 error(main MachineWindowShown(), MessageType_Error,2140 error(mainWindowShown(), MessageType_Error, 2155 2141 tr("Failed to update Guest Additions. " 2156 2142 "The Guest Additions installation image will be mounted to provide a manual installation."), … … 2245 2231 const QString &strPackDescription, QWidget *pParent /*= 0*/) const 2246 2232 { 2247 return questionBinary(pParent ? pParent : mainWindowShown(), 2248 MessageType_Question, 2233 return questionBinary(pParent, MessageType_Question, 2249 2234 tr("<p>You are about to install a VirtualBox extension pack. " 2250 2235 "Extension packs complement the functionality of VirtualBox and can contain system level software " … … 2279 2264 bool fRc; 2280 2265 if (iVerCmp > 0) 2281 fRc = questionBinary(pParent ? pParent : mainWindowShown(), 2282 MessageType_Question, 2266 fRc = questionBinary(pParent, MessageType_Question, 2283 2267 tr("<p>An older version of the extension pack is already installed, would you like to upgrade? " 2284 2268 "<p>%1</p>" … … 2293 2277 tr("&Upgrade")); 2294 2278 else if (iVerCmp < 0) 2295 fRc = questionBinary(pParent ? pParent : mainWindowShown(), 2296 MessageType_Question, 2279 fRc = questionBinary(pParent, MessageType_Question, 2297 2280 tr("<p>An newer version of the extension pack is already installed, would you like to downgrade? " 2298 2281 "<p>%1</p>" … … 2307 2290 tr("&Downgrade")); 2308 2291 else 2309 fRc = questionBinary(pParent ? pParent : mainWindowShown(), 2310 MessageType_Question, 2292 fRc = questionBinary(pParent, MessageType_Question, 2311 2293 tr("<p>The extension pack is already installed with the same version, would you like reinstall it? " 2312 2294 "<p>%1</p>" … … 2324 2306 bool UIMessageCenter::confirmRemoveExtensionPack(const QString &strPackName, QWidget *pParent /*= 0*/) const 2325 2307 { 2326 return questionBinary(pParent ? pParent : mainWindowShown(), 2327 MessageType_Question, 2308 return questionBinary(pParent, MessageType_Question, 2328 2309 tr("<p>You are about to remove the VirtualBox extension pack <b>%1</b>.</p>" 2329 2310 "<p>Are you sure you want to proceed?</p>") … … 2335 2316 void UIMessageCenter::cannotOpenExtPack(const QString &strFilename, const CExtPackManager &extPackManager, QWidget *pParent /*= 0*/) const 2336 2317 { 2337 error(pParent ? pParent : mainWindowShown(), MessageType_Error,2318 error(pParent, MessageType_Error, 2338 2319 tr("Failed to open the Extension Pack <b>%1</b>.").arg(strFilename), 2339 2320 formatErrorInfo(extPackManager)); … … 2342 2323 void UIMessageCenter::warnAboutBadExtPackFile(const QString &strFilename, const CExtPackFile &extPackFile, QWidget *pParent /*= 0*/) const 2343 2324 { 2344 error(pParent ? pParent : mainWindowShown(), MessageType_Error,2325 error(pParent, MessageType_Error, 2345 2326 tr("Failed to open the Extension Pack <b>%1</b>.").arg(strFilename), 2346 2327 "<!--EOM-->" + extPackFile.GetWhyUnusable()); … … 2349 2330 void UIMessageCenter::cannotInstallExtPack(const CExtPackFile &extPackFile, const QString &strFilename, QWidget *pParent /*= 0*/) const 2350 2331 { 2351 error(pParent ? pParent : mainWindowShown(), MessageType_Error,2332 error(pParent, MessageType_Error, 2352 2333 tr("Failed to install the Extension Pack <b>%1</b>.") 2353 2334 .arg(strFilename), … … 2357 2338 void UIMessageCenter::cannotInstallExtPack(const CProgress &progress, const QString &strFilename, QWidget *pParent /*= 0*/) const 2358 2339 { 2359 error(pParent ? pParent : mainWindowShown(), MessageType_Error,2340 error(pParent, MessageType_Error, 2360 2341 tr("Failed to install the Extension Pack <b>%1</b>.") 2361 2342 .arg(strFilename), … … 2365 2346 void UIMessageCenter::cannotUninstallExtPack(const CExtPackManager &extPackManager, const QString &strPackName, QWidget *pParent /*= 0*/) const 2366 2347 { 2367 error(pParent ? pParent : mainWindowShown(), MessageType_Error,2348 error(pParent, MessageType_Error, 2368 2349 tr("Failed to uninstall the Extension Pack <b>%1</b>.") 2369 2350 .arg(strPackName), … … 2373 2354 void UIMessageCenter::cannotUninstallExtPack(const CProgress &progress, const QString &strPackName, QWidget *pParent /*= 0*/) const 2374 2355 { 2375 error(pParent ? pParent : mainWindowShown(), MessageType_Error,2356 error(pParent, MessageType_Error, 2376 2357 tr("Failed to uninstall the Extension Pack <b>%1</b>.") 2377 2358 .arg(strPackName), … … 2381 2362 void UIMessageCenter::warnAboutExtPackInstalled(const QString &strPackName, QWidget *pParent /*= 0*/) const 2382 2363 { 2383 alert(pParent ? pParent : mainWindowShown(), MessageType_Info,2364 alert(pParent, MessageType_Info, 2384 2365 tr("The extension pack <br><nobr><b>%1</b><nobr><br> was installed successfully.") 2385 2366 .arg(strPackName)); … … 2389 2370 void UIMessageCenter::cannotDropData(const CGuest &guest, QWidget *pParent /*= 0*/) const 2390 2371 { 2391 error(pParent ? pParent : mainWindowShown(), MessageType_Error,2372 error(pParent, MessageType_Error, 2392 2373 tr("Failed to drop data."), 2393 2374 formatErrorInfo(guest)); … … 2396 2377 void UIMessageCenter::cannotDropData(const CProgress &progress, QWidget *pParent /*= 0*/) const 2397 2378 { 2398 error(pParent ? pParent : mainWindowShown(), MessageType_Error,2379 error(pParent, MessageType_Error, 2399 2380 tr("Failed to drop data."), 2400 2381 !progress.isOk() ? formatErrorInfo(progress) : formatErrorInfo(progress.GetErrorInfo())); … … 2404 2385 void UIMessageCenter::cannotOpenLicenseFile(const QString &strPath, QWidget *pParent /*= 0*/) const 2405 2386 { 2406 alert(pParent ? pParent : mainWindowShown(), MessageType_Error,2387 alert(pParent, MessageType_Error, 2407 2388 tr("Failed to open the license file <nobr><b>%1</b></nobr>. Check file permissions.") 2408 2389 .arg(strPath)); … … 2642 2623 } 2643 2624 2644 alert(main MachineWindowShown(), MessageType_Info,2625 alert(mainWindowShown(), MessageType_Info, 2645 2626 tr("<p>The virtual machine window is optimized to work in " 2646 2627 "<b>%1 bit</b> color mode but the " … … 2850 2831 2851 2832 /* Create message-box: */ 2852 QWidget *pMessageBoxParent = mwManager().realParentWindow(pParent );2833 QWidget *pMessageBoxParent = mwManager().realParentWindow(pParent ? pParent : mainWindowShown()); 2853 2834 QPointer<QIMessageBox> pMessageBox = new QIMessageBox(title, strMessage, icon, 2854 2835 iButton1, iButton2, iButton3, -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
r45368 r45371 155 155 /* API: Main window stuff: */ 156 156 QWidget* mainWindowShown() const; 157 QWidget* mainMachineWindowShown() const;158 157 QWidget* networkManagerOrMainWindowShown() const; 159 QWidget* networkManagerOrMainMachineWindowShown() const;160 158 161 159 /* API: Main (startup) warnings: */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
r45325 r45371 4959 4959 * otherwise we better show the progress... */ 4960 4960 int iSpawningDuration = 60000; 4961 msgCenter().showModalProgressDialog(progress, machine.GetName(), "", m ainWindow(), iSpawningDuration);4961 msgCenter().showModalProgressDialog(progress, machine.GetName(), "", msgCenter().mainWindowShown(), iSpawningDuration); 4962 4962 if (!progress.isOk() || progress.GetResultCode() != 0) 4963 4963 msgCenter().cannotOpenSession(progress, machine.GetName()); -
trunk/src/VBox/Frontends/VirtualBox/src/net/UIDownloaderAdditions.cpp
r45342 r45371 103 103 /* Ask the user for another location for the additions-image file: */ 104 104 QString strTarget = QIFileDialog::getExistingDirectory(QFileInfo(target()).absolutePath(), 105 msgCenter().networkManagerOrMain MachineWindowShown(),105 msgCenter().networkManagerOrMainWindowShown(), 106 106 tr("Select folder to save Guest Additions image to"), true); 107 107 -
trunk/src/VBox/Frontends/VirtualBox/src/net/UIUpdateManager.cpp
r45342 r45371 443 443 /* Warn the user about extension pack was downloaded and saved, propose to install it: */ 444 444 if (msgCenter().proposeInstallExtentionPack(GUI_ExtPackName, strSource, QDir::toNativeSeparators(strTarget))) 445 UIGlobalSettingsExtension::doInstallation(strTarget, strDigest, msgCenter(). mainWindowShown(), NULL);445 UIGlobalSettingsExtension::doInstallation(strTarget, strDigest, msgCenter().networkManagerOrMainWindowShown(), NULL); 446 446 } 447 447 }; -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r45368 r45371 506 506 { 507 507 msgCenter().showModalProgressDialog(progressInstall, tr("Updating Guest Additions"), ":/progress_install_guest_additions_90px.png", 508 ma inMachineWindow(), 500 /* 500ms delay. */);508 machineLogic()->activeMachineWindow(), 500 /* 500ms delay. */); 509 509 if (progressInstall.GetCanceled()) 510 510 return; -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UISelectorWindow.cpp
r45362 r45371 609 609 /* Show machine state saving progress: */ 610 610 CMachine machine = session.GetMachine(); 611 msgCenter().showModalProgressDialog(progress, machine.GetName(), ":/progress_state_save_90px.png" , this);611 msgCenter().showModalProgressDialog(progress, machine.GetName(), ":/progress_state_save_90px.png"); 612 612 if (!progress.isOk() || progress.GetResultCode() != 0) 613 613 msgCenter().cannotSaveMachineState(progress, machine.GetName()); … … 699 699 /* Show machine power down progress: */ 700 700 CMachine machine = session.GetMachine(); 701 msgCenter().showModalProgressDialog(progress, machine.GetName(), ":/progress_poweroff_90px.png" , this);701 msgCenter().showModalProgressDialog(progress, machine.GetName(), ":/progress_poweroff_90px.png"); 702 702 if (!progress.isOk() || progress.GetResultCode() != 0) 703 703 msgCenter().cannotPowerDownMachine(progress, machine.GetName()); -
trunk/src/VBox/Frontends/VirtualBox/src/selector/VBoxSnapshotsWgt.cpp
r45328 r45371 607 607 if (console.isOk()) 608 608 { 609 msgCenter().showModalProgressDialog(progress, mMachine.GetName(), ":/progress_snapshot_restore_90px.png", 610 msgCenter().mainWindowShown(), true); 609 msgCenter().showModalProgressDialog(progress, mMachine.GetName(), ":/progress_snapshot_restore_90px.png"); 611 610 if (progress.GetResultCode() != 0) 612 611 msgCenter().cannotRestoreSnapshot(progress, snapshot.GetName(), mMachine.GetName()); … … 656 655 { 657 656 /* Show the progress dialog */ 658 msgCenter().showModalProgressDialog(progress, mMachine.GetName(), ":/progress_snapshot_discard_90px.png", 659 msgCenter().mainWindowShown(), true); 657 msgCenter().showModalProgressDialog(progress, mMachine.GetName(), ":/progress_snapshot_discard_90px.png"); 660 658 661 659 if (progress.GetResultCode() != 0)
Note:
See TracChangeset
for help on using the changeset viewer.