* [email protected] [2013-05-14 18:23 +0200]: This kind of hack is there because when there is only one activatable widget with a mnemonic on it then GTK activate it but does not put the focus on it.
I am not sure if it is desirable to override the defaut GTK behavior, so I'd like to have the advice of people of the list.
Index: tryton/common/button.py
===================================================================
--- a/tryton/common/button.py
+++ b/tryton/common/button.py
@@ -15,6 +15,7 @@
super(Button, self).__init__(label=label, stock=None,
use_underline=True)
self._set_icon(attrs.get('icon'))
+ self.connect('activate', lambda *a: self.grab_focus())
def _set_icon(self, stock):
if not stock:
-- Nicolas Évrard B2CK SPRL rue de Rotterdam, 4 4000 Liège Belgium Tel: +32 472 54 46 59 E-mail/Jabber: [email protected] Website: http://www.b2ck.com/
signature.asc
Description: Digital signature
