mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 16:06:15 +00:00
Fixed saving of user defined file types.
This commit is contained in:
parent
79857ba962
commit
9750c10c16
@ -360,6 +360,9 @@
|
||||
<ResourceString bundle="org/sleuthkit/autopsy/modules/filetypeid/Bundle.properties" key="FileTypeIdGlobalSettingsPanel.deleteSigButton.text" replaceFormat="org.openide.util.NbBundle.getMessage({sourceFileName}.class, "{key}")"/>
|
||||
</Property>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="deleteSigButtonActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
|
@ -292,6 +292,7 @@ final class FileTypeIdGlobalSettingsPanel extends IngestModuleGlobalSettingsPane
|
||||
postHitCheckBox.setSelected(false);
|
||||
filesSetNameTextField.setText(""); //NON-NLS
|
||||
filesSetNameTextField.setEnabled(false);
|
||||
this.signaturesListModel.clear();
|
||||
enableButtons();
|
||||
}
|
||||
|
||||
@ -443,6 +444,11 @@ final class FileTypeIdGlobalSettingsPanel extends IngestModuleGlobalSettingsPane
|
||||
org.openide.awt.Mnemonics.setLocalizedText(editSigButton, org.openide.util.NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "FileTypeIdGlobalSettingsPanel.editSigButton.text")); // NOI18N
|
||||
|
||||
org.openide.awt.Mnemonics.setLocalizedText(deleteSigButton, org.openide.util.NbBundle.getMessage(FileTypeIdGlobalSettingsPanel.class, "FileTypeIdGlobalSettingsPanel.deleteSigButton.text")); // NOI18N
|
||||
deleteSigButton.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
deleteSigButtonActionPerformed(evt);
|
||||
}
|
||||
});
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
@ -614,6 +620,13 @@ final class FileTypeIdGlobalSettingsPanel extends IngestModuleGlobalSettingsPane
|
||||
}
|
||||
}//GEN-LAST:event_addButtonMousePressed
|
||||
|
||||
private void deleteSigButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_deleteSigButtonActionPerformed
|
||||
signaturesListModel.removeElementAt(this.signatureList.getSelectedIndex());
|
||||
if (!this.signaturesListModel.isEmpty()) {
|
||||
signatureList.setSelectedIndex(0);
|
||||
}
|
||||
}//GEN-LAST:event_deleteSigButtonActionPerformed
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton addSigButton;
|
||||
private javax.swing.JButton deleteSigButton;
|
||||
|
@ -321,7 +321,7 @@ final class UserDefinedFileTypesManager {
|
||||
* types.
|
||||
*/
|
||||
synchronized void setUserDefinedFileTypes(List<FileType> newFileTypes) throws UserDefinedFileTypesException {
|
||||
String filePath = getFileTypeDefinitionsFilePath(USER_DEFINED_TYPES_XML_FILE);
|
||||
String filePath = getFileTypeDefinitionsFilePath(USER_DEFINED_TYPES_SERIALIZATION_FILE);
|
||||
writeFileTypes(newFileTypes, filePath);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user