From 35f84dce94484a1cc61436b07bc6594768667bd9 Mon Sep 17 00:00:00 2001 From: Richard Cordovano Date: Wed, 25 Oct 2017 12:39:47 -0400 Subject: [PATCH 1/3] Modify construction of KeywordSearchGlobalSettingsPanel --- .../keywordsearch/KeywordSearchGlobalSettingsPanel.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchGlobalSettingsPanel.java b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchGlobalSettingsPanel.java index 93fa053dd4..8e820b4c74 100755 --- a/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchGlobalSettingsPanel.java +++ b/KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/KeywordSearchGlobalSettingsPanel.java @@ -29,9 +29,9 @@ import org.sleuthkit.autopsy.ingest.IngestModuleGlobalSettingsPanel; final class KeywordSearchGlobalSettingsPanel extends IngestModuleGlobalSettingsPanel implements OptionsPanel { private static final long serialVersionUID = 1L; - private GlobalListSettingsPanel listsPanel; - private KeywordSearchGlobalLanguageSettingsPanel languagesPanel; - private KeywordSearchGlobalSearchSettingsPanel generalPanel; + private final GlobalListSettingsPanel listsPanel = new GlobalListSettingsPanel(); + private final KeywordSearchGlobalLanguageSettingsPanel languagesPanel = new KeywordSearchGlobalLanguageSettingsPanel(); + private final KeywordSearchGlobalSearchSettingsPanel generalPanel = new KeywordSearchGlobalSearchSettingsPanel(); KeywordSearchGlobalSettingsPanel() { initComponents(); @@ -41,9 +41,6 @@ final class KeywordSearchGlobalSettingsPanel extends IngestModuleGlobalSettingsP @NbBundle.Messages({"KeywordSearchGlobalSettingsPanel.Title=Global Keyword Search Settings"}) private void customizeComponents() { setName(Bundle.KeywordSearchGlobalSettingsPanel_Title()); - listsPanel = new GlobalListSettingsPanel(); - languagesPanel = new KeywordSearchGlobalLanguageSettingsPanel(); - generalPanel = new KeywordSearchGlobalSearchSettingsPanel(); tabbedPane.insertTab(NbBundle.getMessage(this.getClass(), "KeywordSearchConfigurationPanel.customizeComponents.listTabTitle"), null, listsPanel, NbBundle.getMessage(this.getClass(), "KeywordSearchConfigurationPanel.customizeComponents.listLabToolTip"), 0); tabbedPane.insertTab(NbBundle.getMessage(this.getClass(), "KeywordSearchConfigurationPanel.customizeComponents.stringExtTitle"), null, From 3c66cc242b3e417570f08499292e01ccb185c57f Mon Sep 17 00:00:00 2001 From: millmanorama Date: Thu, 26 Oct 2017 17:11:11 +0200 Subject: [PATCH 2/3] set initial sort to Priority and initialize toolbar from GroupManager --- .../autopsy/imagegallery/datamodel/grouping/GroupManager.java | 4 ++-- .../src/org/sleuthkit/autopsy/imagegallery/gui/Toolbar.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/grouping/GroupManager.java b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/grouping/GroupManager.java index ae9e17bb4a..8a934cda98 100755 --- a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/grouping/GroupManager.java +++ b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/datamodel/grouping/GroupManager.java @@ -122,7 +122,7 @@ public class GroupManager { /* * --- current grouping/sorting attributes --- */ - private volatile GroupSortBy sortBy = GroupSortBy.NONE; + private volatile GroupSortBy sortBy = GroupSortBy.PRIORITY; private volatile DrawableAttribute groupBy = DrawableAttribute.PATH; private volatile SortOrder sortOrder = SortOrder.ASCENDING; @@ -466,7 +466,7 @@ public class GroupManager { } } - public Comparator getSortBy() { + public GroupSortBy getSortBy() { return sortBy; } diff --git a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/gui/Toolbar.java b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/gui/Toolbar.java index 2dc85cbfd9..90c739287e 100755 --- a/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/gui/Toolbar.java +++ b/ImageGallery/src/org/sleuthkit/autopsy/imagegallery/gui/Toolbar.java @@ -189,7 +189,7 @@ public class Toolbar extends ToolBar { }); sortChooser.sortOrderProperty().addListener(queryInvalidationListener); - sortChooser.setComparator(GroupSortBy.PRIORITY); + sortChooser.setComparator(controller.getGroupManager().getSortBy()); getItems().add(1, sortChooser); sortHelpImageView.setCursor(Cursor.HAND); From 13f16c417de559662561418861ab87863d315f2d Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Fri, 27 Oct 2017 13:44:28 -0400 Subject: [PATCH 3/3] 3153 - sort Priority column in descending order --- .../experimental/autoingest/AutoIngestControlPanel.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestControlPanel.java b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestControlPanel.java index 26dcabff58..25b29e3665 100755 --- a/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestControlPanel.java +++ b/Experimental/src/org/sleuthkit/autopsy/experimental/autoingest/AutoIngestControlPanel.java @@ -1862,8 +1862,8 @@ public final class AutoIngestControlPanel extends JPanel implements Observer { @Override public void toggleSortOrder(int column) { - if (!this.getModel().getColumnClass(column).equals(Date.class)) { - super.toggleSortOrder(column); //if it isn't a date perform the regular sorting + if (!this.getModel().getColumnClass(column).equals(Date.class) && !(this.getModel().getColumnName(column).equals(JobsTableModelColumns.PRIORITY.getColumnHeader()))) { + super.toggleSortOrder(column); //if it isn't a date or the Priority column perform the regular sorting } else { ArrayList sortKeys = new ArrayList<>(getSortKeys()); if (sortKeys.isEmpty() || sortKeys.get(0).getColumn() != column) { //sort descending