[PATCH 2/4] Make the No Space dialog look less terrible.

Chris Lumens clumens at redhat.com
Mon Nov 17 16:22:19 UTC 2014


(1) Forcing a width results in a dialog that is entirely too narrow.

(2) The silliness we are doing with sw_text means the markup gets escaped
and pasted into the dialog as-is.
---
 pyanaconda/ui/gui/spokes/storage.glade |  4 +---
 pyanaconda/ui/gui/spokes/storage.py    | 11 +++++------
 2 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/storage.glade b/pyanaconda/ui/gui/spokes/storage.glade
index f1f4881..b1fa02c 100644
--- a/pyanaconda/ui/gui/spokes/storage.glade
+++ b/pyanaconda/ui/gui/spokes/storage.glade
@@ -225,8 +225,6 @@
     <property name="border_width">6</property>
     <property name="modal">True</property>
     <property name="window_position">center-on-parent</property>
-    <property name="default_width">400</property>
-    <property name="default_height">300</property>
     <property name="destroy_with_parent">True</property>
     <property name="type_hint">dialog</property>
     <property name="decorated">False</property>
@@ -785,8 +783,8 @@
                                 <property name="margin_left">18</property>
                                 <property name="margin_right">18</property>
                                 <property name="vexpand">False</property>
-                                <property name="column_spacing">12</property>
                                 <property name="row_spacing">3</property>
+                                <property name="column_spacing">12</property>
                                 <child>
                                   <object class="GtkLabel" id="label10">
                                     <property name="visible">True</property>
diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py
index 7dadf74..a1fadc8 100644
--- a/pyanaconda/ui/gui/spokes/storage.py
+++ b/pyanaconda/ui/gui/spokes/storage.py
@@ -204,12 +204,11 @@ class NoSpaceDialog(InstallOptionsDialogBase):
 
     # pylint: disable=arguments-differ
     def refresh(self, required_space, auto_swap, disk_free, fs_free):
-        sw_text = self._get_sw_needs_text(required_space, auto_swap)
-        label_text = (_("%(sw_text)s You don't have enough space available to install "
-                        "<b>%(product)s</b>, even if you used all of the free space "
-                        "available on the selected disks.")
-                      % {"sw_text": escape_markup(sw_text),
-                         "product": escape_markup(productName)})
+        label_text = self._get_sw_needs_text(required_space, auto_swap)
+        label_text += (_("  You don't have enough space available to install "
+                         "<b>%(product)s</b>, even if you used all of the free space "
+                         "available on the selected disks.")
+                       % {"product": escape_markup(productName)})
         label = self.builder.get_object("no_space_desc_label")
         label.set_markup(label_text)
 
-- 
1.9.3



More information about the anaconda-patches mailing list