This will show any generic properties in the UI VM overview if the Network
adapter is of type "generic"
--
Christophe Devriese
Index: src/VBox/Frontends/VirtualBox/src/selector/UIVMDesktop.cpp
===================================================================
--- src/VBox/Frontends/VirtualBox/src/selector/UIVMDesktop.cpp (revision 37206)
+++ src/VBox/Frontends/VirtualBox/src/selector/UIVMDesktop.cpp (working copy)
@@ -715,6 +715,24 @@
}
}
+/**
+ * Return a text summary of the properties of a generic network adapter
+ */
+QString summarizeGenericProperties(const CNetworkAdapter &adapter) {
+ QVector<QString> names;
+ QVector<QString> props;
+ props = adapter.GetProperties(QString(), names); // all properties, please
+
+ QString result;
+ for (int i = 0; i < names.size(); i++) {
+ result += names[i] + "=" + props[i];
+ if (i != names.size() - 1)
+ result += ",";
+ }
+
+ return result;
+}
+
void UIDetailsPagePrivate::sltUpdateNetwork()
{
m_secBoxes.value(NetworkSec)->setTitleLinkEnabled(m_fChangeable);
@@ -747,8 +765,8 @@
attType = attType.arg(tr("Host-only adapter, '%1'",
"details report (network)").arg(adapter.GetHostOnlyInterface()));
else if (type == KNetworkAttachmentType_Generic)
- attType = attType.arg(tr("Generic, '%1'",
- "details report (network)").arg(adapter.GetGenericDriver()));
+ attType = attType.arg(tr("Generic bambabies, '%1' { %2 }",
+ "details report (network)").arg(adapter.GetGenericDriver(), summarizeGenericProperties(adapter)));
else
attType = attType.arg(vboxGlobal().toString(type));
_______________________________________________
vbox-dev mailing list
[email protected]
http://vbox.innotek.de/mailman/listinfo/vbox-dev