diff --git a/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/AddContentToHashDbAction.java b/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/AddContentToHashDbAction.java index 6086596be2..6dcebb7d7f 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/AddContentToHashDbAction.java +++ b/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/AddContentToHashDbAction.java @@ -42,12 +42,16 @@ import org.sleuthkit.datamodel.TskCoreException; * Instances of this Action allow users to content to a hash database. */ final class AddContentToHashDbAction extends AbstractAction implements Presenter.Popup { - + private static AddContentToHashDbAction instance; private final static String SINGLE_SELECTION_NAME = NbBundle.getMessage(AddContentToHashDbAction.class, "AddContentToHashDbAction.singleSelectionName"); private final static String MULTIPLE_SELECTION_NAME = NbBundle.getMessage(AddContentToHashDbAction.class, "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 @@ -80,15 +84,21 @@ final class AddContentToHashDbAction extends AbstractAction implements Presenter AddContentToHashDbMenu() { super(SINGLE_SELECTION_NAME); - + // Get any AbstractFile objects from the lookup of the currently focused top component. + final Collection selectedFiles = Utilities.actionsGlobalContext().lookupAll(AbstractFile.class); + // Disable the menu if file ingest is in progress. if (IngestManager.getInstance().isIngestRunning()) { - setEnabled(false); + 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); return; } - // Get any AbstractFile objects from the lookup of the currently focused top component. - final Collection selectedFiles = Utilities.actionsGlobalContext().lookupAll(AbstractFile.class); if (selectedFiles.isEmpty()) { setEnabled(false); return; diff --git a/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties b/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties index e81e5d2fc0..bd1549f55d 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties @@ -151,8 +151,10 @@ HashDbManager.fileNameExtensionFilter.title=Hash Set File HashDbSearchAction.dlgMsg.title=File Search by MD5 Hash HashDbSearchAction.getName.text=Hash Search HashDbSearchPanel.dlgMsg.title=File Search by MD5 Hash -AddContentToHashDbAction.singleSelectionName=Add file to hash set -AddContentToHashDbAction.multipleSelectionName=Add files to hash set +AddContentToHashDbAction.singleSelectionName=Add File 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.saveErrorExceptionMsg=Error saving hash configuration HashLookupSettingsPanel.jButton3.text=Import Hash Set diff --git a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/SwingMenuItemAdapter.java b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/SwingMenuItemAdapter.java index 59f48dc094..7fbf75e81b 100644 --- a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/SwingMenuItemAdapter.java +++ b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/SwingMenuItemAdapter.java @@ -55,6 +55,11 @@ class SwingMenuAdapter extends Menu { SwingMenuAdapter(final JMenu jMenu) { super(jMenu.getText()); this.jMenu = jMenu; + if(!jMenu.isEnabled()) { + //Grey out text if the JMenu that this Menu is wrapping is + //not enabled. + setDisable(true); + } buildChildren(jMenu); }