mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Disable file search action when Case closed
This commit is contained in:
parent
17e1381645
commit
a1c3e1e9f5
@ -19,11 +19,31 @@
|
||||
package org.sleuthkit.autopsy.filesearch;
|
||||
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import org.openide.util.HelpCtx;
|
||||
import org.openide.util.actions.CallableSystemAction;
|
||||
import org.sleuthkit.autopsy.casemodule.Case;
|
||||
|
||||
public final class FileSearchAction extends CallableSystemAction {
|
||||
|
||||
FileSearchAction() {
|
||||
super();
|
||||
setEnabled(false);
|
||||
|
||||
Case.addPropertyChangeListener(new PropertyChangeListener() {
|
||||
|
||||
@Override
|
||||
public void propertyChange(PropertyChangeEvent evt) {
|
||||
if(evt.getPropertyName().equals(Case.CASE_CURRENT_CASE)){
|
||||
setEnabled(evt.getNewValue() != null);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
new FileSearchDialog().setVisible(true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user