Index: trunk/FACT++/gui/FactGui.h
===================================================================
--- trunk/FACT++/gui/FactGui.h	(revision 10559)
+++ trunk/FACT++/gui/FactGui.h	(revision 10560)
@@ -340,5 +340,4 @@
     DimStampedInfo fDimFtmDynamicData;
 
-    vector<DimInfo*> fDim;
     map<string, DimInfo*> fServices;
 
@@ -652,6 +651,8 @@
     // ======================= DNS ==========================================
 
-    void handleDimDNS(int version)
-    {
+    void handleDimDNS(const DimData &d)
+    {
+        const int version = d.get<unsigned int>();
+
         ostringstream str;
         str << "V" << version/100 << 'r' << version%100;
@@ -762,6 +763,8 @@
 
         fLoggerFilenameNight->setEnabled(connected);
-        if (connected)
-            fLoggerFilenameNight->setText(d.c_str()+4);
+        if (!connected)
+            return;
+
+        fLoggerFilenameNight->setText(d.c_str()+4);
 
         const uint32_t files = d.get<uint32_t>();
@@ -788,6 +791,8 @@
 
         fLoggerFilenameRun->setEnabled(connected);
-        if (connected)
-            fLoggerFilenameRun->setText(d.c_str()+4);
+        if (!connected)
+            return;
+
+        fLoggerFilenameRun->setText(d.c_str()+4);
 
         const uint32_t files = d.get<uint32_t>();
@@ -1284,47 +1289,8 @@
     // ====================== Dim infoHandler================================
 
-    void handleDimInfo(const DimData &d)
-    {
-        if (d.info==&fDimDNS)
-            return handleDimDNS(d.get<unsigned int>());
-
-        cout << "HandleDimInfo " << d.name << endl;
-
-        if (d.info==&fDimLoggerStats)
-            return handleLoggerStats(d);
-
-        if (d.info==&fDimLoggerFilenameNight)
-            return handleLoggerFilenameNight(d);
-
-        if (d.info==&fDimLoggerNumSubs)
-            return handleLoggerNumSubs(d);
-
-        if (d.info==&fDimLoggerFilenameRun)
-            return handleLoggerFilenameRun(d);
-
-        if (d.info==&fDimFtmTriggerCounter)
-            return handleFtmTriggerCounter(d);
-
-        if (d.info==&fDimFtmDynamicData)
-            return handleFtmDynamicData(d);
-
-        if (d.info==&fDimFtmPassport)
-            return handleFtmPassport(d);
-
-        if (d.info==&fDimFtmFtuList)
-            return handleFtmFtuList(d);
-
-        if (d.info==&fDimFtmStaticData)
-            return handleFtmStaticData(d);
-
-        if (d.info==&fDimFtmError)
-            return handleFtmError(d);
-    }
-
     void handleDimService(const string &txt)
     {
         fDimSvcText->append(txt.c_str());
     }
-
 
     void infoHandlerService(DimInfo &info)
@@ -1380,4 +1346,10 @@
     }
 
+    void PostInfoHandler(void (FactGui::*handler)(const DimData&))
+    {
+        QApplication::postEvent(this,
+                                new FunctionEvent(boost::bind(handler, this, DimData(getInfo()))));
+    }
+
     void infoHandler()
     {
@@ -1385,10 +1357,40 @@
         getInfo()->getTimestamp();
 
-        if (std::find(fDim.begin(), fDim.end(), getInfo())!=fDim.end())
-        {
-            QApplication::postEvent(this,
-                                    new FunctionEvent(boost::bind(&FactGui::handleDimInfo, this, DimData(getInfo()))));
-            return;
-        }
+        if (getInfo()==&fDimDNS)
+            return PostInfoHandler(&FactGui::handleDimDNS);
+
+        cout << "HandleDimInfo " << getInfo()->getName() << endl;
+
+        if (getInfo()==&fDimLoggerStats)
+            return PostInfoHandler(&FactGui::handleLoggerStats);
+
+        if (getInfo()==&fDimLoggerFilenameNight)
+            return PostInfoHandler(&FactGui::handleLoggerFilenameNight);
+
+        if (getInfo()==&fDimLoggerNumSubs)
+            return PostInfoHandler(&FactGui::handleLoggerNumSubs);
+
+        if (getInfo()==&fDimLoggerFilenameRun)
+        {
+            return PostInfoHandler(&FactGui::handleLoggerFilenameRun);
+
+        if (getInfo()==&fDimFtmTriggerCounter)
+        {
+            return PostInfoHandler(&FactGui::handleFtmTriggerCounter);
+
+        if (getInfo()==&fDimFtmDynamicData)
+            return PostInfoHandler(&FactGui::handleFtmDynamicData);
+
+        if (getInfo()==&fDimFtmPassport)
+            return PostInfoHandler(&FactGui::handleFtmPassport);
+
+        if (getInfo()==&fDimFtmFtuList)
+            return PostInfoHandler(&FactGui::handleFtmFtuList);
+
+        if (getInfo()==&fDimFtmStaticData)
+            return PostInfoHandler(&FactGui::handleFtmStaticData);
+
+        if (getInfo()==&fDimFtmError)
+            return PostInfoHandler(&FactGui::handleFtmError);
 
         for (map<string,DimInfo*>::iterator i=fServices.begin(); i!=fServices.end(); i++)
@@ -1604,16 +1606,4 @@
         DimClient::sendCommand("CHAT/MSG", "GUI online.");
         // + MessageDimRX
-
-        fDim.push_back(&fDimFtmDynamicData);
-        fDim.push_back(&fDimFtmTriggerCounter);
-        fDim.push_back(&fDimFtmStaticData);
-        fDim.push_back(&fDimFtmFtuList);
-        fDim.push_back(&fDimFtmPassport);
-        fDim.push_back(&fDimFtmError);
-        fDim.push_back(&fDimLoggerStats);
-        fDim.push_back(&fDimLoggerFilenameNight);
-        fDim.push_back(&fDimLoggerFilenameRun);
-        fDim.push_back(&fDimLoggerNumSubs);
-        fDim.push_back(&fDimDNS);
 
         // --------------------------------------------------------------------------
