Menu

#2 Bug fix: Do not discard comments when importing Girr files

Unstable (example)
open
nobody
None
5
2022-03-21
2022-03-21
No

RemoteMaster is discarding comments in Girr files during import.
I managed to debug the program and fix the issue. Diff follows:

diff --git a/km/src/main/java/com/hifiremote/jp1/ExternalSignal.java b/km/src/main/java/com/hifiremote/jp1/ExternalSignal.java
--- a/km/src/main/java/com/hifiremote/jp1/ExternalSignal.java   (revision 1900)
+++ b/km/src/main/java/com/hifiremote/jp1/ExternalSignal.java   (date 1647860711881)
@@ -226,6 +226,7 @@
   public static ExternalSignal getExternalSignal( Command cmd )
   {
     ExternalSignal es = new ExternalSignal();
+    es.setNotes( cmd.getComment() );
     Decode decode = null;
     try
     {
@@ -339,7 +340,7 @@
   @Override
   public String getNotes()
   {
-    return null;
+    return notes;
   }

   @Override
@@ -353,10 +354,16 @@
     this.error = error;
   }

+  public void setNotes( String notes )
+  {
+    this.notes = notes;
+  }
+
   public static Remote remote = null;  // For passing from loadExternalFile to callers

   private ArrayList< LearnedSignalDecode > decodes = null;
   private LearnedSignalDecode preferredLSDecode = null;
   private String signalName = null;
   private String error = null;
+  private String notes = null;
 }

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.