Changeset 90758 in vbox
- Timestamp:
- Aug 20, 2021 11:28:08 AM (3 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMachineAttributeSetter.cpp
r88105 r90758 24 24 #include "UIMachineAttributeSetter.h" 25 25 #include "UIMessageCenter.h" 26 #include "UINotificationCenter.h" 26 27 27 28 /* COM includes: */ … … 102 103 break; 103 104 } 104 case MachineAttribute_Location:105 {106 /* Do not save machine settings: */107 fSaveSettings = false;108 /* Prepare machine move progress: */109 CProgress comProgress = comMachine.MoveTo(guiAttribute.toString(), "basic");110 if (!comMachine.isOk())111 {112 msgCenter().cannotMoveMachine(comMachine);113 fErrorHappened = true;114 break;115 }116 /* Show machine move progress: */117 msgCenter().showModalProgressDialog(comProgress, comMachine.GetName(), ":/progress_dnd_hg_90px.png");118 if (!comProgress.isOk() || comProgress.GetResultCode() != 0)119 {120 msgCenter().cannotMoveMachine(comProgress, comMachine.GetName());121 fErrorHappened = true;122 break;123 }124 break;125 }126 105 case MachineAttribute_OSType: 127 106 { … … 321 300 comSession.UnlockMachine(); 322 301 } 302 303 void UIMachineAttributeSetter::setMachineLocation(const QUuid &uMachineId, 304 const QString &strLocation) 305 { 306 /* Move machine: */ 307 UINotificationProgressMachineMove *pNotification = new UINotificationProgressMachineMove(uMachineId, 308 strLocation, 309 "basic"); 310 gpNotificationCenter->append(pNotification); 311 } -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMachineAttributeSetter.h
r82968 r90758 32 32 MachineAttribute_Name, 33 33 MachineAttribute_OSType, 34 MachineAttribute_Location,35 34 MachineAttribute_BaseMemory, 36 35 MachineAttribute_BootOrder, … … 73 72 const MachineAttribute &enmType, 74 73 const QVariant &guiAttribute); 74 75 /** Assigns @a comMachine @a strLocation. */ 76 SHARED_LIBRARY_STUFF void setMachineLocation(const QUuid &uMachineId, 77 const QString &strLocation); 75 78 } 76 79 using namespace UIMachineAttributeSetter /* if header included */; -
trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsElement.cpp
r89408 r90758 908 908 if (fChooseName) 909 909 setMachineAttribute(machine(), MachineAttribute_Name, QVariant::fromValue(pEditor->name())); 910 else if (fChoosePath)911 setMachineAttribute(machine(), MachineAttribute_Location, QVariant::fromValue(pEditor->path()));912 910 else if (fChooseType) 913 911 setMachineAttribute(machine(), MachineAttribute_OSType, QVariant::fromValue(pEditor->typeId())); 912 else if (fChoosePath) 913 setMachineLocation(machine().GetId(), pEditor->path()); 914 914 } 915 915
Note:
See TracChangeset
for help on using the changeset viewer.