[PATCH 3/3] Show help also when alt+F1 is pressed

Martin Kolman mkolman at redhat.com
Wed Sep 17 13:28:27 UTC 2014


As the help button now shows the F1 mnemonics, users might be trying to
press F1 right away with alt still pressed.  Therefore we need to
support both F1 and alt+F1 shortcuts.

Signed-off-by: Martin Kolman <mkolman at redhat.com>
---
 pyanaconda/ui/gui/__init__.py | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/pyanaconda/ui/gui/__init__.py b/pyanaconda/ui/gui/__init__.py
index 0ee482b..cd20928 100644
--- a/pyanaconda/ui/gui/__init__.py
+++ b/pyanaconda/ui/gui/__init__.py
@@ -342,6 +342,7 @@ class MainWindow(Gtk.Window):
         if old_screen:
             old_screen.remove_accelerator(self._accel_group, Gdk.KEY_F12, 0)
             old_screen.remove_accelerator(self._accel_group, Gdk.KEY_F1, 0)
+            old_screen.remove_accelerator(self._accel_group, Gdk.KEY_F1, Gdk.ModifierType.MOD1_MASK)
 
         # Check if the widget is already on the stack
         if child not in self._stack_contents:
@@ -356,11 +357,15 @@ class MainWindow(Gtk.Window):
                     Gdk.KEY_F12, 0, 0)
             child.window.add_accelerator("help-button-clicked", self._accel_group,
                     Gdk.KEY_F1, 0, 0)
+            child.window.add_accelerator("help-button-clicked", self._accel_group,
+                    Gdk.KEY_F1, Gdk.ModifierType.MOD1_MASK, 0)
         elif isinstance(child.window, AnacondaWidgets.SpokeWindow):
             child.window.add_accelerator("button-clicked", self._accel_group,
                     Gdk.KEY_F12, 0, 0)
             child.window.add_accelerator("help-button-clicked", self._accel_group,
                     Gdk.KEY_F1, 0, 0)
+            child.window.add_accelerator("help-button-clicked", self._accel_group,
+                    Gdk.KEY_F1, Gdk.ModifierType.MOD1_MASK, 0)
 
         self._stack.set_visible_child(child.window)
 
-- 
1.9.3



More information about the anaconda-patches mailing list