# HG changeset patch
# User moel.mich
# Date 1284418525 0
# Node ID 3ad822f418cb2d7e17b37acc939e520564237e09
# Parent  3096735e99b25db4acc2a559a203b270c7c4d1cd
Fixed some hardware sorting issue in the gadget. Hardware with the same type and name would be added to the same section.

diff -r 3096735e99b2 -r 3ad822f418cb GUI/SensorGadget.cs
--- a/GUI/SensorGadget.cs	Mon Sep 13 22:34:08 2010 +0000
+++ b/GUI/SensorGadget.cs	Mon Sep 13 22:55:25 2010 +0000
@@ -486,7 +486,7 @@
         if (x.HardwareType != y.HardwareType)
           return x.HardwareType.CompareTo(y.HardwareType);
 
-        return x.Name.CompareTo(y.Name);
+        return x.Identifier.CompareTo(y.Identifier);
       }
     }
   }
diff -r 3096735e99b2 -r 3ad822f418cb Hardware/Identifier.cs
--- a/Hardware/Identifier.cs	Mon Sep 13 22:34:08 2010 +0000
+++ b/Hardware/Identifier.cs	Mon Sep 13 22:55:25 2010 +0000
@@ -101,8 +101,8 @@
     }
 
     public static bool operator ==(Identifier id1, Identifier id2) {
-      if (id1 == null)
-        return id2 == null;
+      if (id1.Equals(null))
+        return id2.Equals(null);
       else
         return id1.Equals(id2);
     }