- Timestamp:
- Jul 23, 2019 6:21:43 PM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIDetailsGenerator.cpp
r79923 r79940 81 81 /* Settings file location: */ 82 82 if (fOptions & UIExtraDataMetaDefs::DetailsElementOptionTypeGeneral_Location) 83 { 84 /* Configure hovering anchor: */ 85 const QString strAnchorType = QString("machine_location"); 86 const QString strMachineLocation = comMachine.GetSettingsFilePath(); 83 87 table << UITextTableLine(QApplication::translate("UIDetails", "Settings File Location", "details (general)"), 84 QDir::toNativeSeparators(QFileInfo(comMachine.GetSettingsFilePath()).absolutePath())); 88 QString("<a href=#%1,%2>%3</a>").arg(strAnchorType, 89 strMachineLocation, 90 QDir::toNativeSeparators(QFileInfo(strMachineLocation).absolutePath()))); 91 } 85 92 86 93 /* Groups: */ -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMachineAttributeSetter.cpp
r79936 r79940 55 55 break; 56 56 } 57 case MachineAttribute_Location: 58 { 59 /* Do not save machine settings: */ 60 fSaveSettings = false; 61 /* Prepare machine move progress: */ 62 CProgress comProgress = comMachine.MoveTo(guiAttribute.toString(), "basic"); 63 if (!comMachine.isOk()) 64 { 65 msgCenter().cannotMoveMachine(comMachine); 66 fErrorHappened = true; 67 break; 68 } 69 /* Show machine move progress: */ 70 msgCenter().showModalProgressDialog(comProgress, comMachine.GetName(), ":/progress_clone_90px.png"); 71 if (!comProgress.isOk() || comProgress.GetResultCode() != 0) 72 { 73 msgCenter().cannotMoveMachine(comProgress, comMachine.GetName()); 74 fErrorHappened = true; 75 break; 76 } 77 break; 78 } 57 79 case MachineAttribute_OSType: 58 80 { -
trunk/src/VBox/Frontends/VirtualBox/src/globals/UIMachineAttributeSetter.h
r79923 r79940 32 32 MachineAttribute_Name, 33 33 MachineAttribute_OSType, 34 MachineAttribute_Location, 34 35 }; 35 36 -
trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsElement.cpp
r79939 r79940 46 46 AnchorRole_Invalid, 47 47 AnchorRole_MachineName, 48 AnchorRole_MachineLocation, 48 49 AnchorRole_OSType, 49 50 AnchorRole_Storage, … … 147 148 ConfigurationAccessLevel cal = m_pSet->configurationAccessLevel(); 148 149 m_pTextPane->setAnchorRoleRestricted("#machine_name", cal != ConfigurationAccessLevel_Full); 150 m_pTextPane->setAnchorRoleRestricted("#machine_location", cal != ConfigurationAccessLevel_Full); 149 151 m_pTextPane->setAnchorRoleRestricted("#os_type", cal != ConfigurationAccessLevel_Full); 150 152 m_pTextPane->setAnchorRoleRestricted("#mount", cal == ConfigurationAccessLevel_Null); … … 428 430 QMap<QString, AnchorRole> roles; 429 431 roles["#machine_name"] = AnchorRole_MachineName; 432 roles["#machine_location"] = AnchorRole_MachineLocation; 430 433 roles["#os_type"] = AnchorRole_OSType; 431 434 roles["#mount"] = AnchorRole_Storage; … … 441 444 { 442 445 case AnchorRole_MachineName: 446 case AnchorRole_MachineLocation: 443 447 case AnchorRole_OSType: 444 448 { … … 451 455 new UINameAndSystemEditor(pPopup, 452 456 enmRole == AnchorRole_MachineName /* choose name? */, 453 false/* choose path? */,457 enmRole == AnchorRole_MachineLocation /* choose path? */, 454 458 enmRole == AnchorRole_OSType /* choose type? */); 455 459 if (pEditor) … … 458 462 { 459 463 case AnchorRole_MachineName: pEditor->setName(strData.section(',', 0, 0)); break; 464 case AnchorRole_MachineLocation: pEditor->setPath(strData.section(',', 0, 0)); break; 460 465 case AnchorRole_OSType: pEditor->setTypeId(strData.section(',', 0, 0)); break; 461 466 default: break; … … 481 486 { 482 487 case AnchorRole_MachineName: setMachineAttribute(machine(), MachineAttribute_Name, QVariant::fromValue(pEditor->name())); break; 488 case AnchorRole_MachineLocation: setMachineAttribute(machine(), MachineAttribute_Location, QVariant::fromValue(pEditor->path())); break; 483 489 case AnchorRole_OSType: setMachineAttribute(machine(), MachineAttribute_OSType, QVariant::fromValue(pEditor->typeId())); break; 484 490 default: break;
Note:
See TracChangeset
for help on using the changeset viewer.