Merge pull request #2619 from wschaeferB/2409-WarningDialogCorrection

2409 Warning dialog for unnamed filter fixed
This commit is contained in:
Richard Cordovano 2017-03-21 10:23:08 -04:00 committed by GitHub
commit 4a6bb19a27
3 changed files with 9 additions and 4 deletions

View File

@ -9,7 +9,7 @@ OptionsCategory_Keywords_FileIngestFilterDefinitions=FileIngestFilterDefinitions
InterestingItemsIdentifierIngestModule.moduleName=Interesting Files Identifier InterestingItemsIdentifierIngestModule.moduleName=Interesting Files Identifier
InterestingItemsIdentifierIngestModule.moduleDescription=Identifies interesting items as defined by interesting item rule sets. InterestingItemsIdentifierIngestModule.moduleDescription=Identifies interesting items as defined by interesting item rule sets.
FilesSetPanel.interesting.title=Interesting Files Set FilesSetPanel.interesting.title=Interesting Files Set
FilesSetPanel.messages.filesSetsMustBeNamed=Interesting files sets must be named. FilesSetPanel.interesting.messages.filesSetsMustBeNamed=Interesting files sets must be named.
FilesSetPanel.messages.filesSetsReservedName=You have chosen a name reserved by the software, please choose a different name. FilesSetPanel.messages.filesSetsReservedName=You have chosen a name reserved by the software, please choose a different name.
FilesSetPanel.ignoreKnownFilesCheckbox.text=Ignore Known Files FilesSetPanel.ignoreKnownFilesCheckbox.text=Ignore Known Files
FilesSetPanel.descriptionPanel.border.title=Description FilesSetPanel.descriptionPanel.border.title=Description

View File

@ -2,7 +2,7 @@ FilesIdentifierIngestJobSettingsPanel.border.title=\u30a4\u30f3\u30b8\u30a7\u30b
FilesSetPanel.descPanel.border.title=\u6982\u8981 FilesSetPanel.descPanel.border.title=\u6982\u8981
FilesSetPanel.descriptionPanel.border.title=\u6982\u8981 FilesSetPanel.descriptionPanel.border.title=\u6982\u8981
FilesSetPanel.ignoreKnownFilesCheckbox.text=\u65e2\u77e5\u30d5\u30a1\u30a4\u30eb\u3092\u7121\u8996 FilesSetPanel.ignoreKnownFilesCheckbox.text=\u65e2\u77e5\u30d5\u30a1\u30a4\u30eb\u3092\u7121\u8996
FilesSetPanel.messages.filesSetsMustBeNamed=\u7591\u308f\u3057\u3044\u30d5\u30a1\u30a4\u30eb\u30bb\u30c3\u30c8\u306f\u540d\u524d\u304c\u5fc5\u8981\u3067\u3059\u3002 FilesSetPanel.interesting.messages.filesSetsMustBeNamed=\u7591\u308f\u3057\u3044\u30d5\u30a1\u30a4\u30eb\u30bb\u30c3\u30c8\u306f\u540d\u524d\u304c\u5fc5\u8981\u3067\u3059\u3002
FilesSetPanel.interesting.nameLabel.text=\u30bb\u30c3\u30c8\u540d\uff1a FilesSetPanel.interesting.nameLabel.text=\u30bb\u30c3\u30c8\u540d\uff1a
FilesSetPanel.title=\u7591\u308f\u3057\u3044\u30d5\u30a1\u30a4\u30eb\u30bb\u30c3\u30c8 FilesSetPanel.title=\u7591\u308f\u3057\u3044\u30d5\u30a1\u30a4\u30eb\u30bb\u30c3\u30c8
FilesSetRulePanel.extensionRadioButton.text=\u62e1\u5f35\u5b50\u306e\u307f FilesSetRulePanel.extensionRadioButton.text=\u62e1\u5f35\u5b50\u306e\u307f

View File

@ -29,9 +29,10 @@ import org.sleuthkit.autopsy.modules.interestingitems.FilesSetDefsPanel.PANEL_TY
*/ */
public class FilesSetPanel extends javax.swing.JPanel { public class FilesSetPanel extends javax.swing.JPanel {
@NbBundle.Messages({"FilesSetPanel.ingest.title=File Ingest Filter", "FilesSetPanel.ingest.createNewFilter=Create/edit file ingest filter(s)..."}) @NbBundle.Messages({"FilesSetPanel.ingest.title=File Ingest Filter", "FilesSetPanel.ingest.createNewFilter=Create/edit file ingest filter(s)...", "FilesSetPanel.ingest.messages.filtersMustBeNamed=File ingest filters must be named."})
private static final String CREATE_NEW_FILE_INGEST_FILTER = Bundle.FilesSetPanel_ingest_createNewFilter(); private static final String CREATE_NEW_FILE_INGEST_FILTER = Bundle.FilesSetPanel_ingest_createNewFilter();
private final String mustBeNamedErrorText;
/** /**
* @return the CREATE_NEW_FILE_INGEST_FILTER * @return the CREATE_NEW_FILE_INGEST_FILTER
@ -47,8 +48,10 @@ public class FilesSetPanel extends javax.swing.JPanel {
initComponents(); initComponents();
if (panelType == PANEL_TYPE.FILE_INGEST_FILTERS) { if (panelType == PANEL_TYPE.FILE_INGEST_FILTERS) {
ignoreKnownFilesCheckbox.setVisible(false); ignoreKnownFilesCheckbox.setVisible(false);
mustBeNamedErrorText = NbBundle.getMessage(FilesSetPanel.class, "FilesSetPanel.ingest.messages.filtersMustBeNamed");
org.openide.awt.Mnemonics.setLocalizedText(nameLabel, org.openide.util.NbBundle.getMessage(FilesSetPanel.class, "FilesSetPanel.ingest.nameLabel.text")); // NOI18N org.openide.awt.Mnemonics.setLocalizedText(nameLabel, org.openide.util.NbBundle.getMessage(FilesSetPanel.class, "FilesSetPanel.ingest.nameLabel.text")); // NOI18N
} else { } else {
mustBeNamedErrorText = NbBundle.getMessage(FilesSetPanel.class, "FilesSetPanel.interesting.messages.filesSetsMustBeNamed");
ignoreUnallocCheckbox.setVisible(false); ignoreUnallocCheckbox.setVisible(false);
} }
} }
@ -62,8 +65,10 @@ public class FilesSetPanel extends javax.swing.JPanel {
initComponents(); initComponents();
if (panelType == PANEL_TYPE.FILE_INGEST_FILTERS) { if (panelType == PANEL_TYPE.FILE_INGEST_FILTERS) {
ignoreKnownFilesCheckbox.setVisible(false); ignoreKnownFilesCheckbox.setVisible(false);
mustBeNamedErrorText = NbBundle.getMessage(FilesSetPanel.class, "FilesSetPanel.ingest.messages.filtersMustBeNamed");
} else { } else {
ignoreUnallocCheckbox.setVisible(false); ignoreUnallocCheckbox.setVisible(false);
mustBeNamedErrorText = NbBundle.getMessage(FilesSetPanel.class, "FilesSetPanel.interesting.messages.filesSetsMustBeNamed");
} }
this.nameTextField.setText(filesSet.getName()); this.nameTextField.setText(filesSet.getName());
this.descTextArea.setText(filesSet.getDescription()); this.descTextArea.setText(filesSet.getDescription());
@ -81,7 +86,7 @@ public class FilesSetPanel extends javax.swing.JPanel {
boolean isValidDefinition() { boolean isValidDefinition() {
if (this.nameTextField.getText().isEmpty()) { if (this.nameTextField.getText().isEmpty()) {
NotifyDescriptor notifyDesc = new NotifyDescriptor.Message( NotifyDescriptor notifyDesc = new NotifyDescriptor.Message(
NbBundle.getMessage(FilesSetPanel.class, "FilesSetPanel.messages.filesSetsMustBeNamed"), mustBeNamedErrorText,
NotifyDescriptor.WARNING_MESSAGE); NotifyDescriptor.WARNING_MESSAGE);
DialogDisplayer.getDefault().notify(notifyDesc); DialogDisplayer.getDefault().notify(notifyDesc);
return false; return false;