mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
4275 add listener for ingest events to 2nd and 3rd kws options tab
This commit is contained in:
parent
de0fe30962
commit
c95f634a30
@ -18,9 +18,12 @@
|
||||
*/
|
||||
package org.sleuthkit.autopsy.keywordsearch;
|
||||
|
||||
import java.awt.EventQueue;
|
||||
import java.awt.GridLayout;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
@ -70,6 +73,19 @@ class KeywordSearchGlobalLanguageSettingsPanel extends javax.swing.JPanel implem
|
||||
|
||||
initScriptsCheckBoxes();
|
||||
reloadScriptsCheckBoxes();
|
||||
|
||||
//allow panel to toggle its enabled status while it is open based on ingest events
|
||||
IngestManager.getInstance().addIngestJobEventListener(new PropertyChangeListener() {
|
||||
@Override
|
||||
public void propertyChange(PropertyChangeEvent evt) {
|
||||
Object source = evt.getSource();
|
||||
if (source instanceof String && ((String) source).equals("LOCAL")) { //NON-NLS
|
||||
EventQueue.invokeLater(() -> {
|
||||
activateWidgets();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void activateScriptsCheckboxes(boolean activate) {
|
||||
|
@ -18,6 +18,7 @@
|
||||
*/
|
||||
package org.sleuthkit.autopsy.keywordsearch;
|
||||
|
||||
import java.awt.EventQueue;
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.util.logging.Level;
|
||||
@ -385,5 +386,18 @@ class KeywordSearchGlobalSearchSettingsPanel extends javax.swing.JPanel implemen
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//allow panel to toggle its enabled status while it is open based on ingest events
|
||||
IngestManager.getInstance().addIngestJobEventListener(new PropertyChangeListener() {
|
||||
@Override
|
||||
public void propertyChange(PropertyChangeEvent evt) {
|
||||
Object source = evt.getSource();
|
||||
if (source instanceof String && ((String) source).equals("LOCAL")) { //NON-NLS
|
||||
EventQueue.invokeLater(() -> {
|
||||
activateWidgets();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user