Skip to content

Commit

Permalink
Remove option "Reject Lirc imports without timing". Resolves #522.
Browse files Browse the repository at this point in the history
  • Loading branch information
bengtmartensson committed Mar 10, 2024
1 parent 086fb89 commit 1313006
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 31 deletions.
11 changes: 0 additions & 11 deletions src/main/java/org/harctoolbox/irscrutinizer/GuiMain.form
Original file line number Diff line number Diff line change
Expand Up @@ -2193,17 +2193,6 @@
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="girrAcceptEmptyCommandsCheckBoxMenuItemActionPerformed"/>
</Events>
</MenuItem>
<MenuItem class="javax.swing.JCheckBoxMenuItem" name="rejectLircCodeImports">
<Properties>
<Property name="selected" type="boolean" editor="org.netbeans.modules.form.RADConnectionPropertyEditor">
<Connection code="properties.getRejectLircCodeImports()" type="code"/>
</Property>
<Property name="text" type="java.lang.String" value="Reject Lirc Imports without timings"/>
</Properties>
<Events>
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="rejectLircCodeImportsActionPerformed"/>
</Events>
</MenuItem>
</SubComponents>
</Menu>
<Menu class="javax.swing.JMenu" name="exportOptionsMenu">
Expand Down
21 changes: 2 additions & 19 deletions src/main/java/org/harctoolbox/irscrutinizer/GuiMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ public final class GuiMain extends javax.swing.JFrame {
private final static boolean decodeStrict = false;
private final static boolean decodeRecursive = false;
private final static boolean decodeOverride = false;
private final static boolean rejectLircCodeImports = true;

// Locale used for transforming command names.
// One day this may be made user selectable...
Expand Down Expand Up @@ -351,10 +352,7 @@ private void setupImporters() throws MalformedURLException, IrpParseException {

private void setupLircImporter() {
lircImporter = new LircImporter();
lircImporter.setRejectLircCode(properties.getRejectLircCodeImports());
properties.addRejectLircCodeImportsChangeListener((String name1, Object oldValue, Object newValue) -> {
lircImporter.setRejectLircCode((Boolean) newValue);
});
lircImporter.setRejectLircCode(rejectLircCodeImports);
}

private void setupIrTransImporter() {
Expand Down Expand Up @@ -2619,7 +2617,6 @@ private void initComponents() {
girrValidateCheckBoxMenuItem = new javax.swing.JCheckBoxMenuItem();
girrSchemaLocationMenuItem = new javax.swing.JMenuItem();
girrAcceptEmptyCommandsCheckBoxMenuItem = new javax.swing.JCheckBoxMenuItem();
rejectLircCodeImports = new javax.swing.JCheckBoxMenuItem();
exportOptionsMenu = new javax.swing.JMenu();
exportCharsetMenuItem = new javax.swing.JMenuItem();
creatingUserMenuItem = new javax.swing.JMenuItem();
Expand Down Expand Up @@ -6832,15 +6829,6 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {
});
importOptionsMenu.add(girrAcceptEmptyCommandsCheckBoxMenuItem);

rejectLircCodeImports.setSelected(properties.getRejectLircCodeImports());
rejectLircCodeImports.setText("Reject Lirc Imports without timings");
rejectLircCodeImports.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
rejectLircCodeImportsActionPerformed(evt);
}
});
importOptionsMenu.add(rejectLircCodeImports);

optionsMenu.add(importOptionsMenu);

exportOptionsMenu.setText("Export options");
Expand Down Expand Up @@ -8716,10 +8704,6 @@ private void sendingDevLircHardwareHelpButtonActionPerformed(java.awt.event.Acti
HelpPopup.newHelpPopup(this, HelpTexts.devLircHelp);
}//GEN-LAST:event_sendingDevLircHardwareHelpButtonActionPerformed

private void rejectLircCodeImportsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rejectLircCodeImportsActionPerformed
properties.setRejectLircCodeImports(rejectLircCodeImports.isSelected());
}//GEN-LAST:event_rejectLircCodeImportsActionPerformed

private void importMode2HelpButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_importMode2HelpButtonActionPerformed
HelpPopup.newHelpPopup(this, HelpTexts.importMode2Help);
}//GEN-LAST:event_importMode2HelpButtonActionPerformed
Expand Down Expand Up @@ -9854,7 +9838,6 @@ private void tableKeyReleased(JTable table, KeyEvent evt) {
private javax.swing.JMenuItem rawUniquefyMenuItem;
private javax.swing.JRadioButtonMenuItem rawWithoutSignsRadioButtonMenuItem;
private javax.swing.JMenuItem reAnalyzeMenuItem;
private javax.swing.JCheckBoxMenuItem rejectLircCodeImports;
private javax.swing.JMenuItem relToleranceMenuItem;
private javax.swing.JMenuItem releaseNotesMenuItem;
private javax.swing.JButton remoteLocatorBrowseButton;
Expand Down
2 changes: 1 addition & 1 deletion src/main/xml/Props.xml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ this program. If not, see http://www.gnu.org/licenses/.
<property name="importOpensZipFiles" type="boolean" default='"false"' doc="If selected, the import facitilty will also open zip files."/>
<property name="importPaneSelectedIndex" type="int" default='"2"' doc="Index of the selected pane in the importer"/>
<property name="parametrizedRawTabbedPaneSelectedIndex" type="int" default='"0"' doc="Index of the selected pane in the CSV importer"/>
<property name="rejectLircCodeImports" type="boolean" default='"true"' doc="If true, Lirc files without timing information are rejected."/>
<!--property name="rejectLircCodeImports" type="boolean" default='"true"' doc="If true, Lirc files without timing information are rejected."/-->
<property name="allowEmptyGirrCommands" type="boolean" default='"false"' doc="If true, empty Girr Commands are accepted, with just a name. Otherwise they are silently ignored."/>
<property name="chopIctImports" type="boolean" default='"false"' doc="If true, ICT imports are chopped according to the chopThreshold parameter."/>
<property name="prontoModelIndex" type="int" default='"4"' doc="Index of selected Pronto Classic model."/>
Expand Down

0 comments on commit 1313006

Please sign in to comment.