[PATCH 1/2] Pressing Enter should activate the rightmost button on the detailed dialog.

Chris Lumens clumens at redhat.com
Mon Nov 5 19:55:25 UTC 2012


---
 pyanaconda/ui/gui/spokes/lib/detailederror.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/pyanaconda/ui/gui/spokes/lib/detailederror.py b/pyanaconda/ui/gui/spokes/lib/detailederror.py
index 2ccb7c8..e0acd94 100644
--- a/pyanaconda/ui/gui/spokes/lib/detailederror.py
+++ b/pyanaconda/ui/gui/spokes/lib/detailederror.py
@@ -50,7 +50,7 @@ class DetailedErrorDialog(GUIObject):
         GUIObject.__init__(self, *args, **kwargs)
 
         if not buttons:
-            self.window.add_button(_("_Cancel"), 0)
+            widget = self.window.add_button(_("_Cancel"), 0)
         else:
             buttonbox = self.builder.get_object("detailedButtonBox")
             i = 0
@@ -64,6 +64,9 @@ class DetailedErrorDialog(GUIObject):
 
                 i += 1
 
+        widget.set_can_default(True)
+        widget.grab_default()
+
         if label:
             self.builder.get_object("detailedLabel").set_text(label)
 
-- 
1.7.11.2



More information about the anaconda-patches mailing list