[virt-tools-list] [PATCH v2 5/6] details: show TPM version

Stefan Berger stefanb at linux.vnet.ibm.com
Fri Jun 8 21:42:43 UTC 2018


From: Marc-André Lureau <marcandre.lureau at redhat.com>

Signed-off-by: Marc-André Lureau <marcandre.lureau at redhat.com>
---
 ui/details.ui          | 24 ++++++++++++++++++++++++
 virtManager/details.py |  3 +++
 2 files changed, 27 insertions(+)

diff --git a/ui/details.ui b/ui/details.ui
index 2e7b253b..efc2748f 100644
--- a/ui/details.ui
+++ b/ui/details.ui
@@ -5445,6 +5445,30 @@
                                             <property name="top_attach">1</property>
                                           </packing>
                                         </child>
+                                        <child>
+                                          <object class="GtkLabel" id="tpm-version-label">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <property name="halign">end</property>
+                                            <property name="label" translatable="yes">Version:</property>
+                                          </object>
+                                          <packing>
+                                            <property name="left_attach">0</property>
+                                            <property name="top_attach">2</property>
+                                          </packing>
+                                        </child>
+                                        <child>
+                                          <object class="GtkLabel" id="tpm-version">
+                                            <property name="visible">True</property>
+                                            <property name="can_focus">False</property>
+                                            <property name="halign">start</property>
+                                            <property name="label">tpm-version</property>
+                                          </object>
+                                          <packing>
+                                            <property name="left_attach">1</property>
+                                            <property name="top_attach">2</property>
+                                          </packing>
+                                        </child>
                                       </object>
                                     </child>
                                   </object>
diff --git a/virtManager/details.py b/virtManager/details.py
index b78a2385..d2996bd1 100644
--- a/virtManager/details.py
+++ b/virtManager/details.py
@@ -249,6 +249,8 @@ def _label_for_device(dev):
         label = _("TPM")
         if dev.device_path:
             label += (" %s" % dev.device_path)
+        else:
+            label += (" v%s" % dev.version)
         return label
 
     devmap = {
@@ -2781,6 +2783,7 @@ class vmmDetails(vmmGObjectUI):
 
         # Device type specific properties, only show if apply to the cur dev
         show_ui("device_path")
+        show_ui("version")
 
     def refresh_panic_page(self):
         dev = self.get_hw_selection(HW_LIST_COL_DEVICE)
-- 
2.14.4




More information about the virt-tools-list mailing list