[PATCH 1/2] Move the software-specific error message out of the DetailedErrorDialog class.

Chris Lumens clumens at redhat.com
Thu Aug 23 21:11:42 UTC 2012


---
 pyanaconda/ui/gui/spokes/lib/detailederror.glade | 6 ++----
 pyanaconda/ui/gui/spokes/lib/detailederror.py    | 4 ++++
 pyanaconda/ui/gui/spokes/software.py             | 7 ++++++-
 3 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/lib/detailederror.glade b/pyanaconda/ui/gui/spokes/lib/detailederror.glade
index db9daf2..eb031b5 100644
--- a/pyanaconda/ui/gui/spokes/lib/detailederror.glade
+++ b/pyanaconda/ui/gui/spokes/lib/detailederror.glade
@@ -15,14 +15,12 @@
         <property name="orientation">vertical</property>
         <property name="spacing">2</property>
         <child>
-          <object class="GtkLabel" id="label2">
+          <object class="GtkLabel" id="detailedLabel">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="margin_bottom">18</property>
             <property name="xalign">0</property>
-            <property name="label" translatable="yes">The following software marked for installation has errors.  This is likely caused by an error with
-your installation source.  You can attempt to remove these packages from your installation,
-change your installation source, or quit the installer.</property>
+            <property name="label" translatable="yes">An unknown error occurred during installation.  Details are below.</property>
           </object>
           <packing>
             <property name="expand">False</property>
diff --git a/pyanaconda/ui/gui/spokes/lib/detailederror.py b/pyanaconda/ui/gui/spokes/lib/detailederror.py
index 2696f90..fd6a455 100644
--- a/pyanaconda/ui/gui/spokes/lib/detailederror.py
+++ b/pyanaconda/ui/gui/spokes/lib/detailederror.py
@@ -43,6 +43,7 @@ class DetailedErrorDialog(GUIObject):
 
     def __init__(self, *args, **kwargs):
         buttons = kwargs.pop("buttons", [])
+        label = kwargs.pop("label", None)
         GUIObject.__init__(self, *args, **kwargs)
 
         i = 1
@@ -50,6 +51,9 @@ class DetailedErrorDialog(GUIObject):
             self.window.add_button(button, i)
             i += 1
 
+        if label:
+            self.builder.get_object("detailedLabel").set_text(label)
+
     def refresh(self, msg):
         buf = self.builder.get_object("detailedTextBuffer")
         buf.set_text(msg, -1)
diff --git a/pyanaconda/ui/gui/spokes/software.py b/pyanaconda/ui/gui/spokes/software.py
index 3aecad4..5e24f90 100644
--- a/pyanaconda/ui/gui/spokes/software.py
+++ b/pyanaconda/ui/gui/spokes/software.py
@@ -266,8 +266,13 @@ class SoftwareSelectionSpoke(NormalSpoke):
         if not self._errorMsgs:
             return
 
+        label = _("The following software marked for installation has errors.  "
+                  "This is likely caused by an error with\nyour installation source.  "
+                  "You can attempt to remove these packages from your installation.\n"
+                  "change your installation source, or quit the installer.")
         dialog = DetailedErrorDialog(self.data, buttons=[_("_Quit"), _("_Remove Packages"),
-                                                         _("_Modify Software Source")])
+                                                         _("_Modify Software Source")],
+                                                label=label)
         with enlightbox(self.window, dialog.window):
             dialog.refresh(self._errorMsgs)
             rc = dialog.run()
-- 
1.7.11.2



More information about the anaconda-patches mailing list