[PATCH] On the storage spoke, only show the summary button if a disk is selected.

Chris Lumens clumens at redhat.com
Tue Jan 22 21:59:40 UTC 2013


---
 pyanaconda/ui/gui/spokes/storage.glade | 5 +++--
 pyanaconda/ui/gui/spokes/storage.py    | 6 ++++--
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/storage.glade b/pyanaconda/ui/gui/spokes/storage.glade
index 047abbf..ca19e72 100644
--- a/pyanaconda/ui/gui/spokes/storage.glade
+++ b/pyanaconda/ui/gui/spokes/storage.glade
@@ -961,12 +961,13 @@
                         <property name="relief">none</property>
                         <property name="use_underline">True</property>
                         <property name="focus_on_click">False</property>
+                        <property name="no_show_all">True</property>
                         <property name="xalign">0</property>
                         <signal name="clicked" handler="on_summary_clicked" swapped="no"/>
                       </object>
                       <packing>
                         <property name="left_attach">0</property>
-                        <property name="top_attach">2</property>
+                        <property name="top_attach">1</property>
                         <property name="width">1</property>
                         <property name="height">1</property>
                       </packing>
@@ -984,7 +985,7 @@
                       </object>
                       <packing>
                         <property name="left_attach">0</property>
-                        <property name="top_attach">1</property>
+                        <property name="top_attach">2</property>
                         <property name="width">1</property>
                         <property name="height">1</property>
                       </packing>
diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py
index 6efd00d..fd85540 100644
--- a/pyanaconda/ui/gui/spokes/storage.py
+++ b/pyanaconda/ui/gui/spokes/storage.py
@@ -576,6 +576,10 @@ class StorageSpoke(NormalSpoke, StorageChecker):
                       count) % (count, str(Size(spec="%s MB" % capacity)), free))
         summary_label = self.builder.get_object("summary_label")
         summary_label.set_text(summary)
+        summary_label.set_sensitive(count > 0)
+
+        summary_button = self.builder.get_object("summary_button")
+        summary_button.set_visible(count > 0)
 
         if len(self.disks) == 0:
             self.set_warning(_("No disks detected.  Please shut down the computer, connect at least one disk, and restart to complete installation."))
@@ -584,8 +588,6 @@ class StorageSpoke(NormalSpoke, StorageChecker):
         else:
             self.clear_info()
 
-        self.builder.get_object("summary_label").set_sensitive(count > 0)
-
     def _update_disk_list(self):
         """ Update self.selected_disks based on the UI. """
         overviews = self.local_disks_box.get_children()
-- 
1.7.11.2



More information about the anaconda-patches mailing list