Open main menu
Home
Random
Log in
Settings
About Sugar Labs
Disclaimers
Sugar Labs
Search
Changes
← Older edit
Newer edit →
Development Team/Almanac/sugar.graphics.toolbutton
(view source)
Revision as of 09:15, 23 April 2009
253 bytes added
,
09:15, 23 April 2009
→How do I add a keyboard shortcut to my tool button?
Line 49:
Line 49:
#Add keyboard shortcut for customButton
#Add keyboard shortcut for customButton
customButton.props.accelerator = '<Alt>b'
customButton.props.accelerator = '<Alt>b'
+
+
If you want to enable translators to override the shortcut, use the gettext syntax so that an entry in the POT file is generated (See [[Development_Team/Almanac/Internationalization]] for details):
+
+
customButton.props.accelerator = _('<Alt>b')
Walter
Bureaucrats
,
Administrators
10,579
edits