mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 16:06:15 +00:00
5316 hide file search by attributes instead of disposing of it.
This commit is contained in:
parent
464f96baad
commit
2b528fd792
@ -31,9 +31,11 @@ final class FileSearchAction extends CallableSystemAction implements FileSearchP
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static FileSearchAction instance = null;
|
||||
private static final FileSearchDialog searchDialog = new FileSearchDialog();
|
||||
|
||||
FileSearchAction() {
|
||||
super();
|
||||
searchDialog.setVisible(false);
|
||||
setEnabled(Case.isCaseOpen());
|
||||
Case.addEventTypeSubscriber(EnumSet.of(Case.Events.CURRENT_CASE), (PropertyChangeEvent evt) -> {
|
||||
if (evt.getPropertyName().equals(Case.Events.CURRENT_CASE.toString())) {
|
||||
@ -51,12 +53,12 @@ final class FileSearchAction extends CallableSystemAction implements FileSearchP
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
new FileSearchDialog().setVisible(true);
|
||||
searchDialog.setVisible(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void performAction() {
|
||||
new FileSearchDialog().setVisible(true);
|
||||
searchDialog.setVisible(true);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -27,12 +27,12 @@ import org.openide.windows.WindowManager;
|
||||
* File search dialog
|
||||
*/
|
||||
@SuppressWarnings("PMD.SingularField") // UI widgets cause lots of false positives
|
||||
class FileSearchDialog extends javax.swing.JDialog {
|
||||
final class FileSearchDialog extends javax.swing.JDialog {
|
||||
|
||||
/**
|
||||
* Creates new form FileSearchDialog
|
||||
*/
|
||||
public FileSearchDialog() {
|
||||
FileSearchDialog() {
|
||||
super(WindowManager.getDefault().getMainWindow(),
|
||||
NbBundle.getMessage(FileSearchDialog.class, "FileSearchDialog.frame.msg"), true);
|
||||
initComponents();
|
||||
@ -43,7 +43,7 @@ class FileSearchDialog extends javax.swing.JDialog {
|
||||
|
||||
@Override
|
||||
public void actionPerformed(ActionEvent e) {
|
||||
dispose();
|
||||
setVisible(false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user