[gnome-disk-utility] Show WWN for a disk/drive, if available



commit f9e58cb6187bae32db50a59526da20dabe4545ef
Author: David Zeuthen <davidz redhat com>
Date:   Sat Feb 25 12:12:39 2012 -0500

    Show WWN for a disk/drive, if available
    
    In particular, some iSCSI disks have no serial number but they do have
    a WWN.
    
    Signed-off-by: David Zeuthen <davidz redhat com>

 data/ui/palimpsest.ui      |   45 ++++++++++++++++++++++++++++++++++++++++---
 src/palimpsest/gduwindow.c |    4 +++
 2 files changed, 45 insertions(+), 4 deletions(-)
---
diff --git a/data/ui/palimpsest.ui b/data/ui/palimpsest.ui
index 483ea69..ff82a34 100644
--- a/data/ui/palimpsest.ui
+++ b/data/ui/palimpsest.ui
@@ -435,6 +435,43 @@
                       </packing>
                     </child>
                     <child>
+                      <object class="GtkLabel" id="devtab-wwn-label">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="xalign">1</property>
+                        <property name="label" translatable="yes">World Wide Name</property>
+                        <style>
+                          <class name="dim-label"/>
+                        </style>
+                      </object>
+                      <packing>
+                        <property name="top_attach">5</property>
+                        <property name="bottom_attach">6</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                        <property name="y_padding">4</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkLabel" id="devtab-wwn-value-label">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <property name="hexpand">True</property>
+                        <property name="xalign">0</property>
+                        <property name="selectable">True</property>
+                        <property name="ellipsize">end</property>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="right_attach">2</property>
+                        <property name="top_attach">5</property>
+                        <property name="bottom_attach">6</property>
+                        <property name="x_options">GTK_FILL</property>
+                        <property name="y_options"></property>
+                        <property name="y_padding">4</property>
+                      </packing>
+                    </child>
+                    <child>
                       <object class="GtkLabel" id="devtab-media-label">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
@@ -534,8 +571,8 @@
                         </style>
                       </object>
                       <packing>
-                        <property name="top_attach">5</property>
-                        <property name="bottom_attach">6</property>
+                        <property name="top_attach">6</property>
+                        <property name="bottom_attach">7</property>
                         <property name="x_options">GTK_FILL</property>
                         <property name="y_options"></property>
                         <property name="y_padding">4</property>
@@ -553,8 +590,8 @@
                       <packing>
                         <property name="left_attach">1</property>
                         <property name="right_attach">2</property>
-                        <property name="top_attach">5</property>
-                        <property name="bottom_attach">6</property>
+                        <property name="top_attach">6</property>
+                        <property name="bottom_attach">7</property>
                         <property name="x_options">GTK_FILL</property>
                         <property name="y_options"></property>
                         <property name="y_padding">4</property>
diff --git a/src/palimpsest/gduwindow.c b/src/palimpsest/gduwindow.c
index 86da9f2..607e9d6 100644
--- a/src/palimpsest/gduwindow.c
+++ b/src/palimpsest/gduwindow.c
@@ -1613,6 +1613,10 @@ update_device_page_for_drive (GduWindow      *window,
               "devtab-serial-number-label",
               "devtab-serial-number-value-label",
               udisks_drive_get_serial (drive), SET_MARKUP_FLAGS_NONE);
+  set_markup (window,
+              "devtab-wwn-label",
+              "devtab-wwn-value-label",
+              udisks_drive_get_wwn (drive), SET_MARKUP_FLAGS_NONE);
 
   if (ata != NULL && !udisks_drive_get_media_removable (drive))
     {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]