[PATCH 1/2] Sync up the Selected Disks and Configure Mount Points dialogs (#1171838).

Chris Lumens clumens at redhat.com
Wed Dec 10 17:45:59 UTC 2014


It doesn't make sense for these two dialogs to display different columns.  This
adds the pretty name (like "sda") to the latter dialog and also puts its columns
in the same order as the former.
---
 .../ui/gui/spokes/lib/custom_storage_helpers.glade | 34 +++++++++++-----------
 .../ui/gui/spokes/lib/custom_storage_helpers.py    |  4 +--
 2 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.glade b/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.glade
index cb9e925..c73e528 100644
--- a/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.glade
+++ b/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.glade
@@ -96,13 +96,13 @@
   </object>
   <object class="GtkListStore" id="disk_store">
     <columns>
-      <!-- column-name disk_col -->
+      <!-- column-name description_col -->
       <column type="gchararray"/>
       <!-- column-name capacity_col -->
       <column type="gchararray"/>
       <!-- column-name free_col -->
       <column type="gchararray"/>
-      <!-- column-name serial_col -->
+      <!-- column-name name_col -->
       <column type="gchararray"/>
       <!-- column-name id_col -->
       <column type="gint"/>
@@ -217,12 +217,12 @@
                       </object>
                     </child>
                     <child>
-                      <object class="GtkTreeViewColumn" id="disk_column">
+                      <object class="GtkTreeViewColumn" id="description_column">
                         <property name="spacing">6</property>
-                        <property name="title" translatable="yes">Disk</property>
+                        <property name="title" translatable="yes">Description</property>
                         <property name="clickable">True</property>
                         <child>
-                          <object class="GtkCellRendererText" id="disk_renderer"/>
+                          <object class="GtkCellRendererText" id="description_renderer"/>
                           <attributes>
                             <attribute name="text">0</attribute>
                           </attributes>
@@ -230,40 +230,40 @@
                       </object>
                     </child>
                     <child>
-                      <object class="GtkTreeViewColumn" id="capacity_column">
+                      <object class="GtkTreeViewColumn" id="name_column">
                         <property name="spacing">6</property>
-                        <property name="title" translatable="yes">Capacity</property>
+                        <property name="title" translatable="yes">Name</property>
                         <property name="clickable">True</property>
                         <child>
-                          <object class="GtkCellRendererText" id="capacity_renderer"/>
+                          <object class="GtkCellRendererText" id="name_renderer"/>
                           <attributes>
-                            <attribute name="text">1</attribute>
+                            <attribute name="text">3</attribute>
                           </attributes>
                         </child>
                       </object>
                     </child>
                     <child>
-                      <object class="GtkTreeViewColumn" id="free_column">
+                      <object class="GtkTreeViewColumn" id="capacity_column">
                         <property name="spacing">6</property>
-                        <property name="title" translatable="yes">Free</property>
+                        <property name="title" translatable="yes">Capacity</property>
                         <property name="clickable">True</property>
                         <child>
-                          <object class="GtkCellRendererText" id="free_renderer"/>
+                          <object class="GtkCellRendererText" id="capacity_renderer"/>
                           <attributes>
-                            <attribute name="text">2</attribute>
+                            <attribute name="text">1</attribute>
                           </attributes>
                         </child>
                       </object>
                     </child>
                     <child>
-                      <object class="GtkTreeViewColumn" id="id_column">
+                      <object class="GtkTreeViewColumn" id="free_column">
                         <property name="spacing">6</property>
-                        <property name="title" translatable="yes">ID</property>
+                        <property name="title" translatable="yes">Free</property>
                         <property name="clickable">True</property>
                         <child>
-                          <object class="GtkCellRendererText" id="id_renderer"/>
+                          <object class="GtkCellRendererText" id="free_renderer"/>
                           <attributes>
-                            <attribute name="text">3</attribute>
+                            <attribute name="text">2</attribute>
                           </attributes>
                         </child>
                       </object>
diff --git a/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.py b/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.py
index 1e6df8c..42d0e63 100644
--- a/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.py
+++ b/pyanaconda/ui/gui/spokes/lib/custom_storage_helpers.py
@@ -419,10 +419,10 @@ class DisksDialog(GUIObject):
         self._store = self.builder.get_object("disk_store")
         # populate the store
         for disk in self._disks:
-            self._store.append([disk.description,
+            self._store.append(["%s (%s)" % (disk.description, disk.serial),
                                 str(disk.size),
                                 str(free[disk.name][0]),
-                                disk.serial,
+                                disk.name,
                                 disk.id])
 
         treeview = self.builder.get_object("disk_view")
-- 
1.9.3



More information about the anaconda-patches mailing list