LibCecSharp: more cosmetics
[deb_libcec.git] / src / cec-config-gui / actions / RescanDevices.cs
index 0e110a8250202589c4f6caa64e7c8a5863a12627..33c6be9e0dbc092815c09db36949040408ae3405 100644 (file)
@@ -1,18 +1,28 @@
 using CecSharp;
-using System.Windows.Forms;
 
 namespace CecConfigGui.actions
 {
   class RescanDevices : UpdateProcess
   {
+    public RescanDevices(ref LibCecSharp lib)
+    {
+      Lib = lib;
+    }
+
     public override void Process()
     {
       SendEvent(UpdateEventType.ProgressBar, 10);
       SendEvent(UpdateEventType.StatusText, "Polling active devices");
+      Lib.RescanActiveDevices();
+
+      SendEvent(UpdateEventType.ProgressBar, 80);
+      SendEvent(UpdateEventType.StatusText, "Refreshing device list");
       SendEvent(UpdateEventType.PollDevices);
 
       SendEvent(UpdateEventType.ProgressBar, 100);
       SendEvent(UpdateEventType.StatusText, "Ready.");
     }
+
+    private LibCecSharp Lib;
   }
 }