diff --git a/Core/src/org/sleuthkit/autopsy/actions/DeleteFileBlackboardArtifactTagAction.java b/Core/src/org/sleuthkit/autopsy/actions/DeleteFileBlackboardArtifactTagAction.java index afb17804b7..d9fd5d364f 100755 --- a/Core/src/org/sleuthkit/autopsy/actions/DeleteFileBlackboardArtifactTagAction.java +++ b/Core/src/org/sleuthkit/autopsy/actions/DeleteFileBlackboardArtifactTagAction.java @@ -174,10 +174,6 @@ public class DeleteFileBlackboardArtifactTagAction extends AbstractAction implem for(BlackboardArtifactTag artifactTag : existingTagsList) { if(tagDisplayName.equals(artifactTag.getName().getDisplayName())) { JMenuItem tagNameItem = new JMenuItem(tagDisplayName); - // for the bookmark tag name only, added shortcut label - if (tagDisplayName.equals(NbBundle.getMessage(AddTagAction.class, "AddBookmarkTagAction.bookmark.text"))) { - tagNameItem.setAccelerator(AddBookmarkTagAction.BOOKMARK_SHORTCUT); - } tagNameItem.addActionListener((ActionEvent e) -> { deleteTag(tagName, artifactTag, artifact.getArtifactID()); }); diff --git a/Core/src/org/sleuthkit/autopsy/actions/DeleteFileContentTagAction.java b/Core/src/org/sleuthkit/autopsy/actions/DeleteFileContentTagAction.java index 5cc37e3900..e49e0f9170 100755 --- a/Core/src/org/sleuthkit/autopsy/actions/DeleteFileContentTagAction.java +++ b/Core/src/org/sleuthkit/autopsy/actions/DeleteFileContentTagAction.java @@ -159,8 +159,6 @@ public class DeleteFileContentTagAction extends AbstractAction implements Presen // a tag with the associated tag name. if (null != tagNamesMap && !tagNamesMap.isEmpty()) { try { - /*List existingTagsList = - Case.getCurrentCase().getServices().getTagsManager().getBlackboardArtifactTagsByArtifact(artifact);*/ List existingTagsList = Case.getCurrentCase().getServices().getTagsManager() .getContentTagsByContent(file); @@ -172,10 +170,6 @@ public class DeleteFileContentTagAction extends AbstractAction implements Presen for(ContentTag contentTag : existingTagsList) { if(tagDisplayName.equals(contentTag.getName().getDisplayName())) { JMenuItem tagNameItem = new JMenuItem(tagDisplayName); - // for the bookmark tag name only, added shortcut label - if (tagDisplayName.equals(NbBundle.getMessage(AddTagAction.class, "AddBookmarkTagAction.bookmark.text"))) { - tagNameItem.setAccelerator(AddBookmarkTagAction.BOOKMARK_SHORTCUT); - } tagNameItem.addActionListener((ActionEvent e) -> { deleteTag(tagName, contentTag, file.getId()); }); diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/HashsetHits.java b/Core/src/org/sleuthkit/autopsy/datamodel/HashsetHits.java index d07a0c3ba3..2665894481 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/HashsetHits.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/HashsetHits.java @@ -382,8 +382,8 @@ public class HashsetHits implements AutopsyVisitableItem { if (!artifactHits.containsKey(id)) { BlackboardArtifact art = skCase.getBlackboardArtifact(id); artifactHits.put(id, art); - list.add(id); } + list.add(id); } catch (TskException ex) { logger.log(Level.SEVERE, "TSK Exception occurred", ex); //NON-NLS } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/InterestingHits.java b/Core/src/org/sleuthkit/autopsy/datamodel/InterestingHits.java index f089727da4..748ab48da9 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/InterestingHits.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/InterestingHits.java @@ -356,10 +356,9 @@ public class InterestingHits implements AutopsyVisitableItem { try { if (!artifactHits.containsKey(id)) { BlackboardArtifact art = skCase.getBlackboardArtifact(id); - - artifactHits.put(id, art); - list.add(id); + artifactHits.put(id, art); } + list.add(id); } catch (TskCoreException ex) { logger.log(Level.SEVERE, "TSK Exception occurred", ex); //NON-NLS } diff --git a/Core/src/org/sleuthkit/autopsy/datamodel/KeywordHits.java b/Core/src/org/sleuthkit/autopsy/datamodel/KeywordHits.java index 19fb871e1d..ccc2b3c9e7 100644 --- a/Core/src/org/sleuthkit/autopsy/datamodel/KeywordHits.java +++ b/Core/src/org/sleuthkit/autopsy/datamodel/KeywordHits.java @@ -708,18 +708,17 @@ public class KeywordHits implements AutopsyVisitableItem { for (Long id : keywordResults.getArtifactIds(setName, keyword, DEFAULT_INSTANCE_NAME) ) { RegExpInstanceKey key = new RegExpInstanceKey(id); if (!nodesMap.containsKey(key)) { - nodesMap.put(key, createNode(key)); - list.add(key); + nodesMap.put(key, createNode(key)); } - + list.add(key); } } else { for (String instance : instances) { RegExpInstanceKey key = new RegExpInstanceKey(instance); if (!nodesMap.containsKey(key)) { nodesMap.put(key, createNode(key)); - list.add(key); } + list.add(key); } } @@ -904,8 +903,8 @@ public class KeywordHits implements AutopsyVisitableItem { for (Long id : keywordResults.getArtifactIds(setName, keyword, instance) ) { if (!nodesMap.containsKey(id)) { nodesMap.put(id, createBlackboardArtifactNode(id)); - list.add(id); } + list.add(id); } return true; } diff --git a/Core/src/org/sleuthkit/autopsy/timeline/explorernodes/EventRootNode.java b/Core/src/org/sleuthkit/autopsy/timeline/explorernodes/EventRootNode.java index c699c6cac8..1b35d90188 100644 --- a/Core/src/org/sleuthkit/autopsy/timeline/explorernodes/EventRootNode.java +++ b/Core/src/org/sleuthkit/autopsy/timeline/explorernodes/EventRootNode.java @@ -102,14 +102,14 @@ public class EventRootNode extends DisplayableItemNode { for (Long eventId: eventIDs){ if (!nodesMap.containsKey(eventId)) { nodesMap.put(eventId, createNode(eventId)); - toPopulate.add(eventId); } + toPopulate.add(eventId); } } else { if (!nodesMap.containsKey(-1L)) { nodesMap.put(-1L, createNode(-1L)); - toPopulate.add(-1L); } + toPopulate.add(-1L); } return true; } diff --git a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/OpenAction.java b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/OpenAction.java index 661a895db9..71ff3681a5 100755 --- a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/OpenAction.java +++ b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/actions/OpenAction.java @@ -35,6 +35,7 @@ import org.openide.util.actions.Presenter; import org.openide.windows.WindowManager; import org.sleuthkit.autopsy.casemodule.Case; import org.sleuthkit.autopsy.core.Installer; +import org.sleuthkit.autopsy.core.RuntimeProperties; import org.sleuthkit.autopsy.coreutils.Logger; import org.sleuthkit.autopsy.imagegallery.ImageGalleryController; import org.sleuthkit.autopsy.imagegallery.ImageGalleryModule; @@ -64,7 +65,7 @@ public final class OpenAction extends CallableSystemAction implements Presenter. toolbarButton.addActionListener(actionEvent -> performAction()); pcl = (PropertyChangeEvent evt) -> { if (evt.getPropertyName().equals(Case.Events.CURRENT_CASE.toString())) { - setEnabled(evt.getNewValue() != null); + setEnabled(RuntimeProperties.runningWithGUI() && evt.getNewValue() != null); } }; Case.addPropertyChangeListener(pcl);