mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 07:56:16 +00:00
Merge pull request #4155 from dannysmyda/4257-hashset-functionality-during-ingest
4257 hashset functionality during ingest
This commit is contained in:
commit
f53a95b932
@ -48,6 +48,10 @@ final class AddContentToHashDbAction extends AbstractAction implements Presenter
|
|||||||
"AddContentToHashDbAction.singleSelectionName");
|
"AddContentToHashDbAction.singleSelectionName");
|
||||||
private final static String MULTIPLE_SELECTION_NAME = NbBundle.getMessage(AddContentToHashDbAction.class,
|
private final static String MULTIPLE_SELECTION_NAME = NbBundle.getMessage(AddContentToHashDbAction.class,
|
||||||
"AddContentToHashDbAction.multipleSelectionName");
|
"AddContentToHashDbAction.multipleSelectionName");
|
||||||
|
private final static String SINGLE_SELECTION_NAME_DURING_INGEST = NbBundle.getMessage(AddContentToHashDbAction.class,
|
||||||
|
"AddContentToHashDbAction.singleSelectionNameDuringIngest");
|
||||||
|
private final static String MULTIPLE_SELECTION_NAME_DURING_INGEST = NbBundle.getMessage(AddContentToHashDbAction.class,
|
||||||
|
"AddContentToHashDbAction.multipleSelectionNameDuringIngest");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AddContentToHashDbAction is a singleton to support multi-selection of
|
* AddContentToHashDbAction is a singleton to support multi-selection of
|
||||||
@ -80,15 +84,21 @@ final class AddContentToHashDbAction extends AbstractAction implements Presenter
|
|||||||
|
|
||||||
AddContentToHashDbMenu() {
|
AddContentToHashDbMenu() {
|
||||||
super(SINGLE_SELECTION_NAME);
|
super(SINGLE_SELECTION_NAME);
|
||||||
|
// Get any AbstractFile objects from the lookup of the currently focused top component.
|
||||||
|
final Collection<? extends AbstractFile> selectedFiles = Utilities.actionsGlobalContext().lookupAll(AbstractFile.class);
|
||||||
|
|
||||||
// Disable the menu if file ingest is in progress.
|
// Disable the menu if file ingest is in progress.
|
||||||
if (IngestManager.getInstance().isIngestRunning()) {
|
if (IngestManager.getInstance().isIngestRunning()) {
|
||||||
|
if(selectedFiles.size() > 1) {
|
||||||
|
//Displays: 'Add Files to Hash Set (Ingest is running)'
|
||||||
|
setText(MULTIPLE_SELECTION_NAME_DURING_INGEST);
|
||||||
|
} else {
|
||||||
|
setText(SINGLE_SELECTION_NAME_DURING_INGEST);
|
||||||
|
}
|
||||||
setEnabled(false);
|
setEnabled(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get any AbstractFile objects from the lookup of the currently focused top component.
|
|
||||||
final Collection<? extends AbstractFile> selectedFiles = Utilities.actionsGlobalContext().lookupAll(AbstractFile.class);
|
|
||||||
if (selectedFiles.isEmpty()) {
|
if (selectedFiles.isEmpty()) {
|
||||||
setEnabled(false);
|
setEnabled(false);
|
||||||
return;
|
return;
|
||||||
|
@ -151,8 +151,10 @@ HashDbManager.fileNameExtensionFilter.title=Hash Set File
|
|||||||
HashDbSearchAction.dlgMsg.title=File Search by MD5 Hash
|
HashDbSearchAction.dlgMsg.title=File Search by MD5 Hash
|
||||||
HashDbSearchAction.getName.text=Hash Search
|
HashDbSearchAction.getName.text=Hash Search
|
||||||
HashDbSearchPanel.dlgMsg.title=File Search by MD5 Hash
|
HashDbSearchPanel.dlgMsg.title=File Search by MD5 Hash
|
||||||
AddContentToHashDbAction.singleSelectionName=Add file to hash set
|
AddContentToHashDbAction.singleSelectionName=Add File to Hash Set
|
||||||
AddContentToHashDbAction.multipleSelectionName=Add files to hash set
|
AddContentToHashDbAction.multipleSelectionName=Add Files to Hash Set
|
||||||
|
AddContentToHashDbAction.singleSelectionNameDuringIngest=Add File to Hash Set (Ingest is running)
|
||||||
|
AddContentToHashDbAction.multipleSelectionNameDuringIngest=Add Files to Hash Set (Ingest is running)
|
||||||
HashDbManager.ingestRunningExceptionMsg=Ingest is ongoing; this service will be unavailable until it finishes.
|
HashDbManager.ingestRunningExceptionMsg=Ingest is ongoing; this service will be unavailable until it finishes.
|
||||||
HashDbManager.saveErrorExceptionMsg=Error saving hash configuration
|
HashDbManager.saveErrorExceptionMsg=Error saving hash configuration
|
||||||
HashLookupSettingsPanel.jButton3.text=Import Hash Set
|
HashLookupSettingsPanel.jButton3.text=Import Hash Set
|
||||||
|
@ -55,6 +55,11 @@ class SwingMenuAdapter extends Menu {
|
|||||||
SwingMenuAdapter(final JMenu jMenu) {
|
SwingMenuAdapter(final JMenu jMenu) {
|
||||||
super(jMenu.getText());
|
super(jMenu.getText());
|
||||||
this.jMenu = jMenu;
|
this.jMenu = jMenu;
|
||||||
|
if(!jMenu.isEnabled()) {
|
||||||
|
//Grey out text if the JMenu that this Menu is wrapping is
|
||||||
|
//not enabled.
|
||||||
|
setDisable(true);
|
||||||
|
}
|
||||||
buildChildren(jMenu);
|
buildChildren(jMenu);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user