Smart BAlert knows when to Escape
|Reported by:||jonas.kirilla||Owned by:||axeld|
|Has a Patch:||no||Platform:||All|
I think it would be safe to give BAlert enough intelligence for itself to set escape as the shortcut key for a Cancel button, under these certain conditions:
- It should be done as late as possible. (Not in the constructor.) Preferrably in BAlert's Go() method, so as to give the user plenty of time to set up shortcut keys before the system starts guessing.
- It should be conditionalized on an English locale, as soon as that is supported. ("Cancel" might mean something else in some other language. Other languages would need a different string. The feature would be turned off for unknown languages/locales.)
- Additionally, these conditions should be met:
- there exists a button named Cancel - the Cancel button has no shortcut key set - no other button has B_ESCAPE set as its shortcut key