From 1284e0cdd35f5ae7275d388cf6718192143ecbd2 Mon Sep 17 00:00:00 2001 From: Hesky Fisher Date: Fri, 12 Jul 2013 00:51:04 -0400 Subject: [PATCH] Fix problem where buttons were not pressable on windows --- plover/gui/add_translation.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plover/gui/add_translation.py b/plover/gui/add_translation.py index 0fa2e0ff2..ff6018839 100644 --- a/plover/gui/add_translation.py +++ b/plover/gui/add_translation.py @@ -133,9 +133,13 @@ def __init__(self, parent, engine): # events button.Bind(wx.EVT_BUTTON, self.on_add_translation) - button.Bind(wx.EVT_SET_FOCUS, self.on_button_gained_focus) + # The reason for the focus event here is to skip focus on tab traversal + # of the buttons. But it seems that on windows this prevents the button + # from being pressed. Leave this commented out until that problem is + # resolved. + #button.Bind(wx.EVT_SET_FOCUS, self.on_button_gained_focus) cancel.Bind(wx.EVT_BUTTON, self.on_close) - cancel.Bind(wx.EVT_SET_FOCUS, self.on_button_gained_focus) + #cancel.Bind(wx.EVT_SET_FOCUS, self.on_button_gained_focus) self.strokes_text.Bind(wx.EVT_TEXT, self.on_strokes_change) self.translation_text.Bind(wx.EVT_TEXT, self.on_translation_change) self.strokes_text.Bind(wx.EVT_SET_FOCUS, self.on_strokes_gained_focus)