From f6d031ff8bd9dbe6daf377896a5781d859930824 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dsmyda" Date: Wed, 26 Sep 2018 13:17:13 -0400 Subject: [PATCH 1/7] Changed greyed out text to specify that ingest is running, to avoid confusion on why it is temporarily disabled --- .../hashdatabase/AddContentToHashDbAction.java | 13 +++++++++++-- .../autopsy/modules/hashdatabase/Bundle.properties | 2 ++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/AddContentToHashDbAction.java b/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/AddContentToHashDbAction.java index 6086596be2..bd45960b7d 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/AddContentToHashDbAction.java +++ b/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/AddContentToHashDbAction.java @@ -48,6 +48,10 @@ final class AddContentToHashDbAction extends AbstractAction implements Presenter "AddContentToHashDbAction.singleSelectionName"); private final static String MULTIPLE_SELECTION_NAME = NbBundle.getMessage(AddContentToHashDbAction.class, "AddContentToHashDbAction.multipleSelectionName"); + private final static String SINGLE_SELECTION_DURING_INGEST_NAME = NbBundle.getMessage(AddContentToHashDbAction.class, + "AddContentToHashDbAction.singleSelectionNameDuringIngest"); + private final static String MULTIPLE_SELECTION_DURING_INGEST_NAME = NbBundle.getMessage(AddContentToHashDbAction.class, + "AddContentToHashDbAction.multipleSelectionNameDuringIngest"); /** * AddContentToHashDbAction is a singleton to support multi-selection of @@ -80,15 +84,20 @@ 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) { + setText(MULTIPLE_SELECTION_DURING_INGEST_NAME); + } else { + setText(SINGLE_SELECTION_DURING_INGEST_NAME); + } 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..85b438cab7 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties @@ -153,6 +153,8 @@ 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.singleSelectionNameDuringIngest=Add file to hash set (ingest running) +AddContentToHashDbAction.multipleSelectionNameDuringIngest=Add files to hash set (ingest 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 From c0d87ba027ea04377ec6fd7685ecb8ae46061995 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dsmyda" Date: Wed, 26 Sep 2018 13:21:12 -0400 Subject: [PATCH 2/7] Added the word is --- .../sleuthkit/autopsy/modules/hashdatabase/Bundle.properties | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties b/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties index 85b438cab7..597f8a8e8b 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties @@ -153,8 +153,8 @@ 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.singleSelectionNameDuringIngest=Add file to hash set (ingest running) -AddContentToHashDbAction.multipleSelectionNameDuringIngest=Add files to hash set (ingest running) +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 From 5dd166f7252b42edf46243964c948cefa951f283 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dsmyda" Date: Wed, 26 Sep 2018 13:29:46 -0400 Subject: [PATCH 3/7] added one comment --- .../autopsy/modules/hashdatabase/AddContentToHashDbAction.java | 1 + 1 file changed, 1 insertion(+) diff --git a/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/AddContentToHashDbAction.java b/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/AddContentToHashDbAction.java index bd45960b7d..1865982695 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/AddContentToHashDbAction.java +++ b/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/AddContentToHashDbAction.java @@ -91,6 +91,7 @@ final class AddContentToHashDbAction extends AbstractAction implements Presenter if (IngestManager.getInstance().isIngestRunning()) { setEnabled(false); if(selectedFiles.size() > 1) { + //Displays: 'Add files to hash set (ingest is running)' setText(MULTIPLE_SELECTION_DURING_INGEST_NAME); } else { setText(SINGLE_SELECTION_DURING_INGEST_NAME); From 60591d0e5955272fac568a9fdde5331c13adc560 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dsmyda" Date: Wed, 26 Sep 2018 13:34:01 -0400 Subject: [PATCH 4/7] Swapped naming schema around just a little bit --- .../modules/hashdatabase/AddContentToHashDbAction.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/AddContentToHashDbAction.java b/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/AddContentToHashDbAction.java index 1865982695..e7493f58ff 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/AddContentToHashDbAction.java +++ b/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/AddContentToHashDbAction.java @@ -48,9 +48,9 @@ final class AddContentToHashDbAction extends AbstractAction implements Presenter "AddContentToHashDbAction.singleSelectionName"); private final static String MULTIPLE_SELECTION_NAME = NbBundle.getMessage(AddContentToHashDbAction.class, "AddContentToHashDbAction.multipleSelectionName"); - private final static String SINGLE_SELECTION_DURING_INGEST_NAME = NbBundle.getMessage(AddContentToHashDbAction.class, + private final static String SINGLE_SELECTION_NAME_DURING_INGEST = NbBundle.getMessage(AddContentToHashDbAction.class, "AddContentToHashDbAction.singleSelectionNameDuringIngest"); - private final static String MULTIPLE_SELECTION_DURING_INGEST_NAME = NbBundle.getMessage(AddContentToHashDbAction.class, + private final static String MULTIPLE_SELECTION_NAME_DURING_INGEST = NbBundle.getMessage(AddContentToHashDbAction.class, "AddContentToHashDbAction.multipleSelectionNameDuringIngest"); /** @@ -92,9 +92,9 @@ final class AddContentToHashDbAction extends AbstractAction implements Presenter setEnabled(false); if(selectedFiles.size() > 1) { //Displays: 'Add files to hash set (ingest is running)' - setText(MULTIPLE_SELECTION_DURING_INGEST_NAME); + setText(MULTIPLE_SELECTION_NAME_DURING_INGEST); } else { - setText(SINGLE_SELECTION_DURING_INGEST_NAME); + setText(SINGLE_SELECTION_NAME_DURING_INGEST); } return; } From 65c25d84388401804107d94bb4bb0788797c6028 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dsmyda" Date: Thu, 27 Sep 2018 09:39:09 -0400 Subject: [PATCH 5/7] Fixed Image galley hashset not being greyed out bug --- .../modules/hashdatabase/AddContentToHashDbAction.java | 6 +++--- .../autopsy/imagegallery/actions/SwingMenuItemAdapter.java | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/AddContentToHashDbAction.java b/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/AddContentToHashDbAction.java index e7493f58ff..90cb400cf4 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/AddContentToHashDbAction.java +++ b/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/AddContentToHashDbAction.java @@ -42,7 +42,7 @@ 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"); @@ -86,16 +86,16 @@ final class AddContentToHashDbAction extends AbstractAction implements Presenter 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; } 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); } From dc01e2301c1785b0ae2e9a6ac44e089780655075 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dsmyda" Date: Thu, 27 Sep 2018 09:46:33 -0400 Subject: [PATCH 6/7] Fixed capitalization --- .../autopsy/modules/hashdatabase/Bundle.properties | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties b/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties index 597f8a8e8b..bd1549f55d 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties +++ b/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/Bundle.properties @@ -151,10 +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.singleSelectionNameDuringIngest=Add file to hash set (ingest is running) -AddContentToHashDbAction.multipleSelectionNameDuringIngest=Add files to hash set (ingest is running) +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 From 0f9b42b9c26f485978161999bbeeeeb857747353 Mon Sep 17 00:00:00 2001 From: "U-BASIS\\dsmyda" Date: Thu, 27 Sep 2018 09:53:20 -0400 Subject: [PATCH 7/7] Fixed a comment --- .../autopsy/modules/hashdatabase/AddContentToHashDbAction.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/AddContentToHashDbAction.java b/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/AddContentToHashDbAction.java index 90cb400cf4..6dcebb7d7f 100644 --- a/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/AddContentToHashDbAction.java +++ b/Core/src/org/sleuthkit/autopsy/modules/hashdatabase/AddContentToHashDbAction.java @@ -90,7 +90,7 @@ final class AddContentToHashDbAction extends AbstractAction implements Presenter // Disable the menu if file ingest is in progress. if (IngestManager.getInstance().isIngestRunning()) { if(selectedFiles.size() > 1) { - //Displays: 'Add files to hash set (ingest is running)' + //Displays: 'Add Files to Hash Set (Ingest is running)' setText(MULTIPLE_SELECTION_NAME_DURING_INGEST); } else { setText(SINGLE_SELECTION_NAME_DURING_INGEST);