Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationRuntime.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationRuntime.cpp	(revision 80524)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationRuntime.cpp	(revision 80525)
@@ -52,19 +52,19 @@
 const int iDecimalCount = 2;
 
-enum InfoLine
-{
-    InfoLine_Title = 0,
-    InfoLine_Resolution,
-    InfoLine_Uptime,
-    InfoLine_ClipboardMode,
-    InfoLine_DnDMode,
-    InfoLine_ExecutionEngine,
-    InfoLine_NestedPaging,
-    InfoLine_UnrestrictedExecution,
-    InfoLine_Paravirtualization,
-    InfoLine_GuestAdditions,
-    InfoLine_GuestOSType,
-    InfoLine_RemoteDesktop,
-    InfoLine_Max
+enum InfoRow
+{
+    InfoRow_Title = 0,
+    InfoRow_Resolution,
+    InfoRow_Uptime,
+    InfoRow_ClipboardMode,
+    InfoRow_DnDMode,
+    InfoRow_ExecutionEngine,
+    InfoRow_NestedPaging,
+    InfoRow_UnrestrictedExecution,
+    InfoRow_Paravirtualization,
+    InfoRow_GuestAdditions,
+    InfoRow_GuestOSType,
+    InfoRow_RemoteDesktop,
+    InfoRow_Max
 };
 
@@ -81,4 +81,6 @@
     UIRuntimeInfoWidget(QWidget *pParent, const CMachine &machine, const CConsole &console);
     void guestMonitorChange(ulong uScreenId);
+    void guestAdditionStateChange();
+    void VRDEChange();
 
 protected:
@@ -94,11 +96,16 @@
 private:
 
-    void runTimeAttributes();
+    void createInfoRows();
     void updateScreenInfo(int iScreenId = -1);
     void updateUpTime();
+    void updateGAsVersion();
+    void updateVRDE();
+    /** Searches the table for the @p item of enmLine and replaces its text. if not found inserts a new
+      * row to the end of the table. Assumes only one line of the @p enmLine exists. */
+    void updateInfoRow(InfoRow enmLine, const QString &strColumn0, const QString &strColumn1);
     QString screenResolution(int iScreenId);
-    /** Creates to QTableWidgetItems of tye @enmInfoLine using the @p strLabel and @p strInfo and inserts it
+    /** Creates to QTableWidgetItems of tye @enmInfoRow using the @p strLabel and @p strInfo and inserts it
      * to the row @p iRow. If @p iRow is -1 then the items inserted to the end of the table. */
-    void insertInfoLine(InfoLine enmInfoLine, const QString& strLabel, const QString &strInfo, int iRow = -1);
+    void insertInfoRow(InfoRow enmInfoRow, const QString& strLabel, const QString &strInfo, int iRow = -1);
     void computeMinimumWidth();
 
@@ -249,5 +256,5 @@
     retranslateUi();
     /* Add the title row: */
-    QTableWidgetItem *pTitleItem = new QTableWidgetItem(UIIconPool::iconSet(":/state_running_16px.png"), m_strTableTitle, InfoLine_Title);
+    QTableWidgetItem *pTitleItem = new QTableWidgetItem(UIIconPool::iconSet(":/state_running_16px.png"), m_strTableTitle, InfoRow_Title);
     QFont titleFont(font());
     titleFont.setBold(true);
@@ -256,5 +263,5 @@
     setItem(0, 0, pTitleItem);
     /* Make the API calls and populate the table: */
-    runTimeAttributes();
+    createInfoRows();
     computeMinimumWidth();
 }
@@ -264,4 +271,15 @@
     updateScreenInfo(uScreenId);
 }
+
+void UIRuntimeInfoWidget::guestAdditionStateChange()
+{
+    updateGAsVersion();
+}
+
+void UIRuntimeInfoWidget::VRDEChange()
+{
+    updateVRDE();
+}
+
 
 void UIRuntimeInfoWidget::retranslateUi()
@@ -297,5 +315,5 @@
 }
 
-void UIRuntimeInfoWidget::insertInfoLine(InfoLine enmInfoLine, const QString& strLabel, const QString &strInfo, int iRow /* = -1 */)
+void UIRuntimeInfoWidget::insertInfoRow(InfoRow enmInfoRow, const QString& strLabel, const QString &strInfo, int iRow /* = -1 */)
 {
     int iMargin = 0.2 * qApp->style()->pixelMetric(QStyle::PM_LayoutTopMargin);
@@ -304,6 +322,6 @@
         iNewRow = iRow;
     insertRow(iNewRow);
-    setItem(iNewRow, 0, new QTableWidgetItem(strLabel, enmInfoLine));
-    setItem(iNewRow, 1, new QTableWidgetItem(strInfo, enmInfoLine));
+    setItem(iNewRow, 0, new QTableWidgetItem(strLabel, enmInfoRow));
+    setItem(iNewRow, 1, new QTableWidgetItem(strInfo, enmInfoRow));
     setRowHeight(iNewRow, 2 * iMargin + m_iFontHeight);
 }
@@ -356,5 +374,5 @@
     {
         QTableWidgetItem *pItem = item(i, 0);
-        if (pItem && pItem->type() == InfoLine_Resolution)
+        if (pItem && pItem->type() == InfoRow_Resolution)
             removeRow(i);
     }
@@ -366,5 +384,5 @@
             QString("%1:").arg(m_strScreenResolutionLabel);
         /* Insert the screen resolution row at the top of the table. Row 0 is the title row: */
-        insertInfoLine(InfoLine_Resolution, strLabel, m_screenResolutions[iScreen], iScreen + 1);
+        insertInfoRow(InfoRow_Resolution, strLabel, m_screenResolutions[iScreen], iScreen + 1);
     }
     resizeColumnToContents(1);
@@ -385,5 +403,33 @@
                 uUpDays, uUpHours, uUpMins, uUpSecs);
     QString strUptime = QString(szUptime);
-
+    updateInfoRow(InfoRow_Uptime, QString("%1:").arg(m_strUptimeLabel), strUptime);
+}
+
+void UIRuntimeInfoWidget::updateGAsVersion()
+{
+    CGuest guest = m_console.GetGuest();
+    QString strGAVersion = guest.GetAdditionsVersion();
+    if (strGAVersion.isEmpty())
+        strGAVersion = m_strNotDetected;
+    else
+    {
+        ULONG uRevision = guest.GetAdditionsRevision();
+        if (uRevision != 0)
+            strGAVersion += QString(" r%1").arg(uRevision);
+    }
+   updateInfoRow(InfoRow_GuestAdditions, QString("%1:").arg(m_strGuestAdditionsLabel), strGAVersion);
+}
+
+void UIRuntimeInfoWidget::updateVRDE()
+{
+    /* VRDE information: */
+    int iVRDEPort = m_console.GetVRDEServerInfo().GetPort();
+    QString strVRDEInfo = (iVRDEPort == 0 || iVRDEPort == -1) ?
+        m_strNotAvailable : QString("%1").arg(iVRDEPort);
+   updateInfoRow(InfoRow_RemoteDesktop, QString("%1:").arg(m_strRemoteDesktopLabel), strVRDEInfo);
+}
+
+void UIRuntimeInfoWidget::updateInfoRow(InfoRow enmLine, const QString &strColumn0, const QString &strColumn1)
+{
     QTableWidgetItem *pItem = 0;
     for (int i = 0; i < rowCount() && !pItem; ++i)
@@ -392,14 +438,14 @@
         if (!pItem)
             continue;
-        if (pItem->type() != InfoLine_Uptime)
+        if (pItem->type() != enmLine)
             pItem = 0;
     }
     if (!pItem)
-        insertInfoLine(InfoLine_Uptime, QString("%1:").arg(m_strUptimeLabel), strUptime);
+        insertInfoRow(enmLine, strColumn0, strColumn1);
     else
-        pItem->setText(strUptime);
-}
-
-void UIRuntimeInfoWidget::runTimeAttributes()
+        pItem->setText(strColumn1);
+}
+
+void UIRuntimeInfoWidget::createInfoRows()
 {
     updateScreenInfo();
@@ -444,16 +490,5 @@
     QString strParavirtProvider = gpConverter->toString(m_machine.GetEffectiveParavirtProvider());
 
-    /* Guest information: */
-    CGuest guest = m_console.GetGuest();
-    QString strGAVersion = guest.GetAdditionsVersion();
-    if (strGAVersion.isEmpty())
-        strGAVersion = m_strNotDetected;
-    else
-    {
-        ULONG uRevision = guest.GetAdditionsRevision();
-        if (uRevision != 0)
-            strGAVersion += QString(" r%1").arg(uRevision);
-    }
-    QString strOSType = guest.GetOSTypeId();
+    QString strOSType = m_console.GetGuest().GetOSTypeId();
     if (strOSType.isEmpty())
         strOSType = m_strNotDetected;
@@ -461,19 +496,15 @@
         strOSType = uiCommon().vmGuestOSTypeDescription(strOSType);
 
-    /* VRDE information: */
-    int iVRDEPort = m_console.GetVRDEServerInfo().GetPort();
-    QString strVRDEInfo = (iVRDEPort == 0 || iVRDEPort == -1)?
-        m_strNotAvailable : QString("%1").arg(iVRDEPort);
-
-
-    insertInfoLine(InfoLine_ClipboardMode, QString("%1:").arg(m_strClipboardModeLabel), strClipboardMode);
-    insertInfoLine(InfoLine_DnDMode, QString("%1:").arg(m_strDragAndDropLabel), strDnDMode);
-    insertInfoLine(InfoLine_ExecutionEngine, QString("%1:").arg(m_strExcutionEngineLabel), strExecutionEngine);
-    insertInfoLine(InfoLine_NestedPaging, QString("%1:").arg(m_strNestedPagingLabel), strNestedPaging);
-    insertInfoLine(InfoLine_UnrestrictedExecution, QString("%1:").arg(m_strUnrestrictedExecutionLabel), strUnrestrictedExecution);
-    insertInfoLine(InfoLine_Paravirtualization, QString("%1:").arg(m_strParavirtualizationLabel), strParavirtProvider);
-    insertInfoLine(InfoLine_GuestAdditions, QString("%1:").arg(m_strGuestAdditionsLabel), strGAVersion);
-    insertInfoLine(InfoLine_GuestOSType, QString("%1:").arg(m_strGuestOSTypeLabel), strOSType);
-    insertInfoLine(InfoLine_RemoteDesktop, QString("%1:").arg(m_strRemoteDesktopLabel), strVRDEInfo);
+
+    insertInfoRow(InfoRow_ClipboardMode, QString("%1:").arg(m_strClipboardModeLabel), strClipboardMode);
+    insertInfoRow(InfoRow_DnDMode, QString("%1:").arg(m_strDragAndDropLabel), strDnDMode);
+    insertInfoRow(InfoRow_ExecutionEngine, QString("%1:").arg(m_strExcutionEngineLabel), strExecutionEngine);
+    insertInfoRow(InfoRow_NestedPaging, QString("%1:").arg(m_strNestedPagingLabel), strNestedPaging);
+    insertInfoRow(InfoRow_UnrestrictedExecution, QString("%1:").arg(m_strUnrestrictedExecutionLabel), strUnrestrictedExecution);
+    insertInfoRow(InfoRow_Paravirtualization, QString("%1:").arg(m_strParavirtualizationLabel), strParavirtProvider);
+    updateGAsVersion();
+    insertInfoRow(InfoRow_GuestOSType, QString("%1:").arg(m_strGuestOSTypeLabel), strOSType);
+    updateVRDE();
+
 
     resizeColumnToContents(0);
@@ -1087,4 +1118,5 @@
     connect(pSession, &UISession::sigAdditionsStateChange, this, &UIInformationRuntime::sltGuestAdditionsStateChange);
     connect(pSession, &UISession::sigGuestMonitorChange, this, &UIInformationRuntime::sltGuestMonitorChange);
+    connect(pSession, &UISession::sigVRDEChange, this, &UIInformationRuntime::sltVRDEChange);
 
     prepareMetrics();
@@ -1338,4 +1370,6 @@
 void UIInformationRuntime::sltGuestAdditionsStateChange()
 {
+    if (m_pRuntimeInfoWidget)
+        m_pRuntimeInfoWidget->guestAdditionStateChange();
     bool fGuestAdditionsAvailable = guestAdditionsAvailable(6 /* minimum major version */);
     if (m_fGuestAdditionsAvailable == fGuestAdditionsAvailable)
@@ -1349,7 +1383,12 @@
     Q_UNUSED(changeType);
     Q_UNUSED(screenGeo);
-    printf("%lu\n", uScreenId);
     if (m_pRuntimeInfoWidget)
         m_pRuntimeInfoWidget->guestMonitorChange(uScreenId);
+}
+
+void UIInformationRuntime::sltVRDEChange()
+{
+    if (m_pRuntimeInfoWidget)
+        m_pRuntimeInfoWidget->VRDEChange();
 }
 
Index: /trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationRuntime.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationRuntime.h	(revision 80524)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/runtime/information/UIInformationRuntime.h	(revision 80525)
@@ -38,5 +38,6 @@
 /* GUI includes: */
 #include "QIWithRetranslateUI.h"
-#include "UITextTable.h"
+#include "UIMainEventListener.h"
+
 
 /* Forward declarations: */
@@ -155,4 +156,5 @@
     void sltGuestAdditionsStateChange();
     void sltGuestMonitorChange(KGuestMonitorChangedEventType changeType, ulong uScreenId, QRect screenGeo);
+    void sltVRDEChange();
 
 private:
@@ -192,4 +194,5 @@
     QMap<QString,UIChart*>  m_charts;
     QMap<QString,QLabel*>  m_infoLabels;
+    ComObjPtr<UIMainEventListenerImpl> m_pQtGuestListener;
 
     /** @name These metric names are used for map keys to identify metrics.
