mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-14 00:46:16 +00:00
Added shortcut to timeline view, removed unnecessary hashset construction
This commit is contained in:
parent
e112806bc2
commit
dfdc033a52
@ -74,9 +74,9 @@ public class AddContentTagAction extends AddTagAction {
|
||||
* We don't want VirtualFile and DerivedFile objects to be tagged.
|
||||
*/
|
||||
final Collection<AbstractFile> selectedFiles = new HashSet<>();
|
||||
selectedFiles.addAll(new HashSet<>(Utilities.actionsGlobalContext().lookupAll(FsContent.class)));
|
||||
selectedFiles.addAll(new HashSet<>(Utilities.actionsGlobalContext().lookupAll(LayoutFile.class)));
|
||||
selectedFiles.addAll(new HashSet<>(Utilities.actionsGlobalContext().lookupAll(LocalFile.class)));
|
||||
selectedFiles.addAll(Utilities.actionsGlobalContext().lookupAll(FsContent.class));
|
||||
selectedFiles.addAll(Utilities.actionsGlobalContext().lookupAll(LayoutFile.class));
|
||||
selectedFiles.addAll(Utilities.actionsGlobalContext().lookupAll(LocalFile.class));
|
||||
|
||||
new Thread(() -> {
|
||||
for (AbstractFile file : selectedFiles) {
|
||||
|
@ -109,8 +109,8 @@ public class DataResultTopComponent extends TopComponent implements DataResult,
|
||||
|
||||
setTitle(title); // set the title
|
||||
setName(title);
|
||||
getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke(KeyEvent.VK_B, InputEvent.CTRL_MASK), "addBookmarkTag");
|
||||
getActionMap().put("addBookmarkTag", new BookmarkFileAction());
|
||||
getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke(KeyEvent.VK_B, InputEvent.CTRL_MASK), "addBookmarkTag"); //NON-NLS
|
||||
getActionMap().put("addBookmarkTag", new BookmarkFileAction()); //NON-NLS
|
||||
|
||||
putClientProperty(TopComponent.PROP_CLOSING_DISABLED, isMain); // set option to close compoment in GUI
|
||||
putClientProperty(TopComponent.PROP_MAXIMIZATION_DISABLED, true);
|
||||
|
@ -18,6 +18,7 @@
|
||||
*/
|
||||
package org.sleuthkit.autopsy.timeline;
|
||||
|
||||
import java.awt.event.InputEvent;
|
||||
import java.beans.PropertyVetoException;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
@ -35,6 +36,8 @@ import javafx.scene.input.KeyCodeCombination;
|
||||
import javafx.scene.input.KeyEvent;
|
||||
import javafx.scene.layout.Priority;
|
||||
import javafx.scene.layout.VBox;
|
||||
import javax.swing.JComponent;
|
||||
import javax.swing.KeyStroke;
|
||||
import javax.swing.SwingUtilities;
|
||||
import org.controlsfx.control.Notifications;
|
||||
import org.joda.time.Interval;
|
||||
@ -49,6 +52,7 @@ import org.openide.windows.Mode;
|
||||
import org.openide.windows.TopComponent;
|
||||
import static org.openide.windows.TopComponent.PROP_UNDOCKING_DISABLED;
|
||||
import org.openide.windows.WindowManager;
|
||||
import org.sleuthkit.autopsy.actions.BookmarkFileAction;
|
||||
import org.sleuthkit.autopsy.corecomponents.DataContentPanel;
|
||||
import org.sleuthkit.autopsy.corecomponents.DataResultPanel;
|
||||
import org.sleuthkit.autopsy.coreutils.Logger;
|
||||
@ -200,6 +204,9 @@ public final class TimeLineTopComponent extends TopComponent implements Explorer
|
||||
setToolTipText(NbBundle.getMessage(TimeLineTopComponent.class, "HINT_TimeLineTopComponent"));
|
||||
setIcon(WindowManager.getDefault().getMainWindow().getIconImage()); //use the same icon as main application
|
||||
|
||||
getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_B, InputEvent.CTRL_MASK), "addBookmarkTag"); //NON-NLS
|
||||
getActionMap().put("addBookmarkTag", new BookmarkFileAction()); //NON-NLS
|
||||
|
||||
this.controller = controller;
|
||||
|
||||
//create linked result and content views
|
||||
|
@ -225,7 +225,7 @@ public class DrawableTagsManager {
|
||||
try {
|
||||
return autopsyTagsManager.addTagName(displayName);
|
||||
} catch (TagsManager.TagNameAlreadyExistsException ex) {
|
||||
throw new TskCoreException("tagame exists but wasn't found", ex);
|
||||
throw new TskCoreException("tag name exists but wasn't found", ex);
|
||||
}
|
||||
} catch (NullPointerException | IllegalStateException ex) {
|
||||
LOGGER.log(Level.SEVERE, "Case was closed out from underneath", ex); //NON-NLS
|
||||
|
Loading…
x
Reference in New Issue
Block a user