mirror of
https://github.com/elisspace/autopsy.git
synced 2026-09-04 06:50:00 +00:00
1902-added actionlistener for combo box
This commit is contained in:
@@ -52,7 +52,6 @@ public class IngestJobSettings {
|
||||
|
||||
private static final String ENABLED_MODULES_KEY = "Enabled_Ingest_Modules"; //NON-NLS
|
||||
private static final String DISABLED_MODULES_KEY = "Disabled_Ingest_Modules"; //NON-NLS
|
||||
private static final String PARSE_UNALLOC_SPACE_KEY = "Process_Unallocated_Space"; //NON-NLS
|
||||
private static final String LAST_FILE_INGEST_FILTER_KEY = "Last File Ingest Filter Used";
|
||||
private static final String MODULE_SETTINGS_FOLDER = "IngestModuleSettings"; //NON-NLS
|
||||
private static final String MODULE_SETTINGS_FOLDER_PATH = Paths.get(PlatformUtil.getUserConfigDirectory(), IngestJobSettings.MODULE_SETTINGS_FOLDER).toAbsolutePath().toString();
|
||||
@@ -487,12 +486,6 @@ public class IngestJobSettings {
|
||||
ModuleSettings.setConfigSetting(this.executionContext, ENABLED_MODULES_KEY, makeCommaSeparatedValuesList(enabledModuleNames));
|
||||
ModuleSettings.setConfigSetting(this.executionContext, DISABLED_MODULES_KEY, makeCommaSeparatedValuesList(disabledModuleNames));
|
||||
|
||||
/**
|
||||
* Save the process unallocated space setting.
|
||||
*/
|
||||
String processUnalloc = Boolean.toString(getProcessUnallocatedSpace());
|
||||
ModuleSettings.setConfigSetting(this.executionContext, PARSE_UNALLOC_SPACE_KEY, processUnalloc);
|
||||
|
||||
/**
|
||||
* Save the last used File Ingest Filter setting for this context.
|
||||
*/
|
||||
|
||||
@@ -213,6 +213,15 @@ public final class IngestJobSettingsPanel extends javax.swing.JPanel {
|
||||
fileIngestFilterLabel = new javax.swing.JLabel();
|
||||
fileIngestFilterComboBox = new javax.swing.JComboBox<>();
|
||||
|
||||
fileIngestFilterLabel.setText(org.openide.util.NbBundle.getMessage(IngestJobSettingsPanel.class, "IngestJobSettingsPanel.fileIngestFilterLabel.text")); // NOI18N
|
||||
fileIngestFilterComboBox.setModel(new DefaultComboBoxModel<>(controller.getComboBoxContents()));
|
||||
fileIngestFilterComboBox.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
fileIngestFilterComboBoxActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
setMaximumSize(new java.awt.Dimension(5750, 3000));
|
||||
setMinimumSize(new java.awt.Dimension(0, 0));
|
||||
setPreferredSize(new java.awt.Dimension(625, 450));
|
||||
@@ -397,7 +406,7 @@ public final class IngestJobSettingsPanel extends javax.swing.JPanel {
|
||||
dialog.pack();
|
||||
dialog.setVisible(true);
|
||||
}//GEN-LAST:event_pastJobsButtonActionPerformed
|
||||
|
||||
|
||||
/**
|
||||
* Perform the appropriate action when Jcombobox items are selected, most
|
||||
* notably opening the File filter settings when Create New is chosen.
|
||||
@@ -425,7 +434,6 @@ public final class IngestJobSettingsPanel extends javax.swing.JPanel {
|
||||
}
|
||||
}//GEN-LAST:event_jComboBox1ActionPerformed
|
||||
|
||||
|
||||
private void SelectAllModules(boolean set) {
|
||||
for (IngestModuleModel module : modules) {
|
||||
module.setEnabled(set);
|
||||
|
||||
@@ -397,13 +397,6 @@ final class IngestTasksScheduler {
|
||||
private static boolean shouldEnqueueFileTask(final FileIngestTask task) {
|
||||
final AbstractFile file = task.getFile();
|
||||
|
||||
// Skip the task if the file is an unallocated space file and the
|
||||
// process unallocated space flag is not set for this job.
|
||||
if (!task.getIngestJob().shouldProcessUnallocatedSpace()
|
||||
&& file.getType().equals(TskData.TSK_DB_FILES_TYPE_ENUM.UNALLOC_BLOCKS)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Skip the task if the file is actually the pseudo-file for the parent
|
||||
// or current directory.
|
||||
String fileName = file.getName();
|
||||
@@ -411,6 +404,11 @@ final class IngestTasksScheduler {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the file is a member of the file ingest filter that is being
|
||||
* applied to the current run of ingest, checks if unallocated space
|
||||
* should be processed inside call to fileIsMemberOf
|
||||
*/
|
||||
if ((task.getIngestJob().getFileIngestFilter().fileIsMemberOf(file)) == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -544,11 +544,13 @@ public final class FilesSet implements Serializable {
|
||||
return file.getMetaType() == TskData.TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_REG;
|
||||
case DIRECTORIES:
|
||||
return file.getMetaType() == TskData.TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_DIR;
|
||||
case ALL:
|
||||
return true;
|
||||
default:
|
||||
case FILES_AND_DIRECTORIES:
|
||||
return file.getMetaType() == TskData.TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_REG
|
||||
|| file.getMetaType() == TskData.TSK_FS_META_TYPE_ENUM.TSK_FS_META_TYPE_DIR;
|
||||
case ALL:
|
||||
return true; //Effectively ignores the metatype condition when All is selected.
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user