Changeset 45424 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Apr 9, 2013 8:21:25 AM (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
r45377 r45424 349 349 void UIMessageCenter::warnAboutWrongUSBMounted() const 350 350 { 351 alert( mainWindowShown(), MessageType_Warning,351 alert(0, MessageType_Warning, 352 352 tr("You seem to have the USBFS filesystem mounted at /sys/bus/usb/drivers. " 353 353 "We strongly recommend that you change this, as it is a severe mis-configuration of " 354 354 "your system which could cause USB devices to fail in unexpected ways."), 355 " checkForMountedWrongUSB");355 "warnAboutWrongUSBMounted"); 356 356 } 357 357 #endif /* RT_OS_LINUX */ … … 411 411 tr("<p>Could not find a language file for the language <b>%1</b> in the directory <b><nobr>%2</nobr></b>.</p>" 412 412 "<p>The language will be temporarily reset to the system default language. " 413 "Please go to the <b>Preferences</b> dialog which you can open from the <b>File</b> menu "414 " of the main VirtualBoxwindow, and select one of the existing languages on the <b>Language</b> page.</p>")413 "Please go to the <b>Preferences</b> dialog which you can open from the <b>File</b> menu of the " 414 "VirtualBox Manager window, and select one of the existing languages on the <b>Language</b> page.</p>") 415 415 .arg(strLangId).arg(strNlsPath)); 416 416 } … … 421 421 tr("<p>Could not load the language file <b><nobr>%1</nobr></b>. " 422 422 "<p>The language will be temporarily reset to English (built-in). " 423 "Please go to the <b>Preferences</b> dialog which you can open from the <b>File</b> menu "424 " of the main VirtualBoxwindow, and select one of the existing languages on the <b>Language</b> page.</p>")423 "Please go to the <b>Preferences</b> dialog which you can open from the <b>File</b> menu of the " 424 "VirtualBox Manager window, and select one of the existing languages on the <b>Language</b> page.</p>") 425 425 .arg(strLangFile)); 426 426 } … … 428 428 void UIMessageCenter::cannotLoadGlobalConfig(const CVirtualBox &vbox, const QString &strError) const 429 429 { 430 /* Preserve error-info: */431 COMResult res(vbox);432 /* Show the error: */433 430 error(0, MessageType_Critical, 434 431 tr("<p>Failed to load the global GUI configuration from <b><nobr>%1</nobr></b>.</p>" 435 432 "<p>The application will now terminate.</p>") 436 .arg( vbox.GetSettingsFilePath()),437 ! res.isOk() ? formatErrorInfo(res) : QString("<!--EOM--><p>%1</p>").arg(vboxGlobal().emphasize(strError)));433 .arg(CVirtualBox(vbox).GetSettingsFilePath()), 434 !vbox.isOk() ? formatErrorInfo(vbox) : QString("<!--EOM--><p>%1</p>").arg(vboxGlobal().emphasize(strError))); 438 435 } 439 436 440 437 void UIMessageCenter::cannotSaveGlobalConfig(const CVirtualBox &vbox) const 441 438 { 442 /* Preserve error-info: */443 COMResult res(vbox);444 /* Show the error: */445 439 error(0, MessageType_Critical, 446 440 tr("<p>Failed to save the global GUI configuration to <b><nobr>%1</nobr></b>.</p>" 447 441 "<p>The application will now terminate.</p>") 448 .arg( vbox.GetSettingsFilePath()),449 formatErrorInfo( res));442 .arg(CVirtualBox(vbox).GetSettingsFilePath()), 443 formatErrorInfo(vbox)); 450 444 } 451 445 … … 468 462 void UIMessageCenter::cannotOpenSession(const CSession &session) const 469 463 { 470 error( mainWindowShown(), MessageType_Error,464 error(0, MessageType_Error, 471 465 tr("Failed to create a new session."), 472 466 formatErrorInfo(session)); … … 475 469 void UIMessageCenter::cannotOpenSession(const CMachine &machine) const 476 470 { 477 /* Preserve error-info: */ 478 QString strErrorInfo = formatErrorInfo(machine); 479 /* Show the error: */ 480 error(mainWindowShown(), MessageType_Error, 471 error(0, MessageType_Error, 481 472 tr("Failed to open a session for the virtual machine <b>%1</b>.") 482 .arg( machine.GetName()),483 strErrorInfo);473 .arg(CMachine(machine).GetName()), 474 formatErrorInfo(machine)); 484 475 } 485 476 486 477 void UIMessageCenter::cannotOpenSession(const CProgress &progress, const QString &strMachineName) const 487 478 { 488 error( mainWindowShown(), MessageType_Error,479 error(0, MessageType_Error, 489 480 tr("Failed to open a session for the virtual machine <b>%1</b>.") 490 481 .arg(strMachineName), 491 !progress.isOk() ? formatErrorInfo(progress) : formatErrorInfo(progress.GetErrorInfo()));482 formatErrorInfo(progress)); 492 483 } 493 484 494 485 void UIMessageCenter::cannotGetMediaAccessibility(const UIMedium &medium) const 495 486 { 496 error( mainWindowShown(), MessageType_Error,487 error(0, MessageType_Error, 497 488 tr("Failed to determine the accessibility state of the medium <nobr><b>%1</b></nobr>.") 498 489 .arg(medium.location()), … … 502 493 void UIMessageCenter::cannotOpenURL(const QString &strUrl) const 503 494 { 504 alert( mainWindowShown(), MessageType_Error,495 alert(0, MessageType_Error, 505 496 tr("Failed to open <tt>%1</tt>. " 506 497 "Make sure your desktop environment can properly handle URLs of this type.") … … 510 501 void UIMessageCenter::cannotOpenMachine(const CVirtualBox &vbox, const QString &strMachinePath) const 511 502 { 512 error( mainWindowShown(), MessageType_Error,503 error(0, MessageType_Error, 513 504 tr("Failed to open virtual machine located in %1.") 514 505 .arg(strMachinePath), … … 518 509 void UIMessageCenter::cannotReregisterExistingMachine(const QString &strMachinePath, const QString &strMachineName) const 519 510 { 520 alert( mainWindowShown(), MessageType_Error,511 alert(0, MessageType_Error, 521 512 tr("Failed to add virtual machine <b>%1</b> located in <i>%2</i> because its already present.") 522 .arg(strMachineName ).arg(strMachinePath));523 } 524 525 void UIMessageCenter::cannotResolveCollisionAutomatically(const QString &str Name, const QString &strGroupName) const526 { 527 alert( mainWindowShown(), MessageType_Error,513 .arg(strMachineName, strMachinePath)); 514 } 515 516 void UIMessageCenter::cannotResolveCollisionAutomatically(const QString &strCollisionName, const QString &strGroupName) const 517 { 518 alert(0, MessageType_Error, 528 519 tr("<p>You are trying to move machine <nobr><b>%1</b></nobr> " 529 520 "to group <nobr><b>%2</b></nobr> which already have sub-group <nobr><b>%1</b></nobr>.</p>" 530 521 "<p>Please resolve this name-conflict and try again.</p>") 531 .arg(str Name, strGroupName));522 .arg(strCollisionName, strGroupName)); 532 523 } 533 524 534 525 bool UIMessageCenter::confirmAutomaticCollisionResolve(const QString &strName, const QString &strGroupName) const 535 526 { 536 return questionBinary( mainWindowShown(), MessageType_Question,527 return questionBinary(0, MessageType_Question, 537 528 tr("<p>You are trying to move group <nobr><b>%1</b></nobr> " 538 529 "to group <nobr><b>%2</b></nobr> which already have another item with the same name.</p>" … … 545 536 void UIMessageCenter::cannotSetGroups(const CMachine &machine) const 546 537 { 547 /* Preserve error-info: */548 COMResult res(machine);549 538 /* Compose machine name: */ 550 QString strName = machine.GetName();539 QString strName = CMachine(machine).GetName(); 551 540 if (strName.isEmpty()) 552 strName = QFileInfo( machine.GetSettingsFilePath()).baseName();541 strName = QFileInfo(CMachine(machine).GetSettingsFilePath()).baseName(); 553 542 /* Show the error: */ 554 error( mainWindowShown(), MessageType_Error,543 error(0, MessageType_Error, 555 544 tr("Failed to set groups of the virtual machine <b>%1</b>.") 556 545 .arg(strName), 557 formatErrorInfo( res));546 formatErrorInfo(machine)); 558 547 } 559 548 560 549 bool UIMessageCenter::confirmMachineItemRemoval(const QStringList &names) const 561 550 { 562 return questionBinary( mainWindowShown(), MessageType_Question,551 return questionBinary(0, MessageType_Question, 563 552 tr("<p>You are about to remove following virtual machine items from the machine list:</p>" 564 553 "<p><b>%1</b></p><p>Do you wish to proceed?</p>") … … 632 621 /* Prepare message itself: */ 633 622 return cInacessibleMachineCount == machines.size() ? 634 message( mainWindowShown(), MessageType_Question,623 message(0, MessageType_Question, 635 624 strText, QString(), 636 625 0 /* auto-confirm id */, … … 639 628 0, 640 629 tr("Remove")) : 641 message( mainWindowShown(), MessageType_Question,630 message(0, MessageType_Question, 642 631 strText, QString(), 643 632 0 /* auto-confirm id */, … … 651 640 void UIMessageCenter::cannotRemoveMachine(const CMachine &machine) const 652 641 { 653 /* Preserve error-info: */ 654 COMResult res(machine); 655 /* Show the error: */ 656 error(mainWindowShown(), MessageType_Error, 642 error(0, MessageType_Error, 657 643 tr("Failed to remove the virtual machine <b>%1</b>.") 658 .arg( machine.GetName()),659 !machine.isOk() ? formatErrorInfo(machine) : formatErrorInfo(res));644 .arg(CMachine(machine).GetName()), 645 formatErrorInfo(machine)); 660 646 } 661 647 662 648 void UIMessageCenter::cannotRemoveMachine(const CMachine &machine, const CProgress &progress) const 663 649 { 664 error( mainWindowShown(), MessageType_Error,650 error(0, MessageType_Error, 665 651 tr("Failed to remove the virtual machine <b>%1</b>.") 666 .arg( machine.GetName()),667 !progress.isOk() ? formatErrorInfo(progress) : formatErrorInfo(progress.GetErrorInfo()));652 .arg(CMachine(machine).GetName()), 653 formatErrorInfo(progress)); 668 654 } 669 655 670 656 bool UIMessageCenter::warnAboutInaccessibleMedia() const 671 657 { 672 return questionBinary( mainWindowShown(), MessageType_Warning,658 return questionBinary(0, MessageType_Warning, 673 659 tr("<p>One or more virtual hard disks, CD/DVD or " 674 660 "floppy media are not currently accessible. As a result, you will " … … 684 670 bool UIMessageCenter::confirmDiscardSavedState(const QString &strNames) const 685 671 { 686 return questionBinary( mainWindowShown(), MessageType_Question,672 return questionBinary(0, MessageType_Question, 687 673 tr("<p>Are you sure you want to discard the saved state of " 688 674 "the following virtual machines?</p><p><b>%1</b></p>" … … 696 682 bool UIMessageCenter::confirmResetMachine(const QString &strNames) const 697 683 { 698 return questionBinary( mainWindowShown(), MessageType_Question,684 return questionBinary(0, MessageType_Question, 699 685 tr("<p>Do you really want to reset the following virtual machines?</p>" 700 686 "<p><b>%1</b></p><p>This will cause any unsaved data " … … 707 693 bool UIMessageCenter::confirmACPIShutdownMachine(const QString &strNames) const 708 694 { 709 return questionBinary( mainWindowShown(), MessageType_Question,695 return questionBinary(0, MessageType_Question, 710 696 tr("<p>Do you really want to send an ACPI shutdown signal " 711 697 "to the following virtual machines?</p><p><b>%1</b></p>") … … 717 703 bool UIMessageCenter::confirmPowerOffMachine(const QString &strNames) const 718 704 { 719 return questionBinary( mainWindowShown(), MessageType_Question,705 return questionBinary(0, MessageType_Question, 720 706 tr("<p>Do you really want to power off the following virtual machines?</p>" 721 707 "<p><b>%1</b></p><p>This will cause any unsaved data in applications " … … 728 714 void UIMessageCenter::cannotPauseMachine(const CConsole &console) const 729 715 { 730 /* Preserve error-info: */ 731 COMResult res(console); 732 /* Show the error: */ 733 error(mainWindowShown(), MessageType_Error, 716 error(0, MessageType_Error, 734 717 tr("Failed to pause the execution of the virtual machine <b>%1</b>.") 735 .arg( console.GetMachine().GetName()),736 formatErrorInfo( res));718 .arg(CConsole(console).GetMachine().GetName()), 719 formatErrorInfo(console)); 737 720 } 738 721 739 722 void UIMessageCenter::cannotResumeMachine(const CConsole &console) const 740 723 { 741 /* Preserve error-info: */ 742 COMResult res(console); 743 /* Show the error: */ 744 error(mainWindowShown(), MessageType_Error, 724 error(0, MessageType_Error, 745 725 tr("Failed to resume the execution of the virtual machine <b>%1</b>.") 746 .arg( console.GetMachine().GetName()),747 formatErrorInfo( res));726 .arg(CConsole(console).GetMachine().GetName()), 727 formatErrorInfo(console)); 748 728 } 749 729 750 730 void UIMessageCenter::cannotDiscardSavedState(const CConsole &console) const 751 731 { 752 /* Preserve error-info: */ 753 COMResult res(console); 754 /* Show the error: */ 755 error(mainWindowShown(), MessageType_Error, 732 error(0, MessageType_Error, 756 733 tr("Failed to discard the saved state of the virtual machine <b>%1</b>.") 757 .arg( console.GetMachine().GetName()),758 formatErrorInfo( res));734 .arg(CConsole(console).GetMachine().GetName()), 735 formatErrorInfo(console)); 759 736 } 760 737 761 738 void UIMessageCenter::cannotSaveMachineState(const CConsole &console) 762 739 { 763 /* Preserve error-info: */ 764 COMResult res(console); 765 /* Show the error: */ 766 error(mainWindowShown(), MessageType_Error, 740 error(0, MessageType_Error, 767 741 tr("Failed to save the state of the virtual machine <b>%1</b>.") 768 .arg( console.GetMachine().GetName()),769 formatErrorInfo( res));770 } 771 772 void UIMessageCenter::cannotSaveMachineState(const CProgress &progress, const QString &str Name)773 { 774 error( mainWindowShown(), MessageType_Error,742 .arg(CConsole(console).GetMachine().GetName()), 743 formatErrorInfo(console)); 744 } 745 746 void UIMessageCenter::cannotSaveMachineState(const CProgress &progress, const QString &strMachineName) 747 { 748 error(0, MessageType_Error, 775 749 tr("Failed to save the state of the virtual machine <b>%1</b>.") 776 .arg(str Name),777 !progress.isOk() ? formatErrorInfo(progress) : formatErrorInfo(progress.GetErrorInfo()));750 .arg(strMachineName), 751 formatErrorInfo(progress)); 778 752 } 779 753 780 754 void UIMessageCenter::cannotACPIShutdownMachine(const CConsole &console) const 781 755 { 782 /* Preserve error-info: */ 783 COMResult res(console); 784 /* Show the error: */ 785 error(mainWindowShown(), MessageType_Error, 786 tr("Failed to send the ACPI Power Button press event to the " 787 "virtual machine <b>%1</b>.") 788 .arg(console.GetMachine().GetName()), 789 formatErrorInfo(res)); 756 error(0, MessageType_Error, 757 tr("Failed to send the ACPI Power Button press event to the virtual machine <b>%1</b>.") 758 .arg(CConsole(console).GetMachine().GetName()), 759 formatErrorInfo(console)); 790 760 } 791 761 792 762 void UIMessageCenter::cannotPowerDownMachine(const CConsole &console) const 793 763 { 794 /* Preserve error-info: */ 795 COMResult res(console); 796 /* Show the error: */ 797 error(mainWindowShown(), MessageType_Error, 764 error(0, MessageType_Error, 798 765 tr("Failed to stop the virtual machine <b>%1</b>.") 799 .arg( console.GetMachine().GetName()),800 formatErrorInfo( res));801 } 802 803 void UIMessageCenter::cannotPowerDownMachine(const CProgress &progress, const QString &str Name) const804 { 805 error( mainWindowShown(), MessageType_Error,766 .arg(CConsole(console).GetMachine().GetName()), 767 formatErrorInfo(console)); 768 } 769 770 void UIMessageCenter::cannotPowerDownMachine(const CProgress &progress, const QString &strMachineName) const 771 { 772 error(0, MessageType_Error, 806 773 tr("Failed to stop the virtual machine <b>%1</b>.") 807 .arg(strName),808 !progress.isOk() ? formatErrorInfo(progress) : formatErrorInfo(progress.GetErrorInfo()));774 .arg(strMachineName), 775 formatErrorInfo(progress)); 809 776 } 810 777 … … 812 779 { 813 780 return fAlsoCreateNewSnapshot ? 814 messageWithOption( mainWindowShown(), MessageType_Question,781 messageWithOption(0, MessageType_Question, 815 782 tr("<p>You are about to restore snapshot <nobr><b>%1</b></nobr>.</p>" 816 783 "<p>You can create a snapshot of the current state of the virtual machine first by checking the box below; " … … 823 790 0 /* 3rd button */, 824 791 tr("Restore"), tr("Cancel"), QString() /* 3rd button text */) : 825 message( mainWindowShown(), MessageType_Question,792 message(0, MessageType_Question, 826 793 tr("<p>Are you sure you want to restore snapshot <nobr><b>%1</b></nobr>?</p>") 827 794 .arg(strSnapshotName), … … 836 803 bool UIMessageCenter::confirmSnapshotRemoval(const QString &strSnapshotName) const 837 804 { 838 return questionBinary( mainWindowShown(), MessageType_Question,805 return questionBinary(0, MessageType_Question, 839 806 tr("<p>Deleting the snapshot will cause the state information saved in it to be lost, and disk data spread over " 840 807 "several image files that VirtualBox has created together with the snapshot will be merged into one file. " … … 851 818 const QString &strTargetFileSystemFree) const 852 819 { 853 return questionBinary( mainWindowShown(), MessageType_Question,820 return questionBinary(0, MessageType_Question, 854 821 tr("<p>Deleting the snapshot %1 will temporarily need more disk space. In the worst case the size of image %2 will grow by %3, " 855 822 "however on this filesystem there is only %4 free.</p><p>Running out of disk space during the merge operation can result in " … … 874 841 tr("Failed to create a snapshot of the virtual machine <b>%1</b>.") 875 842 .arg(strMachineName), 876 !progress.isOk() ? formatErrorInfo(progress) : formatErrorInfo(progress.GetErrorInfo()));877 } 878 879 void UIMessageCenter::cannotRestoreSnapshot(const CConsole &console, const QString &strSnapshotName, const QString &strMachineName , QWidget *pParent /*= 0*/) const880 { 881 error( pParent, MessageType_Error,843 formatErrorInfo(progress)); 844 } 845 846 void UIMessageCenter::cannotRestoreSnapshot(const CConsole &console, const QString &strSnapshotName, const QString &strMachineName) const 847 { 848 error(0, MessageType_Error, 882 849 tr("Failed to restore the snapshot <b>%1</b> of the virtual machine <b>%2</b>.") 883 850 .arg(strSnapshotName, strMachineName), … … 885 852 } 886 853 887 void UIMessageCenter::cannotRestoreSnapshot(const CProgress &progress, const QString &strSnapshotName, const QString &strMachineName , QWidget *pParent /*= 0*/) const888 { 889 error( pParent, MessageType_Error,854 void UIMessageCenter::cannotRestoreSnapshot(const CProgress &progress, const QString &strSnapshotName, const QString &strMachineName) const 855 { 856 error(0, MessageType_Error, 890 857 tr("Failed to restore the snapshot <b>%1</b> of the virtual machine <b>%2</b>.") 891 858 .arg(strSnapshotName, strMachineName), 892 !progress.isOk() ? formatErrorInfo(progress) : formatErrorInfo(progress.GetErrorInfo()));859 formatErrorInfo(progress)); 893 860 } 894 861 895 862 void UIMessageCenter::cannotRemoveSnapshot(const CConsole &console, const QString &strSnapshotName, const QString &strMachineName) const 896 863 { 897 error( mainWindowShown(), MessageType_Error,864 error(0, MessageType_Error, 898 865 tr("Failed to delete the snapshot <b>%1</b> of the virtual machine <b>%2</b>.") 899 866 .arg(strSnapshotName, strMachineName), … … 903 870 void UIMessageCenter::cannotRemoveSnapshot(const CProgress &progress, const QString &strSnapshotName, const QString &strMachineName) const 904 871 { 905 error( mainWindowShown(), MessageType_Error,872 error(0, MessageType_Error, 906 873 tr("Failed to delete the snapshot <b>%1</b> of the virtual machine <b>%2</b>.") 907 874 .arg(strSnapshotName).arg(strMachineName), 908 !progress.isOk() ? formatErrorInfo(progress) : formatErrorInfo(progress.GetErrorInfo()));875 formatErrorInfo(progress)); 909 876 } 910 877 … … 936 903 error(pParent, MessageType_Error, 937 904 tr("Failed to create the host network interface."), 938 !progress.isOk() ? formatErrorInfo(progress) : formatErrorInfo(progress.GetErrorInfo()));939 } 940 941 void UIMessageCenter::cannotRemoveHostInterface(const CHost &host, const QString &str Name, QWidget *pParent /*= 0*/)905 formatErrorInfo(progress)); 906 } 907 908 void UIMessageCenter::cannotRemoveHostInterface(const CHost &host, const QString &strInterfaceName, QWidget *pParent /*= 0*/) 942 909 { 943 910 error(pParent, MessageType_Error, 944 911 tr("Failed to remove the host network interface <b>%1</b>.") 945 .arg(str Name),912 .arg(strInterfaceName), 946 913 formatErrorInfo(host)); 947 914 } 948 915 949 void UIMessageCenter::cannotRemoveHostInterface(const CProgress &progress, const QString &str Name, QWidget *pParent /*= 0*/)916 void UIMessageCenter::cannotRemoveHostInterface(const CProgress &progress, const QString &strInterfaceName, QWidget *pParent /*= 0*/) 950 917 { 951 918 error(pParent, MessageType_Error, 952 919 tr("Failed to remove the host network interface <b>%1</b>.") 953 .arg(str Name),954 !progress.isOk() ? formatErrorInfo(progress) : formatErrorInfo(progress.GetErrorInfo()));920 .arg(strInterfaceName), 921 formatErrorInfo(progress)); 955 922 } 956 923 … … 977 944 } 978 945 979 void UIMessageCenter::warnAboutUnsupportedUSB2(const QString &strExtPackName, QWidget *pParent )946 void UIMessageCenter::warnAboutUnsupportedUSB2(const QString &strExtPackName, QWidget *pParent /*= 0*/) 980 947 { 981 948 if (warningShown("warnAboutUnsupportedUSB2")) … … 996 963 void UIMessageCenter::warnAboutStateChange(QWidget *pParent /*= 0*/) const 997 964 { 998 /* Do not show this async warning more than one at time: */999 965 if (warningShown("warnAboutStateChange")) 1000 966 return; 1001 967 setWarningShown("warnAboutStateChange", true); 1002 /* Show the error: */ 968 1003 969 alert(pParent, MessageType_Warning, 1004 970 tr("The virtual machine that you are changing has been started. " 1005 971 "Only certain settings can be changed while a machine is running. " 1006 972 "All other changes will be lost if you close this window now.")); 1007 /* Allow to show this async warning: */ 973 1008 974 setWarningShown("warnAboutStateChange", false); 1009 975 } … … 1026 992 .arg(strControllerName), 1027 993 0 /* auto-confirm id */, 1028 tr("Create &new disk", "add attachment routine"), 1029 tr("&Choose existing disk", "add attachment routine")); 994 tr("Create &new disk"), tr("&Choose existing disk")); 1030 995 } 1031 996 … … 1038 1003 .arg(strControllerName), 1039 1004 0 /* auto-confirm id */, 1040 tr("Leave &empty", "add attachment routine"), 1041 tr("&Choose disk", "add attachment routine")); 1005 tr("Leave &empty"), tr("&Choose disk")); 1042 1006 } 1043 1007 … … 1050 1014 .arg(strControllerName), 1051 1015 0 /* auto-confirm id */, 1052 tr("Leave &empty", "add attachment routine"), 1053 tr("&Choose disk", "add attachment routine")); 1016 tr("Leave &empty"), tr("&Choose disk")); 1054 1017 } 1055 1018 … … 1074 1037 { 1075 1038 strMessage = tr("Failed to attach the hard disk (<nobr><b>%1</b></nobr>) to the slot <i>%2</i> of the machine <b>%3</b>.") 1076 .arg(strLocation).arg(gpConverter->toString(storageSlot)).arg(CMachine(machine).GetName());1039 .arg(strLocation).arg(gpConverter->toString(storageSlot)).arg(CMachine(machine).GetName()); 1077 1040 break; 1078 1041 } … … 1080 1043 { 1081 1044 strMessage = tr("Failed to attach the CD/DVD device (<nobr><b>%1</b></nobr>) to the slot <i>%2</i> of the machine <b>%3</b>.") 1082 .arg(strLocation).arg(gpConverter->toString(storageSlot)).arg(CMachine(machine).GetName());1045 .arg(strLocation).arg(gpConverter->toString(storageSlot)).arg(CMachine(machine).GetName()); 1083 1046 break; 1084 1047 } … … 1086 1049 { 1087 1050 strMessage = tr("Failed to attach the floppy device (<nobr><b>%1</b></nobr>) to the slot <i>%2</i> of the machine <b>%3</b>.") 1088 .arg(strLocation).arg(gpConverter->toString(storageSlot)).arg(CMachine(machine).GetName());1051 .arg(strLocation).arg(gpConverter->toString(storageSlot)).arg(CMachine(machine).GetName()); 1089 1052 break; 1090 1053 } … … 1110 1073 } 1111 1074 1112 void UIMessageCenter::cannotCreateSharedFolder(const CMachine &machine, const QString &strMachineName, 1113 const QString &strName, const QString &strPath, 1114 QWidget *pParent /*= 0*/) 1075 void UIMessageCenter::cannotCreateSharedFolder(const CMachine &machine, const QString &strName, const QString &strPath, QWidget *pParent /*= 0*/) 1115 1076 { 1116 1077 error(pParent, MessageType_Error, 1117 1078 tr("Failed to create the shared folder <b>%1</b> (pointing to " 1118 1079 "<nobr><b>%2</b></nobr>) for the virtual machine <b>%3</b>.") 1119 .arg(strName, strPath, strMachineName),1080 .arg(strName, strPath, CMachine(machine).GetName()), 1120 1081 formatErrorInfo(machine)); 1121 1082 } 1122 1083 1123 void UIMessageCenter::cannotCreateSharedFolder(const CConsole &console, const QString &strMachineName, 1124 const QString &strName, const QString &strPath, 1125 QWidget *pParent /*= 0*/) 1084 void UIMessageCenter::cannotCreateSharedFolder(const CConsole &console, const QString &strName, const QString &strPath, QWidget *pParent /*= 0*/) 1126 1085 { 1127 1086 error(pParent, MessageType_Error, 1128 1087 tr("Failed to create the shared folder <b>%1</b> (pointing to " 1129 1088 "<nobr><b>%2</b></nobr>) for the virtual machine <b>%3</b>.") 1130 .arg(strName, strPath, strMachineName),1089 .arg(strName, strPath, CConsole(console).GetMachine().GetName()), 1131 1090 formatErrorInfo(console)); 1132 1091 } 1133 1092 1134 void UIMessageCenter::cannotRemoveSharedFolder(const CMachine &machine, const QString &strMachineName, 1135 const QString &strName, const QString &strPath, 1136 QWidget *pParent /*= 0*/) 1093 void UIMessageCenter::cannotRemoveSharedFolder(const CMachine &machine, const QString &strName, const QString &strPath, QWidget *pParent /*= 0*/) 1137 1094 { 1138 1095 error(pParent, MessageType_Error, … … 1141 1098 "<p>Please close all programs in the guest OS that " 1142 1099 "may be using this shared folder and try again.</p>") 1143 .arg(strName, strPath, strMachineName),1100 .arg(strName, strPath, CMachine(machine).GetName()), 1144 1101 formatErrorInfo(machine)); 1145 1102 } 1146 1103 1147 void UIMessageCenter::cannotRemoveSharedFolder(const CConsole &console, const QString &strMachineName, 1148 const QString &strName, const QString &strPath, 1149 QWidget *pParent /*= 0*/) 1104 void UIMessageCenter::cannotRemoveSharedFolder(const CConsole &console, const QString &strName, const QString &strPath, QWidget *pParent /*= 0*/) 1150 1105 { 1151 1106 error(pParent, MessageType_Error, … … 1154 1109 "<p>Please close all programs in the guest OS that " 1155 1110 "may be using this shared folder and try again.</p>") 1156 .arg(strName, strPath, strMachineName),1111 .arg(strName, strPath, CConsole(console).GetMachine().GetName()), 1157 1112 formatErrorInfo(console)); 1158 1113 } … … 1160 1115 void UIMessageCenter::cannotSaveMachineSettings(const CMachine &machine, QWidget *pParent /*= 0*/) const 1161 1116 { 1162 /* Preserve error-info: */1163 COMResult res(machine);1164 /* Show the error: */1165 1117 error(pParent, MessageType_Error, 1166 1118 tr("Failed to save the settings of the virtual machine <b>%1</b> to <b><nobr>%2</nobr></b>.") 1167 .arg(machine.GetName(), machine.GetSettingsFilePath()), 1168 formatErrorInfo(res)); 1169 } 1170 1171 void UIMessageCenter::cannotChangeMediumType(const CMedium &medium, KMediumType oldMediumType, KMediumType newMediumType, 1172 QWidget *pParent /*= 0*/) const 1119 .arg(machine.GetName(), CMachine(machine).GetSettingsFilePath()), 1120 formatErrorInfo(machine)); 1121 } 1122 1123 void UIMessageCenter::cannotChangeMediumType(const CMedium &medium, KMediumType oldMediumType, KMediumType newMediumType, QWidget *pParent /*= 0*/) const 1173 1124 { 1174 1125 error(pParent, MessageType_Error, … … 1208 1159 return questionBinary(pParent, MessageType_Question, 1209 1160 strMessage.arg(medium.location(), strUsage), 1210 0 /* auto-confirm id */, tr("Release", "detach medium")); 1161 0 /* auto-confirm id */, 1162 tr("Release", "detach medium")); 1211 1163 } 1212 1164 … … 1258 1210 return questionBinary(pParent, MessageType_Question, 1259 1211 strMessage.arg(medium.location()), 1260 "confirmMediumRemoval" /* auto-confirm id */, tr("Remove", "medium")); 1212 "confirmMediumRemoval" /* auto-confirm id */, 1213 tr("Remove", "medium")); 1261 1214 } 1262 1215 … … 1292 1245 tr("Failed to delete the storage unit of the hard disk <b>%1</b>.") 1293 1246 .arg(strLocation), 1294 !progress.isOk() ? formatErrorInfo(progress) : formatErrorInfo(progress.GetErrorInfo()));1247 formatErrorInfo(progress)); 1295 1248 } 1296 1249 1297 1250 void UIMessageCenter::cannotDetachDevice(const CMachine &machine, UIMediumType type, const QString &strLocation, const StorageSlot &storageSlot, QWidget *pParent /*= 0*/) const 1298 1251 { 1299 /* Preserve error-info: */1300 QString strErrorInfo = formatErrorInfo(machine);1301 1252 /* Prepare the message: */ 1302 1253 QString strMessage; … … 1306 1257 { 1307 1258 strMessage = tr("Failed to detach the hard disk (<nobr><b>%1</b></nobr>) from the slot <i>%2</i> of the machine <b>%3</b>.") 1308 .arg(strLocation ).arg(gpConverter->toString(storageSlot)).arg(machine.GetName());1259 .arg(strLocation, gpConverter->toString(storageSlot), CMachine(machine).GetName()); 1309 1260 break; 1310 1261 } … … 1312 1263 { 1313 1264 strMessage = tr("Failed to detach the CD/DVD device (<nobr><b>%1</b></nobr>) from the slot <i>%2</i> of the machine <b>%3</b>.") 1314 .arg(strLocation ).arg(gpConverter->toString(storageSlot)).arg(machine.GetName());1265 .arg(strLocation, gpConverter->toString(storageSlot), CMachine(machine).GetName()); 1315 1266 break; 1316 1267 } … … 1318 1269 { 1319 1270 strMessage = tr("Failed to detach the floppy device (<nobr><b>%1</b></nobr>) from the slot <i>%2</i> of the machine <b>%3</b>.") 1320 .arg(strLocation ).arg(gpConverter->toString(storageSlot)).arg(machine.GetName());1271 .arg(strLocation, gpConverter->toString(storageSlot), CMachine(machine).GetName()); 1321 1272 break; 1322 1273 } … … 1325 1276 } 1326 1277 /* Show the error: */ 1327 error(pParent, MessageType_Error, 1328 strMessage, strErrorInfo); 1278 error(pParent, MessageType_Error, strMessage, formatErrorInfo(machine)); 1329 1279 } 1330 1280 1331 1281 bool UIMessageCenter::cannotRemountMedium(const CMachine &machine, const UIMedium &medium, bool fMount, bool fRetry, QWidget *pParent /*= 0*/) const 1332 1282 { 1333 /* Preserve error-info: */1334 QString strErrorInfo = formatErrorInfo(machine);1335 1283 /* Compose the message: */ 1336 1284 QString strMessage; … … 1375 1323 if (fRetry) 1376 1324 return errorWithQuestion(pParent, MessageType_Question, 1377 strMessage.arg(medium.isHostDrive() ? medium.name() : medium.location() ).arg(machine.GetName()),1378 strErrorInfo,1325 strMessage.arg(medium.isHostDrive() ? medium.name() : medium.location(), CMachine(machine).GetName()), 1326 formatErrorInfo(machine), 1379 1327 0 /* Auto Confirm ID */, 1380 1328 tr("Force Unmount")); 1381 1329 error(pParent, MessageType_Error, 1382 strMessage.arg(medium.isHostDrive() ? medium.name() : medium.location() ).arg(machine.GetName()),1383 strErrorInfo);1330 strMessage.arg(medium.isHostDrive() ? medium.name() : medium.location(), CMachine(machine).GetName()), 1331 formatErrorInfo(machine)); 1384 1332 return false; 1385 1333 } … … 1472 1420 void UIMessageCenter::cannotCreateClone(const CMachine &machine, QWidget *pParent /*= 0*/) const 1473 1421 { 1474 /* Preserve error-info: */1475 QString strErrorInfo = formatErrorInfo(machine);1476 /* Show the error: */1477 1422 error(pParent, MessageType_Error, 1478 1423 tr("Failed to clone the virtual machine <b>%1</b>.") 1479 .arg( machine.GetName()),1480 strErrorInfo);1424 .arg(CMachine(machine).GetName()), 1425 formatErrorInfo(machine)); 1481 1426 } 1482 1427 … … 1486 1431 tr("Failed to clone the virtual machine <b>%1</b>.") 1487 1432 .arg(strMachineName), 1488 !progress.isOk() ? formatErrorInfo(progress) : formatErrorInfo(progress.GetErrorInfo()));1433 formatErrorInfo(progress)); 1489 1434 } 1490 1435 … … 1520 1465 tr("Failed to create the hard disk storage <nobr><b>%1</b>.</nobr>") 1521 1466 .arg(strLocation), 1522 !progress.isOk() ? formatErrorInfo(progress) : formatErrorInfo(progress.GetErrorInfo()));1467 formatErrorInfo(progress)); 1523 1468 } 1524 1469 1525 1470 void UIMessageCenter::cannotRemoveMachineFolder(const QString &strFolderName, QWidget *pParent /*= 0*/) const 1526 1471 { 1527 QFileInfo fi(strFolderName);1528 1472 alert(pParent, MessageType_Critical, 1529 1473 tr("<p>Cannot remove the machine folder <nobr><b>%1</b>.</nobr></p>" 1530 1474 "<p>Please check that this folder really exists and that you have permissions to remove it.</p>") 1531 .arg( fi.fileName()));1475 .arg(QFileInfo(strFolderName).fileName())); 1532 1476 } 1533 1477 … … 1572 1516 tr("Failed to import appliance <b>%1</b>.") 1573 1517 .arg(strPath), 1574 !progress.isOk() ? formatErrorInfo(progress) : formatErrorInfo(progress.GetErrorInfo()));1518 formatErrorInfo(progress)); 1575 1519 } 1576 1520 … … 1579 1523 error(pParent, MessageType_Error, 1580 1524 tr("Failed to check files."), 1581 !progress.isOk() ? formatErrorInfo(progress) : formatErrorInfo(progress.GetErrorInfo()));1525 formatErrorInfo(progress)); 1582 1526 } 1583 1527 … … 1586 1530 error(pParent, MessageType_Error, 1587 1531 tr("Failed to remove file."), 1588 !progress.isOk() ? formatErrorInfo(progress) : formatErrorInfo(progress.GetErrorInfo()));1532 formatErrorInfo(progress)); 1589 1533 } 1590 1534 … … 1605 1549 void UIMessageCenter::cannotExportAppliance(const CAppliance &appliance, QWidget *pParent /*= 0*/) const 1606 1550 { 1607 /* Preserve error-info: */1608 QString strErrorInfo = formatErrorInfo(appliance);1609 /* Show the error: */1610 1551 error(pParent, MessageType_Error, 1611 1552 tr("Failed to prepare the export of the appliance <b>%1</b>.") 1612 .arg( appliance.GetPath()),1613 strErrorInfo);1553 .arg(CAppliance(appliance).GetPath()), 1554 formatErrorInfo(appliance)); 1614 1555 } 1615 1556 … … 1627 1568 tr("Failed to export appliance <b>%1</b>.") 1628 1569 .arg(strPath), 1629 !progress.isOk() ? formatErrorInfo(progress) : formatErrorInfo(progress.GetErrorInfo()));1570 formatErrorInfo(progress)); 1630 1571 } 1631 1572 … … 1699 1640 if (type == MessageType_Critical) 1700 1641 { 1701 error( mainWindowShown(), type,1642 error(0, type, 1702 1643 tr("<p>A fatal error has occurred during virtual machine execution! " 1703 1644 "The virtual machine will be powered off. Please copy the following error message " … … 1707 1648 else if (type == MessageType_Error) 1708 1649 { 1709 error( mainWindowShown(), type,1650 error(0, type, 1710 1651 tr("<p>An error has occurred during virtual machine execution! " 1711 1652 "The error details are shown below. You may try to correct the error " … … 1715 1656 else 1716 1657 { 1717 error( mainWindowShown(), type,1658 error(0, type, 1718 1659 tr("<p>The virtual machine execution may run into an error condition as described below. " 1719 1660 "We suggest that you take an appropriate action to avert the error.</p>"), … … 1732 1673 bool UIMessageCenter::remindAboutGuruMeditation(const QString &strLogFolder) 1733 1674 { 1734 return questionBinary( mainWindowShown(), MessageType_GuruMeditation,1675 return questionBinary(0, MessageType_GuruMeditation, 1735 1676 tr("<p>A critical error has occurred while running the virtual " 1736 1677 "machine and the machine execution has been stopped.</p>" … … 1759 1700 { 1760 1701 if (fHWVirtExSupported) 1761 return questionBinary( mainWindowShown(), MessageType_Error,1702 return questionBinary(0, MessageType_Error, 1762 1703 tr("<p>VT-x/AMD-V hardware acceleration has been enabled, but is " 1763 1704 "not operational. Your 64-bit guest will fail to detect a " … … 1768 1709 tr("Close VM"), tr("Continue")); 1769 1710 else 1770 return questionBinary( mainWindowShown(), MessageType_Error,1711 return questionBinary(0, MessageType_Error, 1771 1712 tr("<p>VT-x/AMD-V hardware acceleration is not available on your system. " 1772 1713 "Your 64-bit guest will fail to detect a 64-bit CPU and will " … … 1779 1720 { 1780 1721 if (fHWVirtExSupported) 1781 return questionBinary( mainWindowShown(), MessageType_Error,1722 return questionBinary(0, MessageType_Error, 1782 1723 tr("<p>VT-x/AMD-V hardware acceleration has been enabled, but is not operational. " 1783 1724 "Certain guests (e.g. OS/2 and QNX) require this feature.</p>" … … 1786 1727 tr("Close VM"), tr("Continue")); 1787 1728 else 1788 return questionBinary( mainWindowShown(), MessageType_Error,1729 return questionBinary(0, MessageType_Error, 1789 1730 tr("<p>VT-x/AMD-V hardware acceleration is not available on your system. " 1790 1731 "Certain guests (e.g. OS/2 and QNX) require this feature and will fail to boot without it.</p>"), … … 1795 1736 bool UIMessageCenter::cannotStartWithoutNetworkIf(const QString &strMachineName, const QString &strIfNames) const 1796 1737 { 1797 return questionBinary( mainWindowShown(), MessageType_Error,1738 return questionBinary(0, MessageType_Error, 1798 1739 tr("<p>Could not start the machine <b>%1</b> because the following " 1799 1740 "physical network interfaces were not found:</p><p><b>%2</b></p>" … … 1806 1747 void UIMessageCenter::cannotStartMachine(const CConsole &console, const QString &strName) const 1807 1748 { 1808 error( mainWindowShown(), MessageType_Error,1749 error(0, MessageType_Error, 1809 1750 tr("Failed to start the virtual machine <b>%1</b>.") 1810 1751 .arg(strName), … … 1814 1755 void UIMessageCenter::cannotStartMachine(const CProgress &progress, const QString &strName) const 1815 1756 { 1816 error( mainWindowShown(), MessageType_Error,1757 error(0, MessageType_Error, 1817 1758 tr("Failed to start the virtual machine <b>%1</b>.") 1818 1759 .arg(strName), 1819 !progress.isOk() ? formatErrorInfo(progress) : formatErrorInfo(progress.GetErrorInfo()));1760 formatErrorInfo(progress)); 1820 1761 } 1821 1762 1822 1763 void UIMessageCenter::cannotSendACPIToMachine() const 1823 1764 { 1824 alert( mainWindowShown(), MessageType_Warning,1765 alert(0, MessageType_Warning, 1825 1766 tr("You are trying to shut down the guest with the ACPI power button. " 1826 1767 "This is currently not possible because the guest does not support software shutdown.")); … … 1829 1770 bool UIMessageCenter::confirmInputCapture(bool &fAutoConfirmed) const 1830 1771 { 1831 int rc = question( mainWindowShown(), MessageType_Info,1772 int rc = question(0, MessageType_Info, 1832 1773 tr("<p>You have <b>clicked the mouse</b> inside the Virtual Machine display or pressed the <b>host key</b>. " 1833 1774 "This will cause the Virtual Machine to <b>capture</b> the host mouse pointer (only if the mouse pointer " … … 1854 1795 void UIMessageCenter::remindAboutAutoCapture() const 1855 1796 { 1856 alert( mainWindowShown(), MessageType_Info,1797 alert(0, MessageType_Info, 1857 1798 tr("<p>You have the <b>Auto capture keyboard</b> option turned on. " 1858 1799 "This will cause the Virtual Machine to automatically <b>capture</b> " … … 1876 1817 void UIMessageCenter::remindAboutMouseIntegration(bool fSupportsAbsolute) const 1877 1818 { 1878 /* Do not show this async warning more than one at time: */1879 1819 if (warningShown("remindAboutMouseIntegration")) 1880 1820 return; … … 1889 1829 if (fSupportsAbsolute) 1890 1830 { 1891 alert( mainWindowShown(), MessageType_Info,1831 alert(0, MessageType_Info, 1892 1832 tr("<p>The Virtual Machine reports that the guest OS supports <b>mouse pointer integration</b>. " 1893 1833 "This means that you do not need to <i>capture</i> the mouse pointer to be able to use it in your guest OS -- " … … 1903 1843 else 1904 1844 { 1905 alert( mainWindowShown(), MessageType_Info,1845 alert(0, MessageType_Info, 1906 1846 tr("<p>The Virtual Machine reports that the guest OS does not support <b>mouse pointer integration</b> " 1907 1847 "in the current video mode. You need to capture the mouse (by clicking over the VM display " … … 1910 1850 } 1911 1851 1912 /* Allow to show this async warning: */1913 1852 setWarningShown("remindAboutMouseIntegration", false); 1914 1853 } … … 1916 1855 void UIMessageCenter::remindAboutPausedVMInput() const 1917 1856 { 1918 alert( mainWindowShown(), MessageType_Info,1857 alert(0, MessageType_Info, 1919 1858 tr("<p>The Virtual Machine is currently in the <b>Paused</b> state and " 1920 1859 "not able to see any keyboard or mouse input. If you want to " … … 1926 1865 bool UIMessageCenter::confirmGoingFullscreen(const QString &strHotKey) const 1927 1866 { 1928 return questionBinary( mainWindowShown(), MessageType_Info,1867 return questionBinary(0, MessageType_Info, 1929 1868 tr("<p>The virtual machine window will be now switched to <b>fullscreen</b> mode. " 1930 1869 "You can go back to windowed mode at any time by pressing <b>%1</b>.</p>" … … 1939 1878 bool UIMessageCenter::confirmGoingSeamless(const QString &strHotKey) const 1940 1879 { 1941 return questionBinary( mainWindowShown(), MessageType_Info,1880 return questionBinary(0, MessageType_Info, 1942 1881 tr("<p>The virtual machine window will be now switched to <b>Seamless</b> mode. " 1943 1882 "You can go back to windowed mode at any time by pressing <b>%1</b>.</p>" … … 1952 1891 bool UIMessageCenter::confirmGoingScale(const QString &strHotKey) const 1953 1892 { 1954 return questionBinary( mainWindowShown(), MessageType_Info,1893 return questionBinary(0, MessageType_Info, 1955 1894 tr("<p>The virtual machine window will be now switched to <b>Scale</b> mode. " 1956 1895 "You can go back to windowed mode at any time by pressing <b>%1</b>.</p>" … … 1965 1904 bool UIMessageCenter::cannotEnterFullscreenMode(ULONG /* uWidth */, ULONG /* uHeight */, ULONG /* uBpp */, ULONG64 uMinVRAM) const 1966 1905 { 1967 return questionBinary( mainWindowShown(), MessageType_Warning,1906 return questionBinary(0, MessageType_Warning, 1968 1907 tr("<p>Could not switch the guest display to fullscreen mode due to insufficient guest video memory.</p>" 1969 1908 "<p>You should configure the virtual machine to have at least <b>%1</b> of video memory.</p>" … … 1976 1915 void UIMessageCenter::cannotEnterSeamlessMode(ULONG /* uWidth */, ULONG /* uHeight */, ULONG /* uBpp */, ULONG64 uMinVRAM) const 1977 1916 { 1978 alert( mainWindowShown(), MessageType_Error,1917 alert(0, MessageType_Error, 1979 1918 tr("<p>Could not enter seamless mode due to insufficient guest " 1980 1919 "video memory.</p>" … … 1986 1925 bool UIMessageCenter::cannotSwitchScreenInFullscreen(quint64 uMinVRAM) const 1987 1926 { 1988 return questionBinary( mainWindowShown(), MessageType_Warning,1927 return questionBinary(0, MessageType_Warning, 1989 1928 tr("<p>Could not change the guest screen to this host screen due to insufficient guest video memory.</p>" 1990 1929 "<p>You should configure the virtual machine to have at least <b>%1</b> of video memory.</p>" … … 1997 1936 void UIMessageCenter::cannotSwitchScreenInSeamless(quint64 uMinVRAM) const 1998 1937 { 1999 alert( mainWindowShown(), MessageType_Error,1938 alert(0, MessageType_Error, 2000 1939 tr("<p>Could not change the guest screen to this host screen " 2001 1940 "due to insufficient guest video memory.</p>" … … 2007 1946 void UIMessageCenter::cannotAttachUSBDevice(const CConsole &console, const QString &strDevice) const 2008 1947 { 2009 /* Preserve error-info: */ 2010 QString strErrorInfo = formatErrorInfo(console); 2011 /* Show the error: */ 2012 error(mainWindowShown(), MessageType_Error, 1948 error(0, MessageType_Error, 2013 1949 tr("Failed to attach the USB device <b>%1</b> to the virtual machine <b>%2</b>.") 2014 .arg(strDevice, console.GetMachine().GetName()),2015 strErrorInfo);1950 .arg(strDevice, CConsole(console).GetMachine().GetName()), 1951 formatErrorInfo(console)); 2016 1952 } 2017 1953 2018 1954 void UIMessageCenter::cannotAttachUSBDevice(const CVirtualBoxErrorInfo &errorInfo, const QString &strDevice, const QString &strMachineName) const 2019 1955 { 2020 error( mainWindowShown(), MessageType_Error,1956 error(0, MessageType_Error, 2021 1957 tr("Failed to attach the USB device <b>%1</b> to the virtual machine <b>%2</b>.") 2022 1958 .arg(strDevice, strMachineName), … … 2026 1962 void UIMessageCenter::cannotDetachUSBDevice(const CConsole &console, const QString &strDevice) const 2027 1963 { 2028 /* Preserve error-info: */ 2029 QString strErrorInfo = formatErrorInfo(console); 2030 /* Show the error: */ 2031 error(mainWindowShown(), MessageType_Error, 1964 error(0, MessageType_Error, 2032 1965 tr("Failed to detach the USB device <b>%1</b> from the virtual machine <b>%2</b>.") 2033 .arg(strDevice, console.GetMachine().GetName()),2034 strErrorInfo);1966 .arg(strDevice, CConsole(console).GetMachine().GetName()), 1967 formatErrorInfo(console)); 2035 1968 } 2036 1969 2037 1970 void UIMessageCenter::cannotDetachUSBDevice(const CVirtualBoxErrorInfo &errorInfo, const QString &strDevice, const QString &strMachineName) const 2038 1971 { 2039 error( mainWindowShown(), MessageType_Error,1972 error(0, MessageType_Error, 2040 1973 tr("Failed to detach the USB device <b>%1</b> from the virtual machine <b>%2</b>.") 2041 1974 .arg(strDevice, strMachineName), … … 2043 1976 } 2044 1977 2045 void UIMessageCenter::remindAboutGuestAdditionsAreNotActive( QWidget *pParent /*= 0*/) const2046 { 2047 alert( pParent, MessageType_Warning,1978 void UIMessageCenter::remindAboutGuestAdditionsAreNotActive() const 1979 { 1980 alert(0, MessageType_Warning, 2048 1981 tr("<p>The VirtualBox Guest Additions do not appear to be available on this virtual machine, " 2049 1982 "and shared folders cannot be used without them. To use shared folders inside the virtual machine, " … … 2078 2011 void UIMessageCenter::askUserToDownloadExtensionPack(const QString &strExtPackName, const QString &strExtPackVersion, const QString &strVBoxVersion) const 2079 2012 { 2080 alert( mainWindowShown(), MessageType_Info,2013 alert(networkManagerOrMainWindowShown(), MessageType_Info, 2081 2014 tr("<p>You have version %1 of the <b><nobr>%2</nobr></b> installed.</p>" 2082 2015 "<p>You should download and install version %3 of this extension pack from Oracle!</p>") 2083 .arg(strExtPackVersion).arg(strExtPackName).arg(strVBoxVersion), 2084 0 /* auto-confirm id */); 2016 .arg(strExtPackVersion).arg(strExtPackName).arg(strVBoxVersion)); 2085 2017 } 2086 2018 2087 2019 bool UIMessageCenter::cannotFindGuestAdditions() const 2088 2020 { 2089 return questionBinary( mainWindowShown(), MessageType_Question,2021 return questionBinary(0, MessageType_Question, 2090 2022 tr("<p>Could not find the <b>VirtualBox Guest Additions</b> CD image.</p>" 2091 2023 "<p>Do you wish to download this CD image from the Internet?</p>"), … … 2096 2028 bool UIMessageCenter::confirmDownloadGuestAdditions(const QString &strUrl, qulonglong uSize) const 2097 2029 { 2098 QLocale loc(VBoxGlobal::languageId());2099 2030 return questionBinary(networkManagerOrMainWindowShown(), MessageType_Question, 2100 2031 tr("<p>Are you sure you want to download the <b>VirtualBox Guest Additions</b> CD image " 2101 2032 "from <nobr><a href=\"%1\">%1</a></nobr> (size %2 bytes)?</p>") 2102 .arg(strUrl, loc.toString(uSize)),2033 .arg(strUrl, QLocale(VBoxGlobal::languageId()).toString(uSize)), 2103 2034 0 /* auto-confirm id */, 2104 2035 tr("Download")); … … 2129 2060 void UIMessageCenter::cannotMountGuestAdditions(const QString &strMachineName) const 2130 2061 { 2131 alert( mainWindowShown(), MessageType_Error,2062 alert(0, MessageType_Error, 2132 2063 tr("<p>Could not insert the <b>VirtualBox Guest Additions</b> CD image into the virtual machine <b>%1</b>, " 2133 2064 "as the machine has no CD/DVD-ROM drives. Please add a drive using the storage page of the " … … 2138 2069 void UIMessageCenter::cannotUpdateGuestAdditions(const CProgress &progress) const 2139 2070 { 2140 error( mainWindowShown(), MessageType_Error,2071 error(0, MessageType_Error, 2141 2072 tr("Failed to update Guest Additions. " 2142 2073 "The Guest Additions installation image will be mounted to provide a manual installation."), 2143 !progress.isOk() ? formatErrorInfo(progress) : formatErrorInfo(progress.GetErrorInfo()));2074 formatErrorInfo(progress)); 2144 2075 } 2145 2076 2146 2077 bool UIMessageCenter::cannotFindUserManual(const QString &strMissedLocation) const 2147 2078 { 2148 return questionBinary( mainWindowShown(), MessageType_Question,2079 return questionBinary(0, MessageType_Question, 2149 2080 tr("<p>Could not find the <b>VirtualBox User Manual</b> <nobr><b>%1</b>.</nobr></p>" 2150 2081 "<p>Do you wish to download this file from the Internet?</p>") … … 2156 2087 bool UIMessageCenter::confirmDownloadUserManual(const QString &strURL, qulonglong uSize) const 2157 2088 { 2158 QLocale loc(VBoxGlobal::languageId());2159 2089 return questionBinary(networkManagerOrMainWindowShown(), MessageType_Question, 2160 2090 tr("<p>Are you sure you want to download the <b>VirtualBox User Manual</b> " 2161 2091 "from <nobr><a href=\"%1\">%1</a></nobr> (size %2 bytes)?</p>") 2162 .arg(strURL, loc.toString(uSize)),2092 .arg(strURL, QLocale(VBoxGlobal::languageId()).toString(uSize)), 2163 2093 0 /* auto-confirm id */, 2164 2094 tr("Download")); … … 2186 2116 bool UIMessageCenter::warAboutOutdatedExtensionPack(const QString &strExtPackName, const QString &strExtPackVersion) const 2187 2117 { 2188 return questionBinary(mainWindowShown(), 2189 MessageType_Question, 2118 return questionBinary(networkManagerOrMainWindowShown(), MessageType_Question, 2190 2119 tr("<p>You have an old version (%1) of the <b><nobr>%2</nobr></b> installed.</p>" 2191 2120 "<p>Do you wish to download latest one from the Internet?</p>") … … 2197 2126 bool UIMessageCenter::confirmDownloadExtensionPack(const QString &strExtPackName, const QString &strURL, qulonglong uSize) const 2198 2127 { 2199 QLocale loc(VBoxGlobal::languageId());2200 2128 return questionBinary(networkManagerOrMainWindowShown(), MessageType_Question, 2201 2129 tr("<p>Are you sure you want to download the <b><nobr>%1</nobr></b> " 2202 2130 "from <nobr><a href=\"%2\">%2</a></nobr> (size %3 bytes)?</p>") 2203 .arg(strExtPackName, strURL, loc.toString(uSize)),2131 .arg(strExtPackName, strURL, QLocale(VBoxGlobal::languageId()).toString(uSize)), 2204 2132 0 /* auto-confirm id */, 2205 2133 tr("Download")); … … 2242 2170 "</table></p>") 2243 2171 .arg(strPackName).arg(strPackVersion).arg(strPackDescription), 2244 0 ,2172 0 /* auto-confirm id */, 2245 2173 tr("Install", "extension pack")); 2246 2174 } … … 2274 2202 "</table></p>") 2275 2203 .arg(strBelehrung).arg(strPackName).arg(strPackVersionNew).arg(strPackVersionOld).arg(strPackDescription), 2276 0 ,2204 0 /* auto-confirm id */, 2277 2205 tr("&Upgrade")); 2278 2206 else if (iVerCmp < 0) … … 2287 2215 "</table></p>") 2288 2216 .arg(strBelehrung).arg(strPackName).arg(strPackVersionNew).arg(strPackVersionOld).arg(strPackDescription), 2289 0 ,2217 0 /* auto-confirm id */, 2290 2218 tr("&Downgrade")); 2291 2219 else … … 2299 2227 "</table></p>") 2300 2228 .arg(strBelehrung).arg(strPackName).arg(strPackVersionOld).arg(strPackDescription), 2301 0 ,2229 0 /* auto-confirm id */, 2302 2230 tr("&Reinstall")); 2303 2231 return fRc; … … 2310 2238 "<p>Are you sure you want to proceed?</p>") 2311 2239 .arg(strPackName), 2312 0 ,2240 0 /* auto-confirm id */, 2313 2241 tr("&Remove")); 2314 2242 } … … 2341 2269 tr("Failed to install the Extension Pack <b>%1</b>.") 2342 2270 .arg(strFilename), 2343 !progress.isOk() ? formatErrorInfo(progress) : formatErrorInfo(progress.GetErrorInfo()));2271 formatErrorInfo(progress)); 2344 2272 } 2345 2273 … … 2357 2285 tr("Failed to uninstall the Extension Pack <b>%1</b>.") 2358 2286 .arg(strPackName), 2359 !progress.isOk() ? formatErrorInfo(progress) : formatErrorInfo(progress.GetErrorInfo()));2287 formatErrorInfo(progress)); 2360 2288 } 2361 2289 … … 2379 2307 error(pParent, MessageType_Error, 2380 2308 tr("Failed to drop data."), 2381 !progress.isOk() ? formatErrorInfo(progress) : formatErrorInfo(progress.GetErrorInfo()));2309 formatErrorInfo(progress)); 2382 2310 } 2383 2311 #endif /* VBOX_WITH_DRAG_AND_DROP */ … … 2479 2407 2480 2408 return str; 2409 } 2410 2411 /* static */ 2412 QString UIMessageCenter::formatErrorInfo(const CProgress &progress) 2413 { 2414 return !progress.isOk() ? formatErrorInfo(static_cast<COMBaseWithEI>(progress)) : formatErrorInfo(progress.GetErrorInfo()); 2481 2415 } 2482 2416 -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
r45371 r45424 186 186 void cannotOpenMachine(const CVirtualBox &vbox, const QString &strMachinePath) const; 187 187 void cannotReregisterExistingMachine(const QString &strMachinePath, const QString &strMachineName) const; 188 void cannotResolveCollisionAutomatically(const QString &str Name, const QString &strGroupName) const;188 void cannotResolveCollisionAutomatically(const QString &strCollisionName, const QString &strGroupName) const; 189 189 bool confirmAutomaticCollisionResolve(const QString &strName, const QString &strGroupName) const; 190 190 void cannotSetGroups(const CMachine &machine) const; … … 202 202 void cannotDiscardSavedState(const CConsole &console) const; 203 203 void cannotSaveMachineState(const CConsole &console); 204 void cannotSaveMachineState(const CProgress &progress, const QString &str Name);204 void cannotSaveMachineState(const CProgress &progress, const QString &strMachineName); 205 205 void cannotACPIShutdownMachine(const CConsole &console) const; 206 206 void cannotPowerDownMachine(const CConsole &console) const; 207 void cannotPowerDownMachine(const CProgress &progress, const QString &str Name) const;207 void cannotPowerDownMachine(const CProgress &progress, const QString &strMachineName) const; 208 208 209 209 /* API: Snapshot warnings: */ … … 214 214 void cannotTakeSnapshot(const CConsole &console, const QString &strMachineName, QWidget *pParent = 0) const; 215 215 void cannotTakeSnapshot(const CProgress &progress, const QString &strMachineName, QWidget *pParent = 0) const; 216 void cannotRestoreSnapshot(const CConsole &console, const QString &strSnapshotName, const QString &strMachineName , QWidget *pParent = 0) const;217 void cannotRestoreSnapshot(const CProgress &progress, const QString &strSnapshotName, const QString &strMachineName , QWidget *pParent = 0) const;216 void cannotRestoreSnapshot(const CConsole &console, const QString &strSnapshotName, const QString &strMachineName) const; 217 void cannotRestoreSnapshot(const CProgress &progress, const QString &strSnapshotName, const QString &strMachineName) const; 218 218 void cannotRemoveSnapshot(const CConsole &console, const QString &strSnapshotName, const QString &strMachineName) const; 219 219 void cannotRemoveSnapshot(const CProgress &progress, const QString &strSnapshotName, const QString &strMachineName) const; … … 223 223 void cannotCreateHostInterface(const CHost &host, QWidget *pParent = 0); 224 224 void cannotCreateHostInterface(const CProgress &progress, QWidget *pParent = 0); 225 void cannotRemoveHostInterface(const CHost &host, const QString &str Name, QWidget *pParent = 0);226 void cannotRemoveHostInterface(const CProgress &progress, const QString &str Name, QWidget *pParent = 0);225 void cannotRemoveHostInterface(const CHost &host, const QString &strInterfaceName, QWidget *pParent = 0); 226 void cannotRemoveHostInterface(const CProgress &progress, const QString &strInterfaceName, QWidget *pParent = 0); 227 227 void cannotSetSystemProperties(const CSystemProperties &properties, QWidget *pParent = 0) const; 228 228 … … 239 239 void warnAboutIncorrectPort(QWidget *pParent = 0) const; 240 240 bool confirmCancelingPortForwardingDialog(QWidget *pParent = 0) const; 241 void cannotCreateSharedFolder(const CMachine &machine, const QString &str MachineName, const QString &strName, const QString &strPath, QWidget *pParent = 0);242 void cannotCreateSharedFolder(const CConsole &console, const QString &str MachineName, const QString &strName, const QString &strPath, QWidget *pParent = 0);243 void cannotRemoveSharedFolder(const CMachine &machine, const QString &str MachineName, const QString &strName, const QString &strPath, QWidget *pParent = 0);244 void cannotRemoveSharedFolder(const CConsole &console, const QString &str MachineName, const QString &strName, const QString &strPath, QWidget *pParent = 0);241 void cannotCreateSharedFolder(const CMachine &machine, const QString &strName, const QString &strPath, QWidget *pParent = 0); 242 void cannotCreateSharedFolder(const CConsole &console, const QString &strName, const QString &strPath, QWidget *pParent = 0); 243 void cannotRemoveSharedFolder(const CMachine &machine, const QString &strName, const QString &strPath, QWidget *pParent = 0); 244 void cannotRemoveSharedFolder(const CConsole &console, const QString &strName, const QString &strPath, QWidget *pParent = 0); 245 245 void cannotSaveMachineSettings(const CMachine &machine, QWidget *pParent = 0) const; 246 246 … … 304 304 void cannotDetachUSBDevice(const CConsole &console, const QString &strDevice) const; 305 305 void cannotDetachUSBDevice(const CVirtualBoxErrorInfo &errorInfo, const QString &strDevice, const QString &strMachineName) const; 306 void remindAboutGuestAdditionsAreNotActive( QWidget *pParent = 0) const;306 void remindAboutGuestAdditionsAreNotActive() const; 307 307 308 308 /* API: Network management warnings: */ … … 356 356 /* API: Static helpers: */ 357 357 static QString formatRC(HRESULT rc); 358 static QString formatErrorInfo(const CProgress &progress); 358 359 static QString formatErrorInfo(const COMErrorInfo &info, HRESULT wrapperRC = S_OK); 359 360 static QString formatErrorInfo(const CVirtualBoxErrorInfo &info); -
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
r45402 r45424 4809 4809 * otherwise we better show the progress... */ 4810 4810 int iSpawningDuration = 60000; 4811 msgCenter().showModalProgressDialog(progress, machine.GetName(), "", msgCenter().mainWindowShown(), iSpawningDuration); 4811 msgCenter().showModalProgressDialog(progress, machine.GetName(), 4812 ":/progress_start_90px.png", 0, iSpawningDuration); 4812 4813 if (!progress.isOk() || progress.GetResultCode() != 0) 4813 4814 msgCenter().cannotOpenSession(progress, machine.GetName()); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r45368 r45424 330 330 { 331 331 /* Show machine power down progress: */ 332 msgCenter().showModalProgressDialog(progress, strMachineName, ":/progress_poweroff_90px.png" , activeMachineWindow());332 msgCenter().showModalProgressDialog(progress, strMachineName, ":/progress_poweroff_90px.png"); 333 333 if (!progress.isOk() || progress.GetResultCode() != 0) 334 334 msgCenter().cannotPowerDownMachine(progress, strMachineName); … … 1034 1034 { 1035 1035 /* Show the take-snapshot progress: */ 1036 msgCenter().showModalProgressDialog(progress, machine.GetName(), ":/progress_snapshot_create_90px.png" , activeMachineWindow());1036 msgCenter().showModalProgressDialog(progress, machine.GetName(), ":/progress_snapshot_create_90px.png"); 1037 1037 if (!progress.isOk() || progress.GetResultCode() != 0) 1038 msgCenter().cannotTakeSnapshot(progress, machine.GetName() , activeMachineWindow());1038 msgCenter().cannotTakeSnapshot(progress, machine.GetName()); 1039 1039 } 1040 1040 else 1041 msgCenter().cannotTakeSnapshot(console, machine.GetName() , activeMachineWindow());1041 msgCenter().cannotTakeSnapshot(console, machine.GetName()); 1042 1042 } 1043 1043 } … … 1226 1226 /* Do not process if additions are not loaded! */ 1227 1227 if (!uisession()->isGuestAdditionsActive()) 1228 msgCenter().remindAboutGuestAdditionsAreNotActive( activeMachineWindow());1228 msgCenter().remindAboutGuestAdditionsAreNotActive(); 1229 1229 1230 1230 /* Open VM settings : Shared folders page: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r45371 r45424 221 221 if (isSaved()) 222 222 { 223 msgCenter().showModalProgressDialog(progress, machine.GetName(), ":/progress_state_restore_90px.png", mainMachineWindow(), 0);223 msgCenter().showModalProgressDialog(progress, machine.GetName(), ":/progress_state_restore_90px.png", 0, 0); 224 224 /* If restoring from saved state, guest MachineView 225 225 should be notified about host MachineWindow geometry change */ … … 227 227 } 228 228 else 229 msgCenter().showModalProgressDialog(progress, machine.GetName(), ":/progress_start_90px.png" , mainMachineWindow());229 msgCenter().showModalProgressDialog(progress, machine.GetName(), ":/progress_start_90px.png"); 230 230 231 231 /* Check for a progress failure: */ … … 280 280 uimachine()->machineLogic()->setPreventAutoClose(true); 281 281 /* Show the power down progress dialog */ 282 msgCenter().showModalProgressDialog(progress, machine.GetName(), ":/progress_poweroff_90px.png" , mainMachineWindow());282 msgCenter().showModalProgressDialog(progress, machine.GetName(), ":/progress_poweroff_90px.png"); 283 283 if (!progress.isOk() || progress.GetResultCode() != 0) 284 284 msgCenter().cannotPowerDownMachine(progress, machine.GetName()); … … 320 320 { 321 321 /* Show the saving progress: */ 322 msgCenter().showModalProgressDialog(progress, machine.GetName(), 323 ":/progress_state_save_90px.png", 324 machineLogic()->activeMachineWindow()); 322 msgCenter().showModalProgressDialog(progress, machine.GetName(), ":/progress_state_save_90px.png"); 325 323 if (!progress.isOk() || progress.GetResultCode() != 0) 326 324 { … … 370 368 { 371 369 /* Show the power-off progress: */ 372 msgCenter().showModalProgressDialog(progress, machine.GetName(), 373 ":/progress_poweroff_90px.png", 374 machineLogic()->activeMachineWindow()); 370 msgCenter().showModalProgressDialog(progress, machine.GetName(), ":/progress_poweroff_90px.png"); 375 371 if (progress.GetResultCode() == 0) 376 372 { … … 384 380 { 385 381 /* Show the snapshot-discard progress: */ 386 msgCenter().showModalProgressDialog(progress, machine.GetName(), 387 ":/progress_snapshot_discard_90px.png", 388 machineLogic()->activeMachineWindow()); 382 msgCenter().showModalProgressDialog(progress, machine.GetName(), ":/progress_snapshot_discard_90px.png"); 389 383 if (progress.GetResultCode() != 0) 390 384 { 391 385 /* Failed in progress: */ 392 msgCenter().cannotRestoreSnapshot(progress, snapshot.GetName(), machine.GetName() , machineLogic()->activeMachineWindow());386 msgCenter().cannotRestoreSnapshot(progress, snapshot.GetName(), machine.GetName()); 393 387 return false; 394 388 } … … 397 391 { 398 392 /* Failed in console: */ 399 msgCenter().cannotRestoreSnapshot(console, snapshot.GetName(), machine.GetName() , machineLogic()->activeMachineWindow());393 msgCenter().cannotRestoreSnapshot(console, snapshot.GetName(), machine.GetName()); 400 394 return false; 401 395 } … … 505 499 if (fResult) 506 500 { 507 msgCenter().showModalProgressDialog(progressInstall, tr("Updating Guest Additions"), ":/progress_install_guest_additions_90px.png", 508 machineLogic()->activeMachineWindow(), 500 /* 500ms delay. */); 501 msgCenter().showModalProgressDialog(progressInstall, tr("Updating Guest Additions"), 502 ":/progress_install_guest_additions_90px.png", 503 0, 500 /* 500ms delay. */); 509 504 if (progressInstall.GetCanceled()) 510 505 return; -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSF.cpp
r45358 r45424 750 750 if (!sharedFolder.isNull()) 751 751 { 752 /* Get machine-name: */753 QString strMachineName(m_machine.GetName());754 752 /* Remove existing shared folder: */ 755 753 switch(sharedFoldersType) … … 763 761 setFailed(true); 764 762 /* Show error message: */ 765 msgCenter().cannotRemoveSharedFolder(m_machine, str MachineName, strName, strPath, this);763 msgCenter().cannotRemoveSharedFolder(m_machine, strName, strPath, this); 766 764 /* Finish early: */ 767 765 return false; … … 777 775 setFailed(true); 778 776 /* Show error message: */ 779 msgCenter().cannotRemoveSharedFolder(m_console, str MachineName, strName, strPath, this);777 msgCenter().cannotRemoveSharedFolder(m_console, strName, strPath, this); 780 778 /* Finish early: */ 781 779 return false; … … 809 807 if (sharedFolder.isNull()) 810 808 { 811 /* Get machine-name: */812 QString strMachineName(m_machine.GetName());813 809 /* Create new shared folder: */ 814 810 switch(sharedFoldersType) … … 822 818 setFailed(true); 823 819 /* Show error message: */ 824 msgCenter().cannotCreateSharedFolder(m_machine, str MachineName, strName, strPath, this);820 msgCenter().cannotCreateSharedFolder(m_machine, strName, strPath, this); 825 821 /* Finish early: */ 826 822 return false; … … 837 833 setFailed(true); 838 834 /* Show error message: */ 839 msgCenter().cannotCreateSharedFolder(m_console, str MachineName, strName, strPath, this);835 msgCenter().cannotCreateSharedFolder(m_console, strName, strPath, this); 840 836 /* Finish early: */ 841 837 return false; -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIApplianceImportEditorWidget.cpp
r45325 r45424 67 67 { 68 68 /* Show some progress, so the user know whats going on */ 69 msgCenter().showModalProgressDialog(progress, tr("Reading Appliance ..."), " ", this);69 msgCenter().showModalProgressDialog(progress, tr("Reading Appliance ..."), ":/shared_folder_32px.png", this); 70 70 if (!progress.isOk() || progress.GetResultCode() != 0) 71 71 fResult = false; -
trunk/src/VBox/Frontends/VirtualBox/src/wizards/exportappliance/UIWizardExportApp.cpp
r45358 r45424 86 86 { 87 87 /* Show some progress, so the user know whats going on: */ 88 msgCenter().showModalProgressDialog(progress, QApplication::translate("UIWizardExportApp", "Checking files ..."), "", this); 88 msgCenter().showModalProgressDialog(progress, QApplication::translate("UIWizardExportApp", "Checking files ..."), 89 ":/refresh_32px.png", this); 89 90 if (progress.GetCanceled()) 90 91 return false; … … 107 108 { 108 109 /* Show some progress, so the user know whats going on: */ 109 msgCenter().showModalProgressDialog(progress1, QApplication::translate("UIWizardExportApp", "Removing files ..."), "", this); 110 msgCenter().showModalProgressDialog(progress1, QApplication::translate("UIWizardExportApp", "Removing files ..."), 111 ":/vm_delete_32px.png", this); 110 112 if (progress1.GetCanceled()) 111 113 return false;
Note:
See TracChangeset
for help on using the changeset viewer.