Changeset 8395 in vbox for trunk/src/VBox
- Timestamp:
- Apr 25, 2008 4:13:45 PM (17 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/include/VBoxProblemReporter.h
r8337 r8395 197 197 198 198 int confirmDetachSATASlots (QWidget *aParent); 199 int confirmRunNewHDWzdOrVDM (QWidget *aParent, const QString &aVMName); 199 200 200 201 void cannotCreateHardDiskImage ( -
trunk/src/VBox/Frontends/VirtualBox/src/VBoxProblemReporter.cpp
r8392 r8395 1071 1071 } 1072 1072 1073 int VBoxProblemReporter::confirmRunNewHDWzdOrVDM (QWidget *aParent, 1074 const QString &aVMName) 1075 { 1076 return message (aParent, Question, 1077 tr ("<p>The count of currently available virtual hard disks which can " 1078 "be attached to <b><nobr>%1</nobr></b> virtual machine is less " 1079 "than the count of attachments for this virtual machine.</p>" 1080 "<p>You can run <b><nobr>New Virtual Disk</nobr></b> wizard by pressing " 1081 "<b><nobr>Create</nobr></b> button to add new hard disk or start " 1082 "<b><nobr>Virtual Disk Manager</nobr></b> by pressing " 1083 "<b><nobr>Manage</nobr></b> button to add some *.vdi file or " 1084 "release some hard disk attached to another virtual machine.</p>") 1085 .arg (aVMName), 1086 0, /* aAutoConfirmId */ 1087 QIMessageBox::Yes | QIMessageBox::Default, 1088 QIMessageBox::No, 1089 QIMessageBox::Cancel | QIMessageBox::Escape, 1090 tr ("&Create", "hard disk"), 1091 tr ("&Manage", "hard disk")); 1092 } 1093 1073 1094 void VBoxProblemReporter::cannotCreateHardDiskImage ( 1074 1095 QWidget *parent, const CVirtualBox &vbox, const QString &src, -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxHardDiskSettings.ui
r8370 r8395 260 260 <include location="local" impldecl="in implementation">VBoxMediaComboBox.h</include> 261 261 <include location="local" impldecl="in implementation">VBoxDiskImageManagerDlg.h</include> 262 <include location="local" impldecl="in implementation">VBoxNewHDWzd.h</include> 262 263 <include location="local" impldecl="in implementation">VBoxHardDiskSettings.ui.h</include> 263 264 </includes> -
trunk/src/VBox/Frontends/VirtualBox/ui/VBoxHardDiskSettings.ui.h
r8394 r8395 443 443 } 444 444 445 int vdiCount() 446 { 447 return mVector [1]->count(); 448 } 449 445 450 private: 446 451 … … 712 717 if (mLvHD->childCount() == 1) 713 718 onCurrentChanged (item); 719 720 int result = mLvHD->childCount() - 1 > item->vdiCount() ? 721 vboxProblem().confirmRunNewHDWzdOrVDM (this, mMachine.GetName()) : 722 QIMessageBox::Cancel; 723 if (result == QIMessageBox::Yes) 724 { 725 VBoxNewHDWzd dlg (this, "VBoxNewHDWzd"); 726 if (dlg.exec() == QDialog::Accepted) 727 { 728 CHardDisk hd = dlg.hardDisk(); 729 VBoxMedia::Status status = 730 hd.GetAccessible() ? VBoxMedia::Ok : 731 hd.isOk() ? VBoxMedia::Inaccessible : 732 VBoxMedia::Error; 733 vboxGlobal().addMedia (VBoxMedia (CUnknown (hd), VBoxDefs::HD, status)); 734 item->setId (dlg.hardDisk().GetId()); 735 } 736 } 737 else if (result == QIMessageBox::No) 738 showVDM(); 714 739 715 740 emit hddListChanged();
Note:
See TracChangeset
for help on using the changeset viewer.