Changeset 45296 in vbox
- Timestamp:
- Apr 3, 2013 8:41:08 AM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 84697
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.cpp
r45295 r45296 51 51 */ 52 52 QIMessageBox::QIMessageBox (const QString &aCaption, const QString &aText, 53 IconType aIcon, int aButton0, int aButton1, int aButton2,53 AlertIconType aIcon, int aButton0, int aButton1, int aButton2, 54 54 QWidget *aParent, const char *aName, bool aModal) 55 55 : QIDialog (aParent) … … 156 156 /* If this is an error message add an "Copy to clipboard" button for easier 157 157 * bug reports. */ 158 if (aIcon == QIMessageBox::IconType_Critical)159 { 160 QPushButton *pCopyButton = createButton( Copy);158 if (aIcon == AlertIconType_Critical) 159 { 160 QPushButton *pCopyButton = createButton(AlertButton_Copy); 161 161 pCopyButton->setToolTip(tr("Copy all errors to the clipboard")); 162 162 connect(pCopyButton, SIGNAL(clicked()), SLOT(copy())); … … 255 255 QString text; 256 256 QDialogButtonBox::ButtonRole role; 257 switch (aButton & ButtonMask)258 { 259 case Ok: text = tr("OK"); role = QDialogButtonBox::AcceptRole; break;260 case Yes: text = tr("Yes"); role = QDialogButtonBox::YesRole; break;261 case No: text = tr("No"); role = QDialogButtonBox::NoRole; break;262 case Cancel: text = tr("Cancel"); role = QDialogButtonBox::RejectRole; break;263 case Ignore: text = tr("Ignore"); role = QDialogButtonBox::AcceptRole; break;264 case Copy: text = tr("Copy"); role = QDialogButtonBox::ActionRole; break;257 switch (aButton & AlertButtonMask) 258 { 259 case AlertButton_Ok: text = tr("OK"); role = QDialogButtonBox::AcceptRole; break; 260 case AlertButton_Cancel: text = tr("Cancel"); role = QDialogButtonBox::RejectRole; break; 261 case AlertButton_Yes: text = tr("Yes"); role = QDialogButtonBox::YesRole; break; 262 case AlertButton_No: text = tr("No"); role = QDialogButtonBox::NoRole; break; 263 case AlertButton_Ignore: text = tr("Ignore"); role = QDialogButtonBox::AcceptRole; break; 264 case AlertButton_Copy: text = tr("Copy"); role = QDialogButtonBox::ActionRole; break; 265 265 default: 266 266 AssertMsgFailed(("Type %d is not implemented", aButton)); … … 270 270 QPushButton *b = mButtonBox->addButton (text, role); 271 271 272 if (aButton & Default)272 if (aButton & AlertButtonOption_Default) 273 273 { 274 274 b->setDefault (true); … … 276 276 } 277 277 278 if (aButton & Escape)279 mButtonEsc = aButton & ButtonMask;278 if (aButton & AlertButtonOption_Escape) 279 mButtonEsc = aButton & AlertButtonMask; 280 280 281 281 return b; … … 316 316 } 317 317 318 QPixmap QIMessageBox::standardPixmap (QIMessageBox::IconType aIcon)318 QPixmap QIMessageBox::standardPixmap(AlertIconType aIcon) 319 319 { 320 320 QIcon icon; 321 321 switch (aIcon) 322 322 { 323 case QIMessageBox::IconType_Information:323 case AlertIconType_Information: 324 324 icon = UIIconPool::defaultIcon(UIIconPool::MessageBoxInformationIcon, this); 325 325 break; … … 327 327 icon = UIIconPool::defaultIcon(UIIconPool::MessageBoxWarningIcon, this); 328 328 break; 329 case QIMessageBox::IconType_Critical:329 case AlertIconType_Critical: 330 330 icon = UIIconPool::defaultIcon(UIIconPool::MessageBoxCriticalIcon, this); 331 331 break; 332 case QIMessageBox::IconType_Question:332 case AlertIconType_Question: 333 333 icon = UIIconPool::defaultIcon(UIIconPool::MessageBoxQuestionIcon, this); 334 334 break; 335 case QIMessageBox::IconType_GuruMeditation:335 case AlertIconType_GuruMeditation: 336 336 icon = QIcon(":/meditation_32px.png"); 337 337 break; … … 466 466 { 467 467 QDialog::reject(); 468 setResult (mButtonEsc & ButtonMask);468 setResult (mButtonEsc & AlertButtonMask); 469 469 } 470 470 } -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.h
r45295 r45296 37 37 class QILabel; 38 38 39 /* Button type enumerator: */ 40 enum AlertButton 41 { 42 AlertButton_NoButton = 0x0, /* 00000000 00000000 */ 43 AlertButton_Ok = 0x1, /* 00000000 00000001 */ 44 AlertButton_Cancel = 0x2, /* 00000000 00000010 */ 45 AlertButton_Yes = 0x4, /* 00000000 00000100 */ 46 AlertButton_No = 0x8, /* 00000000 00001000 */ 47 AlertButton_Ignore = 0x10, /* 00000000 00010000 */ 48 AlertButton_Copy = 0x20, /* 00000000 00100000 */ 49 AlertButtonMask = 0xFF /* 00000000 11111111 */ 50 }; 51 52 /* Button option enumerator: */ 53 enum AlertButtonOption 54 { 55 AlertButtonOption_Default = 0x100, /* 00000001 00000000 */ 56 AlertButtonOption_Escape = 0x200, /* 00000010 00000000 */ 57 AlertButtonOptionMask = 0x300 /* 00000011 00000000 */ 58 }; 59 60 /* Alert option enumerator: */ 61 enum AlertOption 62 { 63 AlertOption_CheckBox = 0x400, /* 00000100 00000000 */ 64 AlertOptionMask = 0xFC00 /* 11111100 00000000 */ 65 }; 66 67 /* Icon type enumerator: */ 68 enum AlertIconType 69 { 70 AlertIconType_NoIcon = QMessageBox::NoIcon, 71 AlertIconType_Information = QMessageBox::Information, 72 AlertIconType_Warning = QMessageBox::Warning, 73 AlertIconType_Critical = QMessageBox::Critical, 74 AlertIconType_Question = QMessageBox::Question, 75 AlertIconType_GuruMeditation 76 }; 77 39 78 /* QIDialog extension representing GUI alerts: */ 40 79 class QIMessageBox : public QIDialog … … 44 83 public: 45 84 46 /* Icon type enumerator: */ 47 enum IconType 48 { 49 IconType_NoIcon = QMessageBox::NoIcon, 50 IconType_Information = QMessageBox::Information, 51 IconType_Warning = QMessageBox::Warning, 52 IconType_Critical = QMessageBox::Critical, 53 IconType_Question = QMessageBox::Question, 54 IconType_GuruMeditation, 55 }; 56 57 enum 58 { 59 NoButton = 0, Ok = 1, Cancel = 2, Yes = 3, No = 4, Abort = 5, 60 Retry = 6, Ignore = 7, YesAll = 8, NoAll = 9, Copy = 10, 61 ButtonMask = 0xFF, 62 63 Default = 0x100, Escape = 0x200, 64 FlagMask = 0x300, 65 66 OptionChosen = 0x400 67 }; 68 69 QIMessageBox (const QString &aCaption, const QString &aText, 70 IconType aIcon, int aButton0, int aButton1 = 0, int aButton2 = 0, 71 QWidget *aParent = 0, const char *aName = 0, bool aModal = TRUE); 85 QIMessageBox(const QString &aCaption, const QString &aText, 86 AlertIconType aIcon, int aButton0, int aButton1 = 0, int aButton2 = 0, 87 QWidget *aParent = 0, const char *aName = 0, bool aModal = TRUE); 72 88 73 89 QString buttonText (int aButton) const; … … 83 99 void setDetailsText (const QString &aText); 84 100 85 QPixmap standardPixmap (QIMessageBox::IconType aIcon);101 QPixmap standardPixmap(AlertIconType aIcon); 86 102 87 103 private: … … 102 118 void detailsNext(); 103 119 104 void done0() { mWasDone = true; done (mButton0 & ButtonMask); }105 void done1() { mWasDone = true; done (mButton1 & ButtonMask); }106 void done2() { mWasDone = true; done (mButton2 & ButtonMask); }120 void done0() { mWasDone = true; done (mButton0 & AlertButtonMask); } 121 void done1() { mWasDone = true; done (mButton1 & AlertButtonMask); } 122 void done2() { mWasDone = true; done (mButton2 & AlertButtonMask); } 107 123 108 124 void reject(); -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.cpp
r45295 r45296 130 130 /* If no buttons are set, using single 'OK' button: */ 131 131 if (iButton1 == 0 && iButton2 == 0 && iButton3 == 0) 132 iButton1 = QIMessageBox::Ok | QIMessageBox::Default;132 iButton1 = AlertButton_Ok | AlertButtonOption_Default; 133 133 134 134 /* Assign corresponding title and icon: */ 135 135 QString strTitle; 136 QIMessageBox::IconType icon;136 AlertIconType icon; 137 137 switch (type) 138 138 { … … 140 140 case MessageType_Info: 141 141 strTitle = tr("VirtualBox - Information", "msg box title"); 142 icon = QIMessageBox::IconType_Information;142 icon = AlertIconType_Information; 143 143 break; 144 144 case MessageType_Question: 145 145 strTitle = tr("VirtualBox - Question", "msg box title"); 146 icon = QIMessageBox::IconType_Question;146 icon = AlertIconType_Question; 147 147 break; 148 148 case MessageType_Warning: 149 149 strTitle = tr("VirtualBox - Warning", "msg box title"); 150 icon = QIMessageBox::IconType_Warning;150 icon = AlertIconType_Warning; 151 151 break; 152 152 case MessageType_Error: 153 153 strTitle = tr("VirtualBox - Error", "msg box title"); 154 icon = QIMessageBox::IconType_Critical;154 icon = AlertIconType_Critical; 155 155 break; 156 156 case MessageType_Critical: 157 157 strTitle = tr("VirtualBox - Critical Error", "msg box title"); 158 icon = QIMessageBox::IconType_Critical;158 icon = AlertIconType_Critical; 159 159 break; 160 160 case MessageType_GuruMeditation: 161 161 strTitle = "VirtualBox - Guru Meditation"; /* don't translate this */ 162 icon = QIMessageBox::IconType_GuruMeditation;162 icon = AlertIconType_GuruMeditation; 163 163 break; 164 164 } … … 196 196 /* Save option: */ 197 197 if (pBox->isFlagChecked()) 198 rc |= QIMessageBox::OptionChosen;198 rc |= AlertOption_CheckBox; 199 199 200 200 /* Delete message-box: */ … … 572 572 message(mainWindowShown(), MessageType_Question, 573 573 strText, 0 /* auto-confirm id */, 574 QIMessageBox::Ok | QIMessageBox::Default,575 QIMessageBox::Cancel | QIMessageBox::Escape,574 AlertButton_Ok | AlertButtonOption_Default, 575 AlertButton_Cancel | AlertButtonOption_Escape, 576 576 0, 577 577 tr("Remove")) : 578 578 message(mainWindowShown(), MessageType_Question, 579 579 strText, 0 /* auto-confirm id */, 580 QIMessageBox::Yes,581 QIMessageBox::No | QIMessageBox::Default,582 QIMessageBox::Cancel | QIMessageBox::Escape,580 AlertButton_Yes, 581 AlertButton_No | AlertButtonOption_Default, 582 AlertButton_Cancel | AlertButtonOption_Escape, 583 583 tr("Delete all files"), 584 584 tr("Remove only")); … … 697 697 !vboxGlobal().virtualBox().GetExtraDataStringList(GUI_InvertMessageOption).contains("confirmSnapshotRestoring"), 698 698 QString() /* details */, 699 QIMessageBox::Ok | QIMessageBox::Default,700 QIMessageBox::Cancel | QIMessageBox::Escape,699 AlertButton_Ok | AlertButtonOption_Default, 700 AlertButton_Cancel | AlertButtonOption_Escape, 701 701 0 /* 3rd button */, 702 702 tr("Restore"), tr("Cancel"), QString() /* 3rd button text */) : … … 705 705 .arg(strSnapshotName), 706 706 0 /* auto-confirm id */, 707 QIMessageBox::Ok | QIMessageBox::Default,708 QIMessageBox::Cancel | QIMessageBox::Escape,707 AlertButton_Ok | AlertButtonOption_Default, 708 AlertButton_Cancel | AlertButtonOption_Escape, 709 709 0 /* 3rd button */, 710 710 tr("Restore"), tr("Cancel"), QString() /* 3rd button text */); … … 866 866 .arg(strControllerName), 867 867 0 /* auto-confirm id */, 868 QIMessageBox::Yes,869 QIMessageBox::No,870 QIMessageBox::Cancel | QIMessageBox::Default | QIMessageBox::Escape,868 AlertButton_Yes, 869 AlertButton_No, 870 AlertButton_Cancel | AlertButtonOption_Default | AlertButtonOption_Escape, 871 871 tr("Create &new disk", "add attachment routine"), 872 872 tr("&Choose existing disk", "add attachment routine")); … … 881 881 .arg(strControllerName), 882 882 0 /* auto-confirm id */, 883 QIMessageBox::Yes,884 QIMessageBox::No,885 QIMessageBox::Cancel | QIMessageBox::Default | QIMessageBox::Escape,883 AlertButton_Yes, 884 AlertButton_No, 885 AlertButton_Cancel | AlertButtonOption_Default | AlertButtonOption_Escape, 886 886 tr("&Choose disk", "add attachment routine"), 887 887 tr("Leave &empty", "add attachment routine")); … … 896 896 .arg(strControllerName), 897 897 0 /* auto-confirm id */, 898 QIMessageBox::Yes,899 QIMessageBox::No,900 QIMessageBox::Cancel | QIMessageBox::Default | QIMessageBox::Escape,898 AlertButton_Yes, 899 AlertButton_No, 900 AlertButton_Cancel | AlertButtonOption_Default | AlertButtonOption_Escape, 901 901 tr("&Choose disk", "add attachment routine"), 902 902 tr("Leave &empty", "add attachment routine")); … … 1033 1033 .arg(strLocation), 1034 1034 0 /* auto-confirm id */, 1035 QIMessageBox::Yes,1036 QIMessageBox::No | QIMessageBox::Default,1037 QIMessageBox::Cancel | QIMessageBox::Escape,1035 AlertButton_Yes, 1036 AlertButton_No | AlertButtonOption_Default, 1037 AlertButton_Cancel | AlertButtonOption_Escape, 1038 1038 tr("Delete", "hard disk storage"), 1039 1039 tr("Keep", "hard disk storage")); … … 1321 1321 "machine using a virtual optical disk or from the network."), 1322 1322 0 /* auto-confirm id */, 1323 QIMessageBox::Ok,1324 QIMessageBox::Cancel | QIMessageBox::Default | QIMessageBox::Escape,1323 AlertButton_Ok | AlertButtonOption_Default, 1324 AlertButton_Cancel | AlertButtonOption_Escape, 1325 1325 0, 1326 1326 tr("Continue", "no hard disk attached"), 1327 tr("Go Back", "no hard disk attached")) == QIMessageBox::Ok;1327 tr("Go Back", "no hard disk attached")) == AlertButton_Ok; 1328 1328 } 1329 1329 … … 1773 1773 .arg(UIHostCombo::toReadableString(vboxGlobal().settings().hostCombo())), 1774 1774 "confirmInputCapture", 1775 QIMessageBox::Ok | QIMessageBox::Default,1776 QIMessageBox::Cancel | QIMessageBox::Escape,1775 AlertButton_Ok | AlertButtonOption_Default, 1776 AlertButton_Cancel | AlertButtonOption_Escape, 1777 1777 0, 1778 1778 tr("Capture", "do input capture")); … … 1781 1781 *pfAutoConfirmed = (rc & AutoConfirmed); 1782 1782 1783 return (rc & QIMessageBox::ButtonMask) == QIMessageBox::Ok;1783 return (rc & AlertButtonMask) == AlertButton_Ok; 1784 1784 } 1785 1785 … … 1909 1909 .arg(VBoxGlobal::formatSize(uMinVRAM)), 1910 1910 0 /* auto-confirm id */, 1911 QIMessageBox::Ignore | QIMessageBox::Default,1912 QIMessageBox::Cancel | QIMessageBox::Escape);1911 AlertButton_Ignore | AlertButtonOption_Default, 1912 AlertButton_Cancel | AlertButtonOption_Escape); 1913 1913 } 1914 1914 … … 1934 1934 .arg(VBoxGlobal::formatSize(uMinVRAM)), 1935 1935 0 /* auto-confirm id */, 1936 QIMessageBox::Ignore | QIMessageBox::Default,1937 QIMessageBox::Cancel | QIMessageBox::Escape);1936 AlertButton_Ignore | AlertButtonOption_Default, 1937 AlertButton_Cancel | AlertButtonOption_Escape); 1938 1938 } 1939 1939 … … 2083 2083 .arg(strLogFolder), 2084 2084 0 /* auto-confirm id */, 2085 QIMessageBox::Ok | QIMessageBox::Default,2086 QIMessageBox::Ignore | QIMessageBox::Escape);2087 2088 return rc == QIMessageBox::Ok;2085 AlertButton_Ok | AlertButtonOption_Default, 2086 AlertButton_Ignore | AlertButtonOption_Escape); 2087 2088 return rc == AlertButton_Ok; 2089 2089 } 2090 2090 … … 2212 2212 .arg(strExtPackVersion).arg(strExtPackName).arg(strVBoxVersion), 2213 2213 0 /* auto-confirm id */, 2214 QIMessageBox::Ok | QIMessageBox::Default,2214 AlertButton_Ok | AlertButtonOption_Default, 2215 2215 0, 2216 2216 0, … … 2960 2960 /* Choose the 'default' button: */ 2961 2961 if (iButton1 == 0 && iButton2 == 0 && iButton3 == 0) 2962 iButton1 = QIMessageBox::Ok | QIMessageBox::Default;2962 iButton1 = AlertButton_Ok | AlertButtonOption_Default; 2963 2963 2964 2964 /* Check if message-box was auto-confirmed before: */ … … 2972 2972 { 2973 2973 int iResultCode = AutoConfirmed; 2974 if (iButton1 & QIMessageBox::Default)2975 iResultCode |= (iButton1 & QIMessageBox::ButtonMask);2976 if (iButton2 & QIMessageBox::Default)2977 iResultCode |= (iButton2 & QIMessageBox::ButtonMask);2978 if (iButton3 & QIMessageBox::Default)2979 iResultCode |= (iButton3 & QIMessageBox::ButtonMask);2974 if (iButton1 & AlertButtonOption_Default) 2975 iResultCode |= (iButton1 & AlertButtonMask); 2976 if (iButton2 & AlertButtonOption_Default) 2977 iResultCode |= (iButton2 & AlertButtonMask); 2978 if (iButton3 & AlertButtonOption_Default) 2979 iResultCode |= (iButton3 & AlertButtonMask); 2980 2980 return iResultCode; 2981 2981 } … … 2984 2984 /* Choose title and icon: */ 2985 2985 QString title; 2986 QIMessageBox::IconType icon;2986 AlertIconType icon; 2987 2987 switch (type) 2988 2988 { … … 2990 2990 case MessageType_Info: 2991 2991 title = tr("VirtualBox - Information", "msg box title"); 2992 icon = QIMessageBox::IconType_Information;2992 icon = AlertIconType_Information; 2993 2993 break; 2994 2994 case MessageType_Question: 2995 2995 title = tr("VirtualBox - MessageType_Question", "msg box title"); 2996 icon = QIMessageBox::IconType_Question;2996 icon = AlertIconType_Question; 2997 2997 break; 2998 2998 case MessageType_Warning: 2999 2999 title = tr("VirtualBox - MessageType_Warning", "msg box title"); 3000 icon = QIMessageBox::IconType_Warning;3000 icon = AlertIconType_Warning; 3001 3001 break; 3002 3002 case MessageType_Error: 3003 3003 title = tr("VirtualBox - MessageType_Error", "msg box title"); 3004 icon = QIMessageBox::IconType_Critical;3004 icon = AlertIconType_Critical; 3005 3005 break; 3006 3006 case MessageType_Critical: 3007 3007 title = tr("VirtualBox - MessageType_Critical MessageType_Error", "msg box title"); 3008 icon = QIMessageBox::IconType_Critical;3008 icon = AlertIconType_Critical; 3009 3009 break; 3010 3010 case MessageType_GuruMeditation: 3011 3011 title = "VirtualBox - Guru Meditation"; /* don't translate this */ 3012 icon = QIMessageBox::IconType_GuruMeditation;3012 icon = AlertIconType_GuruMeditation; 3013 3013 break; 3014 3014 } -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMessageCenter.h
r45292 r45296 114 114 { 115 115 return (message(pParent, type, strMessage, strDetails, pcszAutoConfirmId, 116 QIMessageBox::Yes | QIMessageBox::Default,117 QIMessageBox::No | QIMessageBox::Escape,116 AlertButton_Yes | AlertButtonOption_Default, 117 AlertButton_No | AlertButtonOption_Escape, 118 118 0, 119 119 strYesButtonText, strNoButtonText, QString()) & 120 QIMessageBox::ButtonMask) == QIMessageBox::Yes;120 AlertButtonMask) == AlertButton_Yes; 121 121 } 122 122 … … 143 143 bool fOkByDefault = true) const 144 144 { 145 int iOkButton = fOkByDefault ? QIMessageBox::Ok | QIMessageBox::Default :146 QIMessageBox::Ok;147 int iCancelButton = fOkByDefault ? QIMessageBox::Cancel | QIMessageBox::Escape :148 QIMessageBox::Cancel | QIMessageBox::Escape | QIMessageBox::Default;145 int iOkButton = fOkByDefault ? AlertButton_Ok | AlertButtonOption_Default : 146 AlertButton_Ok; 147 int iCancelButton = fOkByDefault ? AlertButton_Cancel | AlertButtonOption_Escape : 148 AlertButton_Cancel | AlertButtonOption_Escape | AlertButtonOption_Default; 149 149 return (message(pParent, type, strMessage, strDetails, pcszAutoConfirmId, 150 150 iOkButton, iCancelButton, 0, strOkButtonText, strCancelButtonText, QString()) & 151 QIMessageBox::ButtonMask) == QIMessageBox::Ok;151 AlertButtonMask) == AlertButton_Ok; 152 152 } 153 153 -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp
r45292 r45296 1159 1159 { 1160 1160 int rc = msgCenter().confirmDeleteHardDiskStorage(item->location(), this); 1161 if (rc == QIMessageBox::Cancel)1161 if (rc == AlertButton_Cancel) 1162 1162 return; 1163 deleteStorage = rc == QIMessageBox::Yes;1163 deleteStorage = rc == AlertButton_Yes; 1164 1164 } 1165 1165 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMachineLogic.cpp
r45292 r45296 1493 1493 /* Ask for force remounting: */ 1494 1494 if (msgCenter().cannotRemountMedium(machine, vboxGlobal().findMedium(fMount ? newId : currentId), 1495 fMount, true /* retry? */, activeMachineWindow()) == QIMessageBox::Ok)1495 fMount, true /* retry? */, activeMachineWindow()) == AlertButton_Ok) 1496 1496 { 1497 1497 /* Force remount medium to the predefined port/device: */ … … 1554 1554 /* Ask for force remounting: */ 1555 1555 if (msgCenter().cannotRemountMedium(machine, vboxGlobal().findMedium(fMount ? strNewId : strCurrentId), 1556 fMount, true /* retry? */, activeMachineWindow()) == QIMessageBox::Ok)1556 fMount, true /* retry? */, activeMachineWindow()) == AlertButton_Ok) 1557 1557 { 1558 1558 /* Force remount medium to the predefined port/device: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIMultiScreenLayout.cpp
r44982 r45296 226 226 msgCenter().cannotSwitchScreenInSeamless((((usedBits + 7) / 8 + _1M - 1) / _1M) * _1M); 227 227 else 228 fSuccess = msgCenter().cannotSwitchScreenInFullscreen((((usedBits + 7) / 8 + _1M - 1) / _1M) * _1M) != QIMessageBox::Cancel;228 fSuccess = msgCenter().cannotSwitchScreenInFullscreen((((usedBits + 7) / 8 + _1M - 1) / _1M) * _1M) != AlertButton_Cancel; 229 229 } 230 230 } -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UISession.cpp
r45292 r45296 592 592 /* Ask for force mounting: */ 593 593 if (msgCenter().cannotRemountMedium(machine, vboxMedium, true /* mount? */, 594 true /* retry? */, mainMachineWindow()) == QIMessageBox::Ok)594 true /* retry? */, mainMachineWindow()) == AlertButton_Ok) 595 595 { 596 596 /* Force mount medium to the predefined port/device: */ -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/fullscreen/UIMachineLogicFullscreen.cpp
r45233 r45296 62 62 int result = msgCenter().cannotEnterFullscreenMode(0, 0, 0, 63 63 (((usedBits + 7) / 8 + _1M - 1) / _1M) * _1M); 64 if (result == QIMessageBox::Cancel)64 if (result == AlertButton_Cancel) 65 65 return false; 66 66 } -
trunk/src/VBox/Frontends/VirtualBox/src/selector/VBoxSnapshotsWgt.cpp
r45285 r45296 585 585 /* Ask the user if he really wants to restore the snapshot: */ 586 586 int iResultCode = msgCenter().confirmSnapshotRestoring(snapshot.GetName(), mMachine.GetCurrentStateModified()); 587 if (iResultCode & QIMessageBox::Cancel)587 if (iResultCode & AlertButton_Cancel) 588 588 return; 589 589 590 590 /* If user also confirmed new snapshot creation: */ 591 if (iResultCode & QIMessageBox::OptionChosen)591 if (iResultCode & AlertOption_CheckBox) 592 592 { 593 593 /* Take snapshot of changed current state: */ -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/chooser/UIGChooserModel.cpp
r45288 r45296 1458 1458 /* Confirm machine removal: */ 1459 1459 int iResultCode = msgCenter().confirmMachineRemoval(machines); 1460 if (iResultCode == QIMessageBox::Cancel)1460 if (iResultCode == AlertButton_Cancel) 1461 1461 return; 1462 1462 … … 1466 1466 /* Get iterated machine: */ 1467 1467 CMachine &machine = machines[iMachineIndex]; 1468 if (iResultCode == QIMessageBox::Yes)1468 if (iResultCode == AlertButton_Yes) 1469 1469 { 1470 1470 /* Unregister machine first: */ -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp
r45294 r45296 3046 3046 { 3047 3047 int iAnswer = msgCenter().askAboutHardDiskAttachmentCreation(strControllerName, this); 3048 if (iAnswer == QIMessageBox::Yes)3048 if (iAnswer == AlertButton_Yes) 3049 3049 strMediumId = getWithNewHDWizard(); 3050 else if (iAnswer == QIMessageBox::No)3050 else if (iAnswer == AlertButton_No) 3051 3051 strMediumId = vboxGlobal().openMediumWithFileOpenDialog(UIMediumType_HardDisk, this, strMachineFolder); 3052 3052 break; … … 3055 3055 { 3056 3056 int iAnswer = msgCenter().askAboutOpticalAttachmentCreation(strControllerName, this); 3057 if (iAnswer == QIMessageBox::Yes)3057 if (iAnswer == AlertButton_Yes) 3058 3058 strMediumId = vboxGlobal().openMediumWithFileOpenDialog(UIMediumType_DVD, this, strMachineFolder); 3059 else if (iAnswer == QIMessageBox::No)3059 else if (iAnswer == AlertButton_No) 3060 3060 strMediumId = vboxGlobal().findMedium(strMediumId).id(); 3061 3061 break; … … 3064 3064 { 3065 3065 int iAnswer = msgCenter().askAboutFloppyAttachmentCreation(strControllerName, this); 3066 if (iAnswer == QIMessageBox::Yes)3066 if (iAnswer == AlertButton_Yes) 3067 3067 strMediumId = vboxGlobal().openMediumWithFileOpenDialog(UIMediumType_Floppy, this, strMachineFolder); 3068 else if (iAnswer == QIMessageBox::No)3068 else if (iAnswer == AlertButton_No) 3069 3069 strMediumId = vboxGlobal().findMedium(strMediumId).id(); 3070 3070 break;
Note:
See TracChangeset
for help on using the changeset viewer.