Index: /trunk/FACT++/gui/FactGui.h
===================================================================
--- /trunk/FACT++/gui/FactGui.h	(revision 10664)
+++ /trunk/FACT++/gui/FactGui.h	(revision 10665)
@@ -353,5 +353,5 @@
     };
 
-    void SetLedColor(QPushButton *button, LedColor_t col)
+    void SetLedColor(QPushButton *button, LedColor_t col, const Time &t)
     {
         switch (col)
@@ -378,5 +378,6 @@
         }
 
-        button->setToolTip("Last change: "+QDateTime::currentDateTimeUtc().toString()+" UTC");
+        //button->setToolTip("Last change: "+QDateTime::currentDateTimeUtc().toString()+" UTC");
+        button->setToolTip(("Last change: "+t.GetAsStr()+" UTC").c_str());
     }
 
@@ -702,5 +703,5 @@
         str << "V" << version/100 << 'r' << version%100;
 
-        SetLedColor(fStatusDNSLed, version==0 ? kLedRed : kLedGreen);
+        SetLedColor(fStatusDNSLed, version==0 ? kLedRed : kLedGreen, Time());
 
         fStatusDNSLabel->setText(version==0?"Offline":str.str().c_str());
@@ -809,7 +810,7 @@
         const uint32_t files = d.get<uint32_t>();
 
-        SetLedColor(fLoggerLedLog,  files&1 ? kLedGreen : kLedGray);
-        SetLedColor(fLoggerLedRep,  files&2 ? kLedGreen : kLedGray);
-        SetLedColor(fLoggerLedFits, files&4 ? kLedGreen : kLedGray);
+        SetLedColor(fLoggerLedLog,  files&1 ? kLedGreen : kLedGray, d.time);
+        SetLedColor(fLoggerLedRep,  files&2 ? kLedGreen : kLedGray, d.time);
+        SetLedColor(fLoggerLedFits, files&4 ? kLedGreen : kLedGray, d.time);
     }
 
@@ -826,7 +827,7 @@
         const uint32_t files = d.get<uint32_t>();
 
-        SetLedColor(fLoggerLedLog,  files&1 ? kLedGreen : kLedGray);
-        SetLedColor(fLoggerLedRep,  files&2 ? kLedGreen : kLedGray);
-        SetLedColor(fLoggerLedFits, files&4 ? kLedGreen : kLedGray);
+        SetLedColor(fLoggerLedLog,  files&1 ? kLedGreen : kLedGray, d.time);
+        SetLedColor(fLoggerLedRep,  files&2 ? kLedGreen : kLedGray, d.time);
+        SetLedColor(fLoggerLedFits, files&4 ? kLedGreen : kLedGray, d.time);
     }
 
@@ -945,5 +946,5 @@
     FTM::DimStaticData fFtmStaticData;
 
-    void SetFtuLed(int idx, int counter)
+    void SetFtuLed(int idx, int counter, const Time &t)
     {
         if (counter==0 || counter>3)
@@ -955,10 +956,10 @@
         const LedColor_t col[4] = { kLedGray, kLedGreen, kLedOrange, kLedRed };
 
-        SetLedColor(fFtuLED[idx], col[counter]);
+        SetLedColor(fFtuLED[idx], col[counter], t);
 
         fFtuStatus[idx] = counter;
     }
 
-    void SetFtuStatusLed()
+    void SetFtuStatusLed(const Time &t)
     {
         const int max = fFtuStatus.max();
@@ -967,5 +968,5 @@
         {
         case 0:
-            SetLedColor(fStatusFTULed, kLedGray);
+            SetLedColor(fStatusFTULed, kLedGray, t);
             fStatusFTULabel->setText("All disabled");
             fStatusFTULabel->setToolTip("All FTUs are disabled");
@@ -973,5 +974,5 @@
 
         case 1:
-            SetLedColor(fStatusFTULed, kLedGreen);
+            SetLedColor(fStatusFTULed, kLedGreen, t);
             fStatusFTULabel->setToolTip("Communication with FTU is smooth.");
             fStatusFTULabel->setText("ok");
@@ -979,5 +980,5 @@
 
         case 2:
-            SetLedColor(fStatusFTULed, kLedOrange);
+            SetLedColor(fStatusFTULed, kLedOrange, t);
             fStatusFTULabel->setText("Warning");
             fStatusFTULabel->setToolTip("At least one FTU didn't answer immediately");
@@ -985,5 +986,5 @@
 
         case 3:
-            SetLedColor(fStatusFTULed, kLedRed);
+            SetLedColor(fStatusFTULed, kLedRed, t);
             fStatusFTULabel->setToolTip("At least one FTU didn't answer!");
             fStatusFTULabel->setText("ERROR");
@@ -1037,13 +1038,13 @@
         {
             if (!sdata.IsActive(i))
-                SetFtuLed(i, -1);
+                SetFtuLed(i, -1, d.time);
             else
             {
                 if (fFtuStatus[i]==0)
-                    SetFtuLed(i, 1);
+                    SetFtuLed(i, 1, d.time);
             }
             fFtuLED[i]->setChecked(false);
         }
-        SetFtuStatusLed();
+        SetFtuStatusLed(d.time);
 
 #ifdef HAS_ROOT
@@ -1121,7 +1122,7 @@
 
         for (int i=0; i<40; i++)
-            SetFtuLed(i, sdata.IsActive(i) ? sdata.fPing[i] : -1);
-
-        SetFtuStatusLed();
+            SetFtuLed(i, sdata.IsActive(i) ? sdata.fPing[i] : -1, d.time);
+
+        SetFtuStatusLed(d.time);
     }
 
@@ -1133,6 +1134,6 @@
         const FTM::DimError &sdata = *reinterpret_cast<const FTM::DimError*>(d.ptr());
 
-        SetFtuLed(sdata.fError.fDestAddress , sdata.fError.fNumCalls);
-        SetFtuStatusLed();
+        SetFtuLed(sdata.fError.fDestAddress , sdata.fError.fNumCalls, d.time);
+        SetFtuStatusLed(d.time);
 
         // Write to special window!
@@ -1145,5 +1146,5 @@
     bool fChatOnline;
 
-    void handleStateChanged(const Time &/*time*/, const std::string &server,
+    void handleStateChanged(const Time &time, const std::string &server,
                             const State &s)
     {
@@ -1157,10 +1158,10 @@
 
             if (s.index<FTM::kDisconnected) // No Dim connection
-                SetLedColor(fStatusFTMLed, kLedGray);
+                SetLedColor(fStatusFTMLed, kLedGray, time);
             if (s.index==FTM::kDisconnected) // Dim connection / FTM disconnected
-                SetLedColor(fStatusFTMLed, kLedYellow);
+                SetLedColor(fStatusFTMLed, kLedYellow, time);
             if (s.index==FTM::kConnected || s.index==FTM::kIdle) // Dim connection / FTM connected
             {
-                SetLedColor(fStatusFTMLed, kLedGreen);
+                SetLedColor(fStatusFTMLed, kLedGreen, time);
                 enable = true;
             }
@@ -1172,5 +1173,5 @@
             if (!enable)
             {
-                SetLedColor(fStatusFTULed, kLedGray);
+                SetLedColor(fStatusFTULed, kLedGray, time);
                 fStatusFTULabel->setText("Offline");
                 fStatusFTULabel->setToolTip("FTM is not online.");
@@ -1184,9 +1185,9 @@
 
             if (s.index<FTM::kDisconnected) // No Dim connection
-                SetLedColor(fStatusFADLed, kLedGray);
+                SetLedColor(fStatusFADLed, kLedGray, time);
             if (s.index==FTM::kDisconnected) // Dim connection / FTM disconnected
-                SetLedColor(fStatusFADLed, kLedYellow);
+                SetLedColor(fStatusFADLed, kLedYellow, time);
             if (s.index==FTM::kConnected) // Dim connection / FTM connected
-                SetLedColor(fStatusFADLed, kLedGreen);
+                SetLedColor(fStatusFADLed, kLedGreen, time);
         }
 
@@ -1199,14 +1200,14 @@
 
             if (s.index<=30)   // Ready/Waiting
-                SetLedColor(fStatusLoggerLed, kLedYellow);
+                SetLedColor(fStatusLoggerLed, kLedYellow, time);
             if (s.index<-1)     // Offline
             {
-                SetLedColor(fStatusLoggerLed, kLedGray);
+                SetLedColor(fStatusLoggerLed, kLedGray, time);
                 enable = false;
             }
             if (s.index>=0x100) // Error
-                SetLedColor(fStatusLoggerLed, kLedRed);
+                SetLedColor(fStatusLoggerLed, kLedRed, time);
             if (s.index==40)   // Logging
-                SetLedColor(fStatusLoggerLed, kLedGreen);
+                SetLedColor(fStatusLoggerLed, kLedGreen, time);
 
             fLoggerWidget->setEnabled(enable);
@@ -1219,5 +1220,5 @@
             fChatOnline = s.index==0;
 
-            SetLedColor(fStatusChatLed, fChatOnline ? kLedGreen : kLedRed);
+            SetLedColor(fStatusChatLed, fChatOnline ? kLedGreen : kLedRed, time);
 
             fChatSend->setEnabled(fChatOnline);
@@ -1229,5 +1230,5 @@
             fStatusSchedulerLabel->setText(s.name.c_str());
 
-            SetLedColor(fStatusSchedulerLed, s.index>=0 ? kLedGreen : kLedRed);
+            SetLedColor(fStatusSchedulerLed, s.index>=0 ? kLedGreen : kLedRed, time);
         }
     }
