Updated to support raw file filter import and fixed a raw file export bug.

This commit is contained in:
Robert Greene 2004-06-23 03:47:12 +00:00
parent 8519134bb1
commit 3f1fa1cfb2

View File

@ -896,9 +896,12 @@ public class DiskExplorerTab {
}
filename = fileDialog.open();
directory = fileDialog.getFilterPath();
} else {
} else if (fileFilter != null) {
filename = directory + File.separator + AppleUtil.
getNiceFilename(fileFilter.getSuggestedFileName(fileEntry));
} else {
filename = directory + File.separator + AppleUtil.
getNiceFilename(fileEntry.getFilename());
}
if (filename != null) {
userPreferences.setExportDirectory(directory);
@ -1108,6 +1111,9 @@ public class DiskExplorerTab {
FileEntry fileEntry = directory.createFile();
fileEntry.setFilename(spec.getTargetFilename());
fileEntry.setFiletype(spec.getFiletype());
if (spec.isRawFileImport()) {
disks[0].setFileData(fileEntry, buffer.toByteArray());
} else {
if (fileEntry.needsAddress()) {
fileEntry.setAddress(spec.getAddress());
}
@ -1131,6 +1137,7 @@ public class DiskExplorerTab {
}
}
}
}
} catch (Exception ex) {
MessageBox box = new MessageBox(shell,
SWT.ICON_ERROR | SWT.OK);