Lines Matching defs:disk

173 	ModificationPreparer(BDiskDevice* disk)
175 fDisk(disk),
381 if (message->FindString("disk system", &diskSystemName) != B_OK)
440 // selection of partitions via disk view
617 MainWindow::_SetToDiskAndPartition(partition_id disk, partition_id partition,
620 //printf("MainWindow::_SetToDiskAndPartition(disk: %ld, partition: %ld, "
621 // "parent: %ld)\n", disk, partition, parent);
624 if (!fCurrentDisk || fCurrentDisk->ID() != disk) {
627 if (disk >= 0) {
629 status_t status = newDisk->SetTo(disk);
648 MainWindow::_UpdateMenus(BDiskDevice* disk,
667 if (disk == NULL) {
676 fEjectMenuItem->SetEnabled(disk->IsRemovableMedia());
684 parentPartition = disk->FindDescendant(parentID);
691 bool prepared = disk->PrepareModifications() == B_OK;
701 BPartition* partition = disk->FindDescendant(selectedPartition);
711 message->AddString("disk system", diskSystem.PrettyName());
721 if (disk->ID() == selectedPartition
732 message->AddString("disk system", diskSystem.PrettyName());
796 disk->CancelModifications();
849 MainWindow::_Mount(BDiskDevice* disk, partition_id selectedPartition)
851 if (!disk || selectedPartition < 0) {
857 BPartition* partition = disk->FindDescendant(selectedPartition);
881 MainWindow::_Unmount(BDiskDevice* disk, partition_id selectedPartition)
883 if (!disk || selectedPartition < 0) {
889 BPartition* partition = disk->FindDescendant(selectedPartition);
949 MainWindow::_Initialize(BDiskDevice* disk, partition_id selectedPartition,
952 if (!disk || selectedPartition < 0) {
958 if (disk->IsReadOnly()) {
959 _DisplayPartitionError(B_TRANSLATE("The selected disk is read-only."));
963 BPartition* partition = disk->FindDescendant(selectedPartition);
1001 if (disk->ID() == selectedPartition) {
1003 "want to format a raw disk? (Most people initialize the disk "
1005 "again before changes are written to the disk.");
1010 "again before changes are written to the disk.");
1017 "written to the disk.");
1021 "before changes are written to the disk.");
1025 "want to initialize the selected disk? All data will be lost. "
1027 "disk.\n");
1038 ModificationPreparer modificationPreparer(disk);
1042 "disk for modifications."), NULL, status);
1069 "%s failed. (Nothing has been written to disk.)"), partition,
1081 // to disk
1087 "want to write the changes back to disk now?\n\n"
1088 "All data on the disk %s will be irretrievably lost if you "
1093 "want to write the changes back to disk now?\n\n"
1101 "want to write the changes back to disk now?\n\n"
1102 "All data on the selected disk will be irretrievably lost if "
1106 "want to write the changes back to disk now?\n\n"
1125 partition = disk->FindDescendant(selectedPartition);
1132 _DisplayPartitionError(B_TRANSLATE("The disk has been "
1141 "disk %s!\n"), partition, status);
1150 MainWindow::_Create(BDiskDevice* disk, partition_id selectedPartition)
1152 if (!disk || selectedPartition > -2) {
1158 if (disk->IsReadOnly()) {
1159 _DisplayPartitionError(B_TRANSLATE("The selected disk is read-only."));
1171 BPartition* parent = disk->FindDescendant(currentSelection->ParentID());
1184 ModificationPreparer modificationPreparer(disk);
1188 "disk for modifications."), NULL, status);
1234 "want to write the changes back to disk now?\n\n"
1258 "partition. No changes have been written to disk."), NULL, status);
1262 // The disk layout has changed, update disk information
1264 status = disk->Update(&updated);
1272 MainWindow::_Delete(BDiskDevice* disk, partition_id selectedPartition)
1274 if (!disk || selectedPartition < 0) {
1280 if (disk->IsReadOnly()) {
1281 _DisplayPartitionError(B_TRANSLATE("The selected disk is read-only."));
1285 BPartition* partition = disk->FindDescendant(selectedPartition);
1299 ModificationPreparer modificationPreparer(disk);
1303 "disk for modifications."), NULL, status);
1336 "No changes have been written to disk."), NULL, status);
1346 MainWindow::_ChangeParameters(BDiskDevice* disk, partition_id selectedPartition)
1348 if (disk == NULL || selectedPartition < 0) {
1354 if (disk->IsReadOnly()) {
1355 _DisplayPartitionError(B_TRANSLATE("The selected disk is read-only."));
1359 BPartition* partition = disk->FindDescendant(selectedPartition);
1366 ModificationPreparer modificationPreparer(disk);
1370 "disk for modifications."), NULL, status);
1426 "of the partition. No changes have been written to disk."), NULL,